commit
stringlengths
40
40
old_file
stringlengths
4
150
new_file
stringlengths
4
150
old_contents
stringlengths
0
3.26k
new_contents
stringlengths
1
4.43k
subject
stringlengths
15
501
message
stringlengths
15
4.06k
lang
stringclasses
4 values
license
stringclasses
13 values
repos
stringlengths
5
91.5k
diff
stringlengths
0
4.35k
400ea7145b890e6fa6c2494da7414ac336c5f721
src/api/mailchimp/index.js
src/api/mailchimp/index.js
// @flow import R from 'ramda'; import axios from 'axios'; import env from '../../env'; import { baseUrl, reportUrl } from './generateUrl'; const MC_KEY = env('MC_KEY'); const MC_USER = env('MC_USER'); export const coreApi = axios.create({ baseURL: baseUrl(), auth: { username: MC_USER, password: MC_KEY, ...
ADD Initial version of mailchimp api connection
ADD Initial version of mailchimp api connection
JavaScript
mit
adambrgmn/sst-analytics,adambrgmn/sst-analytics,adambrgmn/sst-analytics
--- +++ @@ -0,0 +1,23 @@ +// @flow +import R from 'ramda'; +import axios from 'axios'; +import env from '../../env'; +import { baseUrl, reportUrl } from './generateUrl'; + +const MC_KEY = env('MC_KEY'); +const MC_USER = env('MC_USER'); + +export const coreApi = axios.create({ + baseURL: baseUrl(), + auth: { + us...
70f9f119ddd53239d42006be8472ab979d653cab
3/moment-add.js
3/moment-add.js
var moment = require('moment'); console.log(moment("2014-12-11 4:30", "YYYY-MM-DD HH:mm")); console.log(moment("2014-12-11 4:30 +0800", "YYYY-MM-DD HH:mm Z")); console.log(moment("2014-12-11 4:30AM", "YYYY-MM-DD HH:mmA"));
Add the example to use moment to manipulate time by add.
Add the example to use moment to manipulate time by add.
JavaScript
mit
nicebook/Node.js-Reference,nicebook/Node.js-Reference,nicebook/Node.js-Reference
--- +++ @@ -0,0 +1,6 @@ +var moment = require('moment'); + +console.log(moment("2014-12-11 4:30", "YYYY-MM-DD HH:mm")); +console.log(moment("2014-12-11 4:30 +0800", "YYYY-MM-DD HH:mm Z")); +console.log(moment("2014-12-11 4:30AM", "YYYY-MM-DD HH:mmA")); +
20d43a411b35666db2cde5908eeb94ca6066e733
tools/validate_components.js
tools/validate_components.js
#!/usr/bin/env node 'use strict'; /** * Validate that a given component can actually server-side render * with the given properties (specified via a fixture file). * * Not all react components can be server-side rendered: they may * use globals, or access the DOM, or what hafve you. This script * can be used t...
Add a simple script to validate that a component can be server-side rendered.
Add a simple script to validate that a component can be server-side rendered. This is intended for use with webapp's react_util/server_side_render_test.py. Auditors: jlfwong Test Plan: In webapp, ran tools/runtests.py --max-size=large react_util/server_side_render_test.py It completed successfully. I then change...
JavaScript
mit
Khan/react-render-server,Khan/react-render-server,Khan/react-render-server
--- +++ @@ -0,0 +1,81 @@ +#!/usr/bin/env node + +'use strict'; + +/** + * Validate that a given component can actually server-side render + * with the given properties (specified via a fixture file). + * + * Not all react components can be server-side rendered: they may + * use globals, or access the DOM, or what haf...
cd3451286755bc73699f5a7263c7d783b7ca2594
assets/js/stately.js
assets/js/stately.js
function toggleNav() { nav = document.getElementsByClassName('js-side-nav'); navItems = document.getElementsByClassName('js-side-nav-item'); activeLink = document.getElementsByClassName('js-side-nav-link-active'); activeLink[0].addEventListener('click', function(event){ event.preventDefault(); toggleCl...
Add js for mobile nav
Add js for mobile nav
JavaScript
mit
pmarsceill/stately,pmarsceill/stately,pmarsceill/stately,pmarsceill/stately
--- +++ @@ -0,0 +1,43 @@ +function toggleNav() { + nav = document.getElementsByClassName('js-side-nav'); + navItems = document.getElementsByClassName('js-side-nav-item'); + activeLink = document.getElementsByClassName('js-side-nav-link-active'); + + activeLink[0].addEventListener('click', function(event){ + ev...
a90c0660ecd7b3b09d1e49afe58b8fccba9ae417
webpack.config.js
webpack.config.js
module.exports = { entry: './temp/react-components/app-main.js', output: { path: './build/js', filename: 'react-app.js', }, resolve: { extensions: ['', '.js'], }, module: { loaders: [ { test: /\.js$/, loader: 'babel-load...
Add a webpack settings file.
Add a webpack settings file.
JavaScript
mit
tom-konda/OSMNearbyNotesViewer,tom-konda/OSMNearbyNotesViewer,tom-konda/OSMNearbyNotesViewer
--- +++ @@ -0,0 +1,19 @@ +module.exports = { + entry: './temp/react-components/app-main.js', + output: { + path: './build/js', + filename: 'react-app.js', + }, + resolve: { + extensions: ['', '.js'], + }, + module: { + loaders: [ + { + test: /\.j...
11ba2b6845f7d09d2d4542ef59b3add196a8eeed
src/ggrc/assets/javascripts/plugins/ggrc_utils.js
src/ggrc/assets/javascripts/plugins/ggrc_utils.js
/*! Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> Created By: ivan@reciprocitylabs.com Maintained By: ivan@reciprocitylabs.com */ (function($, GGRC) { GGRC.Utils = { getPickerElement: functi...
/*! Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> Created By: ivan@reciprocitylabs.com Maintained By: ivan@reciprocitylabs.com */ (function($, GGRC) { GGRC.Utils = { getPickerElement: functi...
Add helper function for downloading files
Add helper function for downloading files
JavaScript
apache-2.0
edofic/ggrc-core,prasannav7/ggrc-core,AleksNeStu/ggrc-core,edofic/ggrc-core,prasannav7/ggrc-core,edofic/ggrc-core,selahssea/ggrc-core,j0gurt/ggrc-core,jmakov/ggrc-core,j0gurt/ggrc-core,jmakov/ggrc-core,hasanalom/ggrc-core,jmakov/ggrc-core,prasannav7/ggrc-core,andrei-karalionak/ggrc-core,hyperNURb/ggrc-core,hasanalom/gg...
--- +++ @@ -13,6 +13,15 @@ } return false; }); - } + }, + download: function(filename, text) { + var element = document.createElement('a'); + element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text)); + element.setAttribute('download', f...
d97a9a136c824c810a26fe4318849c7e86adf9a2
generators/install/index.js
generators/install/index.js
(function() { 'use strict'; var yeoman = require('yeoman-generator'), chalk = require('chalk'); module.exports = yeoman.generators.Base.extend({ constructor: function () { yeoman.generators.Base.apply(this, arguments); }, initializing: function() { ...
Create a task to install all dependencies
Create a task to install all dependencies Including NPM and Bower
JavaScript
mit
marcosmoura/generator-scaffold,marcosmoura/generator-scaffold
--- +++ @@ -0,0 +1,42 @@ +(function() { + + 'use strict'; + + var yeoman = require('yeoman-generator'), + chalk = require('chalk'); + + module.exports = yeoman.generators.Base.extend({ + + constructor: function () { + yeoman.generators.Base.apply(this, arguments); + }, + + ...
cd022534789370d1f444ae1bac55b6298f89f72b
src/app/controllers/MemoryController.js
src/app/controllers/MemoryController.js
(function () { angular .module('app') .controller('MemoryController', [ MemoryController ]); function MemoryController() { var vm = this; // TODO: move data to the service vm.memoryChartData = [ {key: 'memory', y: 42}, { key: 'free', y: 58} ]; ...
Add a new controller for memory management.
Add a new controller for memory management.
JavaScript
mit
happyboy171/DailyReportDashboard-Angluar-,happyboy171/DailyReportDashboard-Angluar-
--- +++ @@ -0,0 +1,36 @@ +(function () { + angular + .module('app') + .controller('MemoryController', [ + MemoryController + ]); + + function MemoryController() { + var vm = this; + + // TODO: move data to the service + vm.memoryChartData = [ {key: 'memory', ...
db43a1e083cbf65634a592d79f631757a733dc18
tests/js/web/PopoverTest.js
tests/js/web/PopoverTest.js
/*jshint multistr: true */ 'use strict' var $ = require('jquery'); require('../../../js/libs/popover'); $.fx.off = !$.fx.off; describe('Test extra functionality added to Bootstrap popovers', function() { beforeEach(function() { this.$html = $('<div id="html"></div>').appendTo('html'); this.$bo...
Test cases for clickover and autoclosing popovers
Test cases for clickover and autoclosing popovers
JavaScript
mit
jadu/pulsar,jadu/pulsar,jadu/pulsar
--- +++ @@ -0,0 +1,76 @@ +/*jshint multistr: true */ + +'use strict' + +var $ = require('jquery'); + +require('../../../js/libs/popover'); + +$.fx.off = !$.fx.off; + +describe('Test extra functionality added to Bootstrap popovers', function() { + + beforeEach(function() { + this.$html = $('<div id="html"></...
b01b6c4652c98dc1bc584b70dfabdb3eb5d7265e
src/run/update/update-gitignore.spec.js
src/run/update/update-gitignore.spec.js
// import { expect } from 'chai' // import updateGitignore from './update-gitignore' describe('updateGitignore', () => { describe('given the file does not exist', () => { it('should create the .gitignore file') }) describe('given the file exists and it doesn’t have any of Sagui’s entries', () => { // Ma...
Add test skeleton for updateGitignore
Add test skeleton for updateGitignore
JavaScript
mit
saguijs/sagui,saguijs/sagui
--- +++ @@ -0,0 +1,17 @@ +// import { expect } from 'chai' +// import updateGitignore from './update-gitignore' + +describe('updateGitignore', () => { + describe('given the file does not exist', () => { + it('should create the .gitignore file') + }) + + describe('given the file exists and it doesn’t have any of...
672d5080adae87f5269a4fcf2407f513a43852a9
test/i18n-test/languageHandler-test.js
test/i18n-test/languageHandler-test.js
const React = require('react'); const expect = require('expect'); import * as languageHandler from '../../src/languageHandler'; const testUtils = require('../test-utils'); describe('languageHandler', function() { let sandbox; beforeEach(function(done) { testUtils.beforeEach(this); sandbox = t...
Add unit tests for translation
Add unit tests for translation
JavaScript
apache-2.0
matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,aperezdc/matrix-react-sdk,aperezdc/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,aperezdc/matrix-react-sdk,aperezdc/matrix-react-sdk,matrix-org/matrix-react-sdk
--- +++ @@ -0,0 +1,60 @@ +const React = require('react'); +const expect = require('expect'); +import * as languageHandler from '../../src/languageHandler'; + +const testUtils = require('../test-utils'); + +describe('languageHandler', function() { + let sandbox; + + beforeEach(function(done) { + testUtils...
03aa28726bb2ecb0ef429d7693a36db20ec230f1
test/integration/test-check-is-repo.js
test/integration/test-check-is-repo.js
'use strict'; const FS = require('fs'); const Test = require('./include/runner'); const setUp = (context) => { context.realRoot = context.dir('real-root'); context.realSubRoot = context.dir('real-root/foo'); context.fakeRoot = context.dir('fake-root'); return context.gitP(context.realRoot).init(); }; m...
Add integration test for `checkIsRepo`
Add integration test for `checkIsRepo`
JavaScript
mit
steveukx/git-js,steveukx/git-js
--- +++ @@ -0,0 +1,46 @@ +'use strict'; + +const FS = require('fs'); +const Test = require('./include/runner'); + +const setUp = (context) => { + + context.realRoot = context.dir('real-root'); + context.realSubRoot = context.dir('real-root/foo'); + context.fakeRoot = context.dir('fake-root'); + + return conte...
39d04a8af9c5a8dbe7b53c724395f47f7f9c7a37
scripts/authorize.js
scripts/authorize.js
// authorize.js // // Get OAuth token // // Copyright 2011-2012, StatusNet Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // ...
Add a script to do OAuth authorization
Add a script to do OAuth authorization Closes #124.
JavaScript
apache-2.0
OpenSocial/pump.io,landsurveyorsunited/pump.io,e14n/pump.io,pump-io/pump.io,stephensekula/pump.io,gabrielsr/pump.io,profOnno/pump.io,strugee/pump.io,Acidburn0zzz/pump.io,e14n/pump.io,stephensekula/pump.io,profOnno/pump.io,gabrielsr/pump.io,pump-io/pump.io,stephensekula/pump.io,landsurveyorsunited/pump.io,Acidburn0zzz/p...
--- +++ @@ -0,0 +1,94 @@ +// authorize.js +// +// Get OAuth token +// +// Copyright 2011-2012, StatusNet Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www....
2647204d86d2760902023ae1ee85777c9414fdee
tests/acceptance/sidebar-nav-test.js
tests/acceptance/sidebar-nav-test.js
import { test } from 'qunit'; import moduleForAcceptance from 'ember-api-docs/tests/helpers/module-for-acceptance'; moduleForAcceptance('Acceptance | sidebar navigation'); test('can navigate to namespace from sidebar', function(assert) { visit('/ember/1.0.0'); click('.toc-level-1.namespaces a:contains(Ember.Stri...
Add sidebar navigation acceptance tests
Add sidebar navigation acceptance tests
JavaScript
mit
ember-learn/ember-api-docs,toddjordan/ember-api-docs,toddjordan/ember-api-docs,ember-learn/ember-api-docs,MartinMalinda/ember-api-docs,MartinMalinda/ember-api-docs
--- +++ @@ -0,0 +1,32 @@ +import { test } from 'qunit'; + +import moduleForAcceptance from 'ember-api-docs/tests/helpers/module-for-acceptance'; + +moduleForAcceptance('Acceptance | sidebar navigation'); + +test('can navigate to namespace from sidebar', function(assert) { + visit('/ember/1.0.0'); + click('.toc-leve...
60318c6b3233fd04acd4a03592227b0591e318a7
modules/rfNotifications.js
modules/rfNotifications.js
'use strict'; module.exports = function(config, ircbot) { let skipMessages = []; ircbot.on('mqttMessage', function (topic, payload) { if (topic !== config.topic) { return; } const data = JSON.parse(payload.toString()); const matchingDevices = config.devices.filter(function(device) { return device.pro...
Add module for sending RF remote notifications
Add module for sending RF remote notifications
JavaScript
mit
initLab/irc-notifier
--- +++ @@ -0,0 +1,42 @@ +'use strict'; + +module.exports = function(config, ircbot) { + let skipMessages = []; + + ircbot.on('mqttMessage', function (topic, payload) { + if (topic !== config.topic) { + return; + } + + const data = JSON.parse(payload.toString()); + const matchingDevices = config.devices.filter(...
c8d88707abd34a09fba85212dd54f1b8728e1c14
material-ui/modules/channel-select.js
material-ui/modules/channel-select.js
import React from 'react' import Subheader from 'material-ui/lib/Subheader/Subheader' import RadioButton from 'material-ui/lib/radio-button' import RadioButtonGroup from 'material-ui/lib/radio-button-group' export default class ChannelSelect extends React.Component { render() { const { onChange, channels ...
Break out channel select functionality
Break out channel select functionality
JavaScript
agpl-3.0
FarmRadioHangar/fessbox,FarmRadioHangar/fessbox
--- +++ @@ -0,0 +1,36 @@ +import React from 'react' + +import Subheader + from 'material-ui/lib/Subheader/Subheader' +import RadioButton + from 'material-ui/lib/radio-button' +import RadioButtonGroup + from 'material-ui/lib/radio-button-group' + +export default class ChannelSelect extends React.Component { + rend...
df3824f5362934d85ce9fc8b295758abddb4afa5
backend/test/utils.js
backend/test/utils.js
const mongo = require('mongodb') const http = require('http') /** (mongo.db -> Promise) -> () */ exports.mongo = function (action) { mongo.MongoClient .connect("mongodb://localhost:27017/hexode") .then(db => { action(db).catch(e => { db.close() throw e ...
Create utility methods for testing
Create utility methods for testing
JavaScript
mit
KtorZ/Hexode,KtorZ/Hexode,14Plumes/Hexode,14Plumes/Hexode,14Plumes/Hexode,KtorZ/Hexode
--- +++ @@ -0,0 +1,45 @@ +const mongo = require('mongodb') +const http = require('http') + +/** (mongo.db -> Promise) -> () */ +exports.mongo = function (action) { + mongo.MongoClient + .connect("mongodb://localhost:27017/hexode") + .then(db => { + action(db).catch(e => { + ...
c12d4645964ae9fda0597dc83a2d8b7a7af41eb4
16/ffmpeg-toFormat-audio.js
16/ffmpeg-toFormat-audio.js
var ffmpeg = require('fluent-ffmpeg'); var dirpath = 'video/'; var tmppath = 'tmp/'; var audio = 'testaudio-one.wav'; var videoname = 'output.avi'; var Command = new ffmpeg({ source: tmppath + videoname }); Command .fromFormat('avi') .withVideoCodec('libx264') .withAudioCodec('libmp3lame') .addInput(dirp...
Add the example to add the audio in the video file via ffmpeg.
Add the example to add the audio in the video file via ffmpeg.
JavaScript
mit
nicebook/Node.js-Reference,nicebook/Node.js-Reference,nicebook/Node.js-Reference
--- +++ @@ -0,0 +1,21 @@ +var ffmpeg = require('fluent-ffmpeg'); + +var dirpath = 'video/'; +var tmppath = 'tmp/'; +var audio = 'testaudio-one.wav'; +var videoname = 'output.avi'; +var Command = new ffmpeg({ source: tmppath + videoname }); + +Command + .fromFormat('avi') + .withVideoCodec('libx264') + .withAu...
4dcb2db938a9c47b0902bd9253cd6e2ff7885628
src/utils/throttle.js
src/utils/throttle.js
/** * Throttle a function call. * * @description * Function calls are delayed by `wait` milliseconds but at least every `wait` * milliseconds a call is triggered. * * @param {functiom} func - Function to be debounced * @param {number} wait - Number of milliseconds to debounce the function call. * @param {boole...
Add a util function for throttling
Add a util function for throttling
JavaScript
mit
flekschas/hipiler,flekschas/hipiler,flekschas/hipiler
--- +++ @@ -0,0 +1,34 @@ +/** + * Throttle a function call. + * + * @description + * Function calls are delayed by `wait` milliseconds but at least every `wait` + * milliseconds a call is triggered. + * + * @param {functiom} func - Function to be debounced + * @param {number} wait - Number of milliseconds to debounce...
a8fa754a1644e9cf4203275656acc97b82d954db
src/main/resources/scripts/create-index.js
src/main/resources/scripts/create-index.js
db.apis.createIndex( { "visibility" : 1 } ); db.apis.createIndex( { "group" : 1 } ); db.applications.createIndex( { "group" : 1 } ); db.events.createIndex( { "type" : 1 } ); db.events.createIndex( { "updatedAt" : 1 } ); db.events.createIndex( { "properties.api_id" : 1 } ); db.plans.createIndex( { "apis" : 1 } ); db.sub...
Add index script for better performances
chore: Add index script for better performances
JavaScript
apache-2.0
gravitee-io/gravitee-repository-mongodb,gravitee-io/gravitee-repository-mongodb
--- +++ @@ -0,0 +1,20 @@ +db.apis.createIndex( { "visibility" : 1 } ); +db.apis.createIndex( { "group" : 1 } ); +db.applications.createIndex( { "group" : 1 } ); +db.events.createIndex( { "type" : 1 } ); +db.events.createIndex( { "updatedAt" : 1 } ); +db.events.createIndex( { "properties.api_id" : 1 } ); +db.plans.cre...
e019bcbfdd568030176442731c10fc8b970cda59
array.ptototypes.js
array.ptototypes.js
Array.prototype.remove = function(from, to) { var rest = this.slice((to || from) + 1 || this.length); this.length = from < 0 ? this.length + from : from; return this.push.apply(this, rest); };
Create new feature, add array prototypes
Create new feature, add array prototypes Create new feature, add array prototypes
JavaScript
mit
christianjames/js-commons
--- +++ @@ -0,0 +1,5 @@ +Array.prototype.remove = function(from, to) { + var rest = this.slice((to || from) + 1 || this.length); + this.length = from < 0 ? this.length + from : from; + return this.push.apply(this, rest); +};
0e0a526d4d7d584481fca46c551efee49aaf0c40
js/es6-playground/08-1-golden-ratio.js
js/es6-playground/08-1-golden-ratio.js
// es6 generators example // "The Goden Ration" (phi) approximation using fibonacci numbers const MAX_APPROX = 100; function* fib(x, y) { for (let i = 0; i < MAX_APPROX; i++) { [x, y] = [y, x + y]; yield y; } }; let prev = 1; for (let n of fib(0, 1)) { if (prev > 1) { phi = n / parseFloat(prev); ...
Add a golden ratio approximation using fibonacci numbers and es6 generators
Add a golden ratio approximation using fibonacci numbers and es6 generators
JavaScript
mit
petarov/sandbox,petarov/sandbox,petarov/sandbox,petarov/sandbox,petarov/sandbox,petarov/sandbox,petarov/sandbox,petarov/sandbox,petarov/sandbox
--- +++ @@ -0,0 +1,20 @@ +// es6 generators example +// "The Goden Ration" (phi) approximation using fibonacci numbers + +const MAX_APPROX = 100; + +function* fib(x, y) { + for (let i = 0; i < MAX_APPROX; i++) { + [x, y] = [y, x + y]; + yield y; + } +}; + +let prev = 1; +for (let n of fib(0, 1)) { + if (prev...
dc366d1418662d3ef3b473250210dc38c71098b9
test/models/botTest.js
test/models/botTest.js
var chai = require('chai'); var expect = chai.expect; // we are using the "expect" style of Chai var Bot = require('./../../models/bot'); describe('Bot', function() { it('Bot() create new bot object with default value', function() { var newBot = Bot({ name: 'Toto', zone: { coordinates: [[8.08...
Add Test for Bot model
Add Test for Bot model
JavaScript
mit
Ecotaco/bumblebee-bot,Ecotaco/bumblebee-bot
--- +++ @@ -0,0 +1,27 @@ +var chai = require('chai'); +var expect = chai.expect; // we are using the "expect" style of Chai +var Bot = require('./../../models/bot'); + +describe('Bot', function() { + it('Bot() create new bot object with default value', function() { + var newBot = Bot({ + name: 'Toto', + ...
6b36600a699a0de95573ccf062e5f9a0a9c2cc6f
test/thriftHostPool.js
test/thriftHostPool.js
/** * Runs tests defined in thrift.js, but with ConnectionPool * option hostPoolSize set to 5. */ var config = require('./helpers/thrift'), system = require('./helpers/connection'), thriftTest = require('./thrift'), Helenus, conn, ks, cf_standard, row_standard, cf_composite, cf_counter; system.hostPool...
Test suite for ConnectionPools that use hostPoolSize option.
Test suite for ConnectionPools that use hostPoolSize option. Re-runs the existing thrift.js test suite, but sets the hostPoolSize option before starting.
JavaScript
mit
lyveminds/scamandrios
--- +++ @@ -0,0 +1,13 @@ +/** + * Runs tests defined in thrift.js, but with ConnectionPool + * option hostPoolSize set to 5. + */ +var config = require('./helpers/thrift'), + system = require('./helpers/connection'), + thriftTest = require('./thrift'), + Helenus, conn, ks, cf_standard, row_standard, cf_comp...
48c74e8ad82fcfa58b46b384048c47265121cee4
code/js/controllers/YandexController.js
code/js/controllers/YandexController.js
;(function() { "use strict"; require("BaseController").init({ siteName: "Yandex", playPause: ".player-controls__btn_play", playNext: ".player-controls__btn_next", playPrev: ".player-controls__btn_prev", mute: ".volume__icon", like: ".player-controls .icon_like", dislike: ".player-contro...
;(function() { "use strict"; require("BaseController").init({ siteName: "Yandex", playPause: ".player-controls__btn_play", playNext: ".player-controls__btn_next", playPrev: ".player-controls__btn_prev", mute: ".volume__icon", like: ".player-controls .icon_like", dislike: ".player-contro...
Fix current track selectors for Yandex
Fix current track selectors for Yandex
JavaScript
mit
nemchik/streamkeys,berrberr/streamkeys,berrberr/streamkeys,ovcharik/streamkeys,ovcharik/streamkeys,nemchik/streamkeys,alexesprit/streamkeys,berrberr/streamkeys,nemchik/streamkeys,alexesprit/streamkeys
--- +++ @@ -10,7 +10,7 @@ like: ".player-controls .icon_like", dislike: ".player-controls .icon_like_on", - song: ".track__title", - artist: ".track__artists" + song: ".player-controls .track__title", + artist: ".player-controls .track__artists" }); })();
65792cdafa5930d653bd93ba49e08da4581b4a5b
app/assets/javascripts/application.js
app/assets/javascripts/application.js
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat...
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat...
Make a JSON representation of the page's object available to the JS
Make a JSON representation of the page's object available to the JS
JavaScript
mit
daguar/cityvoice,ajb/cityvoice,ajb/cityvoice,codeforamerica/cityvoice,codeforgso/cityvoice,daguar/cityvoice,daguar/cityvoice,codeforgso/cityvoice,daguar/cityvoice,ajb/cityvoice,codeforamerica/cityvoice,codeforgso/cityvoice,ajb/cityvoice,codeforgso/cityvoice,codeforamerica/cityvoice,codeforamerica/cityvoice
--- +++ @@ -15,3 +15,7 @@ //= require turbolinks //= require leaflet //= require_tree . + +// Make a JSON representation of the Rails object available to the page +$.getJSON(document.URL, success = function(successObject) { json_representation = successObject; console.log(successObject) } ); +
b9b61a56057dadd5f61015bc2e1cf880c653758b
tests.js
tests.js
const assert = require('assert') const CNJokes = require('./index.js') describe('get chucknorris joke', function() { it('should return random joke', function() { }); it('should return count jokes', function() { }); it('should return random jokes', function() { }); it('should return ...
Add skeleton file for test
Add skeleton file for test
JavaScript
mit
muhtarudinsiregar/chucknorris-quotes
--- +++ @@ -0,0 +1,20 @@ +const assert = require('assert') +const CNJokes = require('./index.js') + +describe('get chucknorris joke', function() { + it('should return random joke', function() { + + }); + + it('should return count jokes', function() { + + }); + + it('should return random jokes', function() { + + ...
8ab948ab0133d3caba52fc770779bc2cc9c309ae
cypress/integration/home.spec.js
cypress/integration/home.spec.js
/** * Copyright (C) 2019 The Software Heritage developers * See the AUTHORS file at the top-level directory of this distribution * License: GNU Affero General Public License version 3, or any later version * See top-level LICENSE file for more information */ const url = '/'; const $ = Cypress.$; describe('Home...
Add tests for Home Page
Add tests for Home Page
JavaScript
agpl-3.0
SoftwareHeritage/swh-web-ui,SoftwareHeritage/swh-web-ui,SoftwareHeritage/swh-web-ui
--- +++ @@ -0,0 +1,24 @@ +/** + * Copyright (C) 2019 The Software Heritage developers + * See the AUTHORS file at the top-level directory of this distribution + * License: GNU Affero General Public License version 3, or any later version + * See top-level LICENSE file for more information + */ + +const url = '/'; + ...
0b4aa3f1c267e2d75220334375123e47a14530c3
examples/simple-calls.js
examples/simple-calls.js
"use strict"; var Q = require("../q"); function log() { console.log.apply(console, arguments); } Q("----------- tick 1 -----------").done(log); // next tick Q().thenResolve("----------- tick 2 -----------").done(log); // in 2 ticks Q().thenResolve().thenResolve("----------- tick 3 -----------").done(log); // in ...
Add a simple example demonstrating ticks and calls.
Add a simple example demonstrating ticks and calls.
JavaScript
mit
STRd6/q,kevinsawicki/q
--- +++ @@ -0,0 +1,27 @@ +"use strict"; + +var Q = require("../q"); + +function log() { + console.log.apply(console, arguments); +} + +Q("----------- tick 1 -----------").done(log); // next tick +Q().thenResolve("----------- tick 2 -----------").done(log); // in 2 ticks +Q().thenResolve().thenResolve("----------- ...
311c2c5f95b68e68d03e48f84d7d3999dff9f943
config/env/all.js
config/env/all.js
'use strict'; module.exports = { assets: { lib: { css: [ 'lib/bootstrap/dist/css/bootstrap.css', 'lib/bootstrap/dist/css/bootstrap-theme.css', 'lib/font-awesome/css/font-awesome.css' ], js: [ 'lib/angular/angular.js', 'lib/angular-resource/angular-resource.js', 'lib/angular-cookies...
'use strict'; module.exports = { assets: { lib: { css: [ 'lib/bootstrap/dist/css/bootstrap.css', 'lib/bootstrap/dist/css/bootstrap-theme.css', 'lib/font-awesome/css/font-awesome.css' ], js: [ 'lib/angular/angular.js', 'lib/angular-resource/angular-resource.js', 'lib/angular-cookies...
Fix the dependencies of set os unit tests
Fix the dependencies of set os unit tests
JavaScript
apache-2.0
rsdevigo/jungle,michelazzo/jungle,rsdevigo/jungle,michelazzo/jungle,rsdevigo/jungle,michelazzo/jungle
--- +++ @@ -18,7 +18,8 @@ 'lib/angular-ui-router/release/angular-ui-router.js', 'lib/angular-ui-utils/ui-utils.js', 'lib/angular-bootstrap/ui-bootstrap-tpls.js', - 'lib/angular-breadcrumb/release/angular-breadcrumb.js' + 'lib/angular-breadcrumb/release/angular-breadcrumb.js', + 'lib/angular-xe...
a1213cc2610424e7cfeb010f706fe252f3c1d889
lib/fullscreen-class.js
lib/fullscreen-class.js
(function () { /** * Monkey patch to apply a 'fullscreen' class to A-Frame scenes in fullscreen * mode. Allows overlay content to be hidden in iOS Safari, which doesn't * have an actual fullscreen API. */ document.addEventListener('DOMContentLoaded', function () { var scene = document.querySelector...
Add fullscreen class to scenes.
Add fullscreen class to scenes. Affects #4 but won't work until A-Frame v0.2.0
JavaScript
mit
polats/aframe-polats-extras,donmccurdy/sandbox-aframe,polats/aframe-polats-extras,donmccurdy/aframe-extras
--- +++ @@ -0,0 +1,18 @@ +(function () { + + /** + * Monkey patch to apply a 'fullscreen' class to A-Frame scenes in fullscreen + * mode. Allows overlay content to be hidden in iOS Safari, which doesn't + * have an actual fullscreen API. + */ + document.addEventListener('DOMContentLoaded', function () { + ...
b349d65a9da023260414c6fcd6d6c468aabeb948
spec/core-clone-spec.js
spec/core-clone-spec.js
'use strict'; // const tmp = require('tmp'); // // Mine // const core = require('../lib/core'); // const fsX = require('../lib/fsExtra'); // const util = require('../lib/util'); // // // const cc = require('./core-common'); // function quietDoFor(internalOptions, cmd, args) { // // Classic use of mute, suppress ou...
Add placeholder for clone unit tests
Add placeholder for clone unit tests
JavaScript
mit
JohnRGee/forest-arborist,JohnRGee/forest-arborist,JohnRGee/arm
--- +++ @@ -0,0 +1,29 @@ +'use strict'; + +// const tmp = require('tmp'); +// // Mine +// const core = require('../lib/core'); +// const fsX = require('../lib/fsExtra'); +// const util = require('../lib/util'); +// // +// const cc = require('./core-common'); + + +// function quietDoFor(internalOptions, cmd, args) { +...
fb040cb36a177198aba7cf3cdc82c5d0bbd05158
test/testMultipleNotifications.js
test/testMultipleNotifications.js
var mercurius = require('../index.js'); var request = require('supertest'); var assert = require('assert'); var nock = require('nock'); describe('mercurius', function() { var token; before(function(done) { mercurius.ready.then(function() { request(mercurius.app) .post('/register') .send(...
Test multiple notifications failure case
Test multiple notifications failure case
JavaScript
apache-2.0
zalun/mercurius,marco-c/mercurius,marco-c/mercurius,marco-c/mercurius,zalun/mercurius
--- +++ @@ -0,0 +1,68 @@ +var mercurius = require('../index.js'); +var request = require('supertest'); +var assert = require('assert'); +var nock = require('nock'); + +describe('mercurius', function() { + var token; + + before(function(done) { + mercurius.ready.then(function() { + request(mercurius.app) + ...
3b0d98edfc605f68d5cee7caba581b4a40abad66
Toggl/WeeklyReport.user.js
Toggl/WeeklyReport.user.js
// ==UserScript== // @name Toggl - Weekly report // @namespace https://github.com/fabiencrassat // @version 0.1 // @description Calculate and display the work day percentages // @author Fabien Crassat <fabien@crassat.com> // @include /^https:\/\/toggl\.com\/app\/reports\/weekly\/\d+\/period\...
Add Toggl - Weekly report: calculation and display the work day percentages
Add Toggl - Weekly report: calculation and display the work day percentages Signed-off-by: Fabien Crassat <777bcfcf9efee56bedca63c5eb2304e67df52892@crassat.com>
JavaScript
mit
fabiencrassat/UserScripts
--- +++ @@ -0,0 +1,73 @@ +// ==UserScript== +// @name Toggl - Weekly report +// @namespace https://github.com/fabiencrassat +// @version 0.1 +// @description Calculate and display the work day percentages +// @author Fabien Crassat <fabien@crassat.com> +// @include /^https:\/\/toggl\.com\/...
3cc3a8913c333a18ecb5867cb70c1befc98c2374
test/test-ime-output.js
test/test-ime-output.js
'use strict'; var testUtil = require('./util'); var IMEOutput = require('ime-output').IMEOutput; exports['test IMEOutput (set|finish)Composition'] = function(assert, done) { testUtil.setupTest('', function(tab) { var el = testUtil.getFocusedElement(); var imeOutput = new IMEOutput(); imeOutput.setFocu...
Make sure IMEOutput send event and string according to spec
Make sure IMEOutput send event and string according to spec
JavaScript
mit
timdream/jszhuyin-firefox,timdream/jszhuyin-firefox
--- +++ @@ -0,0 +1,69 @@ +'use strict'; + +var testUtil = require('./util'); + +var IMEOutput = require('ime-output').IMEOutput; + +exports['test IMEOutput (set|finish)Composition'] = function(assert, done) { + testUtil.setupTest('', function(tab) { + var el = testUtil.getFocusedElement(); + + var imeOutput = ...
90d437ce89fa442a83e5fed2f8bdc7b9006958ae
examples/invite-reply.js
examples/invite-reply.js
// // Read an .ics file given on the command line, generate a reply, and email it // using nodemailer. // var fs = require('fs'); var icalendar = require('../lib'); var invite = icalendar.parse_calendar( fs.readFileSync(process.argv[2], {encoding: 'utf-8'})); var vevent = invite.events()[0]; // Find the firs...
Add an example of replying to an invitation
Add an example of replying to an invitation
JavaScript
mit
tritech/node-icalendar,oathcomrade/node-icalendar
--- +++ @@ -0,0 +1,45 @@ +// +// Read an .ics file given on the command line, generate a reply, and email it +// using nodemailer. +// + +var fs = require('fs'); + +var icalendar = require('../lib'); + + +var invite = icalendar.parse_calendar( + fs.readFileSync(process.argv[2], {encoding: 'utf-8'})); +var vevent ...
eb0ab31f9e187973beaf94f356797e9d5ae240a9
gulpfile.js
gulpfile.js
var gulp = require('gulp'); var uglify = require('gulp-uglify'); var rename = require('gulp-rename'); gulp.task('default', function() { gulp.src('bootstrap-hover-dropdown.js') // minifiy preserving preserved comments .pipe(uglify({ preserveComments: 'some' })) // ren...
Add a gulp file to perform minifications (and help manage releases)
Add a gulp file to perform minifications (and help manage releases)
JavaScript
mit
erickacevedor/bootstrap-hover-dropdown,huangxinliu/bootstrap-hover-dropdown,surgeforward/bootstrap-hover-dropdown,Youraiseme/bootstrap-hover-dropdown,redavis/bootstrap-hover-dropdown,surgeforward/bootstrap-hover-dropdown,erickacevedor/bootstrap-hover-dropdown,huangxinliu/bootstrap-hover-dropdown,CWSpear/bootstrap-hover...
--- +++ @@ -0,0 +1,58 @@ +var gulp = require('gulp'); +var uglify = require('gulp-uglify'); +var rename = require('gulp-rename'); + +gulp.task('default', function() { + gulp.src('bootstrap-hover-dropdown.js') + // minifiy preserving preserved comments + .pipe(uglify({ + preserveComments...
a80dedc42127d60ea86fd76414f495e5430a806b
updates/0.0.1-list_child-placement-considerations.js
updates/0.0.1-list_child-placement-considerations.js
exports.create = { 'Child Placement Consideration': [{ childPlacementConsideration: 'Fire Setting' }, { childPlacementConsideration: 'Hurts Animals' }, { childPlacementConsideration: 'Self Harm' }, { childPlacementConsideration: 'Sexual Abuse' }] };
Create script to automatically create the list for Child Placement Considerations.
Create script to automatically create the list for Child Placement Considerations.
JavaScript
mit
autoboxer/MARE,autoboxer/MARE
--- +++ @@ -0,0 +1,11 @@ +exports.create = { + 'Child Placement Consideration': [{ + childPlacementConsideration: 'Fire Setting' + }, { + childPlacementConsideration: 'Hurts Animals' + }, { + childPlacementConsideration: 'Self Harm' + }, { + childPlacementConsideration: 'Sexual Abuse' + }] +};
6bab509cc142542863fd86b017b85e0681f659ee
tests/helpers/custom-event-polyfill.js
tests/helpers/custom-event-polyfill.js
// Polyfill for creating CustomEvents on IE9/10/11 // code pulled from: // https://github.com/d4tocchini/customevent-polyfill // https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent#Polyfill if (!window.CustomEvent || typeof window.CustomEvent !== 'function') { var CustomEvent = function(event, params) { ...
Add CustomEvent polyfill for tests
Add CustomEvent polyfill for tests
JavaScript
mit
SvitlanaShepitsena/shakou,tbossert/framework,SvitlanaShepitsena/framework,infamous/famous-framework,infamous/framework,SvitlanaShepitsena/framework-1,SvitlanaShepitsena/shakou,KraigWalker/framework,SvitlanaShepitsena/remax-banner,Famous/framework,infamous/famous-framework,woltemade/framework,Famous/framework,infamous/f...
--- +++ @@ -0,0 +1,21 @@ +// Polyfill for creating CustomEvents on IE9/10/11 +// code pulled from: +// https://github.com/d4tocchini/customevent-polyfill +// https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent#Polyfill +if (!window.CustomEvent || typeof window.CustomEvent !== 'function') { + var CustomEve...
0812f6afdd572147f4203d4bbce292f20fce1b15
src/test/ed/db/index6.js
src/test/ed/db/index6.js
// index6.js Test indexes on array subelements. db = connect( "test" ); r = db.ed.db.index5; r.drop(); r.save( { comments : [ { name : "eliot", foo : 1 } ] } ); r.ensureIndex( { "comments.name": 1 } ); assert( r.findOne( { "comments.name": "eliot" } ) );
Add test for indexing simple object element within array
Add test for indexing simple object element within array
JavaScript
apache-2.0
babble/babble,babble/babble,babble/babble,babble/babble,babble/babble,babble/babble
--- +++ @@ -0,0 +1,9 @@ +// index6.js Test indexes on array subelements. + +db = connect( "test" ); +r = db.ed.db.index5; +r.drop(); + +r.save( { comments : [ { name : "eliot", foo : 1 } ] } ); +r.ensureIndex( { "comments.name": 1 } ); +assert( r.findOne( { "comments.name": "eliot" } ) );
f9489e43ee43ba2c3f453b14416870b2d5762dfc
test/util.js
test/util.js
/* global describe it */ 'use strict' const chai = require('chai') const chaiAsPromised = require('chai-as-promised') const requireInject = require('require-inject') const sinon = require('sinon') const sinonChai = require('sinon-chai') require('sinon-as-promised') chai.use(chaiAsPromised) chai.use(sinonChai) const ...
Add child_process.exec failure test case
Add child_process.exec failure test case
JavaScript
isc
jcollado/multitest
--- +++ @@ -0,0 +1,27 @@ +/* global describe it */ +'use strict' + +const chai = require('chai') +const chaiAsPromised = require('chai-as-promised') +const requireInject = require('require-inject') +const sinon = require('sinon') +const sinonChai = require('sinon-chai') +require('sinon-as-promised') + +chai.use(chaiA...
b6e6dd452f99a3d59d05358209a341e1f2a64198
src/lib/__tests__/date.spec.js
src/lib/__tests__/date.spec.js
/* eslint-env mocha, jest */ import { parse, dayStart, dayEnd, addDays, } from '../date'; const sampleUnixDate = 1511100000000; it('should parse date correctly', () => { const expected = sampleUnixDate; const actual = parse(new Date(sampleUnixDate)); expect(actual).toBe(expected); }); it('should return...
Add date lib unit tests
Add date lib unit tests
JavaScript
mit
mkermani144/wanna,mkermani144/wanna
--- +++ @@ -0,0 +1,31 @@ +/* eslint-env mocha, jest */ + +import { + parse, + dayStart, + dayEnd, + addDays, +} from '../date'; + +const sampleUnixDate = 1511100000000; + +it('should parse date correctly', () => { + const expected = sampleUnixDate; + const actual = parse(new Date(sampleUnixDate)); + expect(act...
e2cc892bda88a28a24855ce6bc0ca3b33902231a
test/duplicate.js
test/duplicate.js
var tessel = require('tessel'); var bleLib = require('../'); console.log('1..2'); var ble = bleLib.use(tessel.port['A']); ble.on('ready', function(){ testOne(); }); function testOne () { var discovered = []; ble.startScanning(); var timeout = setTimeout(function(){ console.log('ok - did not return duplic...
Add test for finding dupliates
Add test for finding dupliates
JavaScript
apache-2.0
tessel/ble-ble113a,tessel/ble-ble113a
--- +++ @@ -0,0 +1,53 @@ +var tessel = require('tessel'); +var bleLib = require('../'); +console.log('1..2'); + +var ble = bleLib.use(tessel.port['A']); + +ble.on('ready', function(){ + testOne(); +}); + +function testOne () { + var discovered = []; + ble.startScanning(); + var timeout = setTimeout(function(){ + ...
d1bb96483651317cd3b079703e8d11f6e0e8d65d
test/read.spec.js
test/read.spec.js
'use strict'; import React from 'react'; import TestUtils from 'react-addons-test-utils'; import { expect } from './support/utils'; import PlainContainer from '../src/read/elements/pure/plainContainer'; import MetaError from '../src/read/elements/pure/metaError'; describe('Reads', () => { describe('Pure Component...
Implement tests for the pure components used in reads
Implement tests for the pure components used in reads This commit will implement tests for the PlainContainer and MetaError pure components used for the read functionality.
JavaScript
mit
netceteragroup/girders-elements
--- +++ @@ -0,0 +1,48 @@ +'use strict'; + +import React from 'react'; +import TestUtils from 'react-addons-test-utils'; +import { expect } from './support/utils'; + +import PlainContainer from '../src/read/elements/pure/plainContainer'; +import MetaError from '../src/read/elements/pure/metaError'; + +describe('Reads'...
65fbd745b299b016cb429ad75d805518721fe31f
visualize.js
visualize.js
// Convert schema.json files to dot (graphviz' markup language) // // Usage: // // `node visualize.js schema.json | dot -Tpng -oschema.png` var fs = require('fs') , _ = require('underscore') , Data = require('./data'); var schemaFile = process.ARGV[2] , schema = JSON.parse(fs.readFileSync(schemaFile, 'utf-8'))...
Add script that converts schema.json files to dot language for visualization with graphviz
Add script that converts schema.json files to dot language for visualization with graphviz
JavaScript
mit
substance/data
--- +++ @@ -0,0 +1,41 @@ +// Convert schema.json files to dot (graphviz' markup language) +// +// Usage: +// +// `node visualize.js schema.json | dot -Tpng -oschema.png` + +var fs = require('fs') +, _ = require('underscore') +, Data = require('./data'); + +var schemaFile = process.ARGV[2] +, schema = JSON.pars...
62151afee3bfd1e937d48f8219035041ca33ef3a
src/bom/Style.js
src/bom/Style.js
/* ================================================================================================== Lowland - JavaScript low level functions Copyright (C) 2012 Sebatian Fastner ================================================================================================== */ core.Module("lowland.bom.Style", {...
Add style text to DOM head
Add style text to DOM head
JavaScript
mit
fastner/lowland,fastner/lowland
--- +++ @@ -0,0 +1,20 @@ +/* +================================================================================================== + Lowland - JavaScript low level functions + Copyright (C) 2012 Sebatian Fastner +================================================================================================== +*/ + ...
e37aa6fa46f7a84996d9796d11cb9f8eeaf81fca
lib/source-mapper.js
lib/source-mapper.js
/* * source-mapper.js * * Copyright (c) 2014 Maximilian Antoni <mail@maxantoni.de> * * @license MIT */ 'use strict'; var through = require('through'); var convert = require('convert-source-map'); var sourceMap = require('source-map'); /*jslint regexp: true*/ var stackRE = /(\sat .*)?(\[stdin\]|http\:\/\/.+)...
Move and adjust code from phantomic
Move and adjust code from phantomic
JavaScript
mit
mantoni/source-mapper.js
--- +++ @@ -0,0 +1,63 @@ +/* + * source-mapper.js + * + * Copyright (c) 2014 Maximilian Antoni <mail@maxantoni.de> + * + * @license MIT + */ +'use strict'; + +var through = require('through'); +var convert = require('convert-source-map'); +var sourceMap = require('source-map'); + +/*jslint regexp: true*/ +var sta...
2569c7515ff4a7428ab34670782a8f93246db46f
test/algorithms/geometry/testTangentBetweenCircles.js
test/algorithms/geometry/testTangentBetweenCircles.js
/* eslint-env mocha */ const CircleTangents = require('../../../src').algorithms.geometry.CircleTangents; const assert = require('assert'); describe('Tangent Between Circles', () => { it('should return empty arrays if tangents do not exist (one circle is contained in the other)', () => { const circles = new Cir...
Test Tangent Between Circles: no tangents
Test Tangent Between Circles: no tangents
JavaScript
mit
ManrajGrover/algorithms-js
--- +++ @@ -0,0 +1,11 @@ +/* eslint-env mocha */ +const CircleTangents = require('../../../src').algorithms.geometry.CircleTangents; + +const assert = require('assert'); + +describe('Tangent Between Circles', () => { + it('should return empty arrays if tangents do not exist (one circle is contained in the other)', (...
9c6a2abb1e240945a435f4158a00a2deaba922db
utils/init-es.js
utils/init-es.js
var core = require("../models"); var Artwork = core.db.model("Artwork"); core.init(function() { Artwork.createMapping(function(err, mapping) { var stream = Artwork.synchronize(); var count = 0; stream.on('data', function(err, doc){ count++; //console.log('indexed ' ...
Add a utility for mapping and importing the artworks into Elasticsearch.
Add a utility for mapping and importing the artworks into Elasticsearch.
JavaScript
mit
jeresig/pharos-images
--- +++ @@ -0,0 +1,20 @@ +var core = require("../models"); + +var Artwork = core.db.model("Artwork"); + +core.init(function() { + Artwork.createMapping(function(err, mapping) { + var stream = Artwork.synchronize(); + var count = 0; + stream.on('data', function(err, doc){ + count++; ...
21989c86c39fd475a14c3dc1bfe6ffa474f229fd
Events.server.js
Events.server.js
/** * Events: * Manages the creation and retrieval of the events. * Also manages sending notifications based on events. */ (function () { 'use strict'; var Db = require('db'); var Constants = require('Constants')(); /** * Adds the given event for the given time slot. */ function add(time, e...
Add Events module for managing events
Add Events module for managing events #3
JavaScript
mit
StefvanSchuylenburg/darkville,StefvanSchuylenburg/darkville
--- +++ @@ -0,0 +1,62 @@ +/** + * Events: + * Manages the creation and retrieval of the events. + * Also manages sending notifications based on events. + */ +(function () { + 'use strict'; + + var Db = require('db'); + var Constants = require('Constants')(); + + + /** + * Adds the given event for the give...
205da483b99391f8ba934c3b30fd72792e214e08
web/parse-log.js
web/parse-log.js
"use strict"; var sqlite3 = require('sqlite3').verbose(), carrier = require('carrier'), fs = require('fs'); var db; function go() { db.run( 'CREATE TABLE IF NOT EXISTS query_log (\n' + ' query_time TIMESTAMP, \n' + ' line VARCHAR(255), \n' + ' file VARCHAR(255), \n' + ' remote_ip VARCHAR(255), \n' ...
Add a script to parse logs into sqlite.
Add a script to parse logs into sqlite.
JavaScript
bsd-2-clause
lekkas/livegrep,wfxiang08/livegrep,wfxiang08/livegrep,paulproteus/livegrep,lekkas/livegrep,paulproteus/livegrep,wfxiang08/livegrep,paulproteus/livegrep,lekkas/livegrep,lekkas/livegrep,paulproteus/livegrep,wfxiang08/livegrep,paulproteus/livegrep,paulproteus/livegrep,wfxiang08/livegrep,lekkas/livegrep,lekkas/livegrep,wfx...
--- +++ @@ -0,0 +1,56 @@ +"use strict"; + +var sqlite3 = require('sqlite3').verbose(), + carrier = require('carrier'), + fs = require('fs'); +var db; + +function go() { + db.run( +'CREATE TABLE IF NOT EXISTS query_log (\n' + +' query_time TIMESTAMP, \n' + +' line VARCHAR(255), \n' + +' file VARCHAR(255...
0518d8d3063103253d3eb82ce3933983dece6a45
10/ftp-upload.js
10/ftp-upload.js
var FTP = require('ftp'); var client = new FTP(); client.on('ready', function() { client.cwd('uploads', function(err) { if (err) throw err; client.put('ftp-upload.js', 'ftp-upload-dest.js', function(err) { if (err) throw err; client.end(); ...
Add the example to upload file to ftp server.
Add the example to upload file to ftp server.
JavaScript
mit
nicebook/Node.js-Reference,nicebook/Node.js-Reference,nicebook/Node.js-Reference
--- +++ @@ -0,0 +1,26 @@ +var FTP = require('ftp'); + +var client = new FTP(); + +client.on('ready', function() { + + client.cwd('uploads', function(err) { + + if (err) + throw err; + + client.put('ftp-upload.js', 'ftp-upload-dest.js', function(err) { + + if (err) + ...
48683808d41043d9c22b0916a3f477d10d16db10
tools/grunt-tasks/grunt-condense.js
tools/grunt-tasks/grunt-condense.js
/* condense script and link tags to a single instance of each in the specified HTML file; like grunt-usemin but less confusing and more dumb example config: condense: { dist: { file: 'build/app/index.html', script: 'js/all.js', stylesheet: 'css/all.css' } } */ module.exports = function (grunt) { var...
/* condense script and link tags to a single instance of each in the specified HTML file; like grunt-usemin but less confusing and more dumb example config: condense: { dist: { file: 'build/app/index.html', script: 'js/all.js', stylesheet: 'css/all.css' } } */ module.exports = function (grunt) { var...
Use async attribute on the script tag for our single script
Use async attribute on the script tag for our single script We are loading a single script (in the minified/compiled/built version of the app). Because the JS loads the HTML fragment and then decorates it in the correct order, we can do this asynchronously after the DOM has fully loaded.
JavaScript
apache-2.0
01org/webapps-memory-match,01org/webapps-memory-match,dliu32x/webapps-memory-match,rattasapa/webapps-memory-match,modulexcite/webapps-memory-match,modulexcite/webapps-memory-match,rattasapa/webapps-memory-match
--- +++ @@ -27,7 +27,7 @@ content = content.replace(/<script.*?src.*?.+?><\/script>/g, ''); // add single <script> just before the closing </body> - var html = '<script src="' + script + '"></script></body>'; + var html = '<script async="async" src="' + script + '"></script></body>'; content = ...
a49ae559bd3085f870cbc7473593de4f4d39db63
app/shared/modals/payment-terms/PaymentTermsModal.js
app/shared/modals/payment-terms/PaymentTermsModal.js
import React from 'react'; import PropTypes from 'prop-types'; import Modal from 'react-bootstrap/lib/Modal'; import injectT from '../../../i18n/injectT'; function PaymentTermsModal({ isOpen, onDismiss, t, }) { return ( <Modal className="app-PaymentTermsModal" onHide={onDismiss} show={is...
Add new modal for payment terms and conditions
Add new modal for payment terms and conditions
JavaScript
mit
fastmonkeys/respa-ui
--- +++ @@ -0,0 +1,36 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import Modal from 'react-bootstrap/lib/Modal'; + +import injectT from '../../../i18n/injectT'; + +function PaymentTermsModal({ + isOpen, + onDismiss, + t, +}) { + return ( + <Modal + className="app-PaymentTermsModal...
39b7cd5051df439e9579b23b0c2061b589982833
camera/index.js
camera/index.js
var spawn = require('child_process').spawn; var exports = module.exports = {}; // Trigger the start of a preview mjpeg stream from the camera exports.startPreview = function(){ return new Promise(function(resolve, reject){ var mjpegStream = spawn('node', ['node_modules/raspberry-pi-mjpeg-server/raspberry-pi-mj...
Add camera module for starting/stopping camera functions
Add camera module for starting/stopping camera functions
JavaScript
mit
sdunham/pi-booth,sdunham/pi-booth
--- +++ @@ -0,0 +1,45 @@ +var spawn = require('child_process').spawn; + +var exports = module.exports = {}; + +// Trigger the start of a preview mjpeg stream from the camera +exports.startPreview = function(){ + return new Promise(function(resolve, reject){ + + var mjpegStream = spawn('node', ['node_modules/raspb...
9b0e50e747392e0e547a83790a66412fea74b7c2
components/index.js
components/index.js
import './utils/polyfills'; // Import polyfills for IE11 export App from './app'; export AppBar from './app_bar'; export Autocomplete from './autocomplete'; export Avatar from './avatar'; export Button from './button/Button'; export IconButton from './button/IconButton'; export * from './card'; export Checkbox from './...
import './utils/polyfills'; // Import polyfills for IE11 export App from './app'; export AppBar from './app_bar'; export Autocomplete from './autocomplete'; export Avatar from './avatar'; export Button from './button/Button'; export IconButton from './button/IconButton'; export * from './card'; export Checkbox from './...
Change capitalization to match the filesystem exactly.
Change capitalization to match the filesystem exactly.
JavaScript
mit
react-toolbox/react-toolbox,rubenmoya/react-toolbox,showings/react-toolbox,rubenmoya/react-toolbox,soyjavi/react-toolbox,jasonleibowitz/react-toolbox,soyjavi/react-toolbox,rubenmoya/react-toolbox,showings/react-toolbox,KerenChandran/react-toolbox,KerenChandran/react-toolbox,react-toolbox/react-toolbox,jasonleibowitz/re...
--- +++ @@ -19,7 +19,7 @@ export ListItem from './list/ListItem'; export ListDivider from './list/ListDivider'; export ListCheckbox from './list/ListCheckbox'; -export ListSubHeader from './list/ListSubHeader'; +export ListSubHeader from './list/ListSubheader'; export Menu from './menu/Menu'; export MenuItem fro...
49879b12aa8125ed24151feb1cbf315399b0e6eb
js/foam/lib/gmail/Sync.js
js/foam/lib/gmail/Sync.js
CLASS({ package: 'foam.lib.gmail', name: 'Sync', extendsModel: 'foam.core.dao.Sync', requires: [ 'FOAMGMailMessage' ], methods: { purge: function(ret, remoteLocal) { // Drafts that were created and sent from the client with no sync in // between, do not get marked as deleted. However if...
Add a GMail specific sync that has special logic for purging sent drafts created on the client.
Add a GMail specific sync that has special logic for purging sent drafts created on the client.
JavaScript
apache-2.0
osric-the-knight/foam,jacksonic/foam,osric-the-knight/foam,jacksonic/foam,foam-framework/foam,osric-the-knight/foam,jlhughes/foam,mdittmer/foam,mdittmer/foam,mdittmer/foam,jlhughes/foam,foam-framework/foam,jacksonic/foam,foam-framework/foam,jlhughes/foam,foam-framework/foam,osric-the-knight/foam,foam-framework/foam,jac...
--- +++ @@ -0,0 +1,23 @@ +CLASS({ + package: 'foam.lib.gmail', + name: 'Sync', + extendsModel: 'foam.core.dao.Sync', + requires: [ + 'FOAMGMailMessage' + ], + methods: { + purge: function(ret, remoteLocal) { + // Drafts that were created and sent from the client with no sync in + // between, do ...
2598d76775b8824fcf9326a73c8c4e590cbc28eb
js/hr-challenges/algo-06-birthday-choco.js
js/hr-challenges/algo-06-birthday-choco.js
/** * https://www.hackerrank.com/challenges/the-birthday-bar/problem * * Lily has a chocolate bar consisting of a row of n squares where each square * has an integer written on it. She wants to share it with Ron for his birthday, * which falls on month m and day d. Lily wants to give Ron a piece of chocolate ...
Add birthday chocolate challenge solution
Add birthday chocolate challenge solution
JavaScript
mit
petarov/sandbox,petarov/sandbox,petarov/sandbox,petarov/sandbox,petarov/sandbox,petarov/sandbox,petarov/sandbox,petarov/sandbox,petarov/sandbox
--- +++ @@ -0,0 +1,70 @@ +/** + * https://www.hackerrank.com/challenges/the-birthday-bar/problem + * + * Lily has a chocolate bar consisting of a row of n squares where each square + * has an integer written on it. She wants to share it with Ron for his birthday, + * which falls on month m and day d. Lily wants to...
8436b9d61cbad4db54e88ce08178ceffba5ca1e4
src/algorithms/geometry/vector_operations2d.js
src/algorithms/geometry/vector_operations2d.js
/** * Performs the cross product between two vectors. * @param A vector object, example: {x : 0,y : 0} * @param A vector object, example: {x : 0,y : 0} * @return The result of the cross product between u and v. */ const crossProduct = (u, v) => { return u.x*v.y - u.y*v.x; }; /** * @param A point object, exampl...
Add operations for 2d vectors
Add operations for 2d vectors
JavaScript
mit
felipernb/algorithms.js
--- +++ @@ -0,0 +1,25 @@ +/** + * Performs the cross product between two vectors. + * @param A vector object, example: {x : 0,y : 0} + * @param A vector object, example: {x : 0,y : 0} + * @return The result of the cross product between u and v. + */ +const crossProduct = (u, v) => { + return u.x*v.y - u.y*v.x; +}; +...
f8b67604f9883c6c830312b54634a942e9471e68
16/ninja-basic.js
16/ninja-basic.js
var Image = require('image-ninja'); var dirpath = 'images/'; var imgname = 'download-logo.png'; var tmppath = 'tmp/' var image = new Image(dirpath + imgname); image .width(1000) .height(1000) .save(tmppath + imgname) .then(function (newImage) { console.log('Done.'); });
Add the example to adjust image's width/height via ninja.
Add the example to adjust image's width/height via ninja.
JavaScript
mit
nicebook/Node.js-Reference,nicebook/Node.js-Reference,nicebook/Node.js-Reference
--- +++ @@ -0,0 +1,15 @@ +var Image = require('image-ninja'); + +var dirpath = 'images/'; +var imgname = 'download-logo.png'; +var tmppath = 'tmp/' + +var image = new Image(dirpath + imgname); + +image + .width(1000) + .height(1000) + .save(tmppath + imgname) + .then(function (newImage) { + console.log('Done.'...
f21bbb8fb2998742c62c9c30f68551729b17c844
app/assets/javascripts/app.js
app/assets/javascripts/app.js
(function(){ 'use strict'; angular .module('shareMark', ['ui.router', 'templates', 'ngclipboard']) .config(function($stateProvider, $urlRouterProvider){ $urlRouterProvider.otherwise('/'); $stateProvider .state('home', { url: "/", template: "<home></home>" }) ...
Set up ui-router, add angular-rails-templates and ngclipboard as dependencies
Set up ui-router, add angular-rails-templates and ngclipboard as dependencies
JavaScript
mit
Dom-Mc/shareMark,Dom-Mc/shareMark,Dom-Mc/shareMark
--- +++ @@ -0,0 +1,33 @@ +(function(){ + 'use strict'; + + angular + .module('shareMark', ['ui.router', 'templates', 'ngclipboard']) + .config(function($stateProvider, $urlRouterProvider){ + + $urlRouterProvider.otherwise('/'); + + $stateProvider + .state('home', { + url: "/", + t...
ff4ad58f56aebd8b6069f45c1b630f7667bfffc0
lib/wrap/prefix.js
lib/wrap/prefix.js
/* Riot WIP, @license MIT, (c) 2015 Muut Inc. + contributors */ ;(function() { var riot = { version: 'WIP', settings: {} } 'use strict'
/* Riot WIP, @license MIT, (c) 2015 Muut Inc. + contributors */ ;(function() { var riot = { version: 'WIP', // a secret backdoor to private vars // allows to share methods with external components, // e.g. cli.js, compiler.js from jsdelivr, tests, // while still keeping our code ...
Add riot.(var) backdoor to riot's private vars (for compiler, tests, etc)
Add riot.(var) backdoor to riot's private vars (for compiler, tests, etc)
JavaScript
mit
stonexer/riot,baysao/riot,crisward/riot,marcioj/riot,thepian/riot,marciojcoelho/riotjs,dp-lewis/riot,beni55/riot,qrb/riotjs,xtity/riot,dp-lewis/riot,sylvainpolletvillard/riot,rsbondi/riotjs,tao-zeng/riot,GerHobbelt/riotjs,rasata/riot,noodle-learns-programming/riot,ListnPlay/riotjs,crisward/riot,txchen/riotjs,rthbound/r...
--- +++ @@ -2,6 +2,16 @@ ;(function() { - var riot = { version: 'WIP', settings: {} } + var riot = { + + version: 'WIP', + + // a secret backdoor to private vars + // allows to share methods with external components, + // e.g. cli.js, compiler.js from jsdelivr, tests, + // while st...
2697c44ed205940116f9fd814a3f6175c4e75f7d
app/serializers/researcher.js
app/serializers/researcher.js
// // import { Serializer } from 'ember-graphql-adapter'; // // import { singularize } from "ember-inflector"; // // import { camelize } from "@ember/string"; // // export default Serializer.extend({ // // normalizeResponse(store, primaryModelClass, payload, id, requestType) { // // // hack: swap `all` root quer...
Revert "remove un used file"
Revert "remove un used file" This reverts commit 76a91f84cd37c936e0caa020bdfac1b15e843703.
JavaScript
mit
datacite/bracco,datacite/bracco,datacite/bracco,datacite/bracco
--- +++ @@ -0,0 +1,38 @@ +// // import { Serializer } from 'ember-graphql-adapter'; +// // import { singularize } from "ember-inflector"; +// // import { camelize } from "@ember/string"; + +// // export default Serializer.extend({ +// // normalizeResponse(store, primaryModelClass, payload, id, requestType) { +// //...
cedfb0f0bb5b9fcea39c0c7604107038281e7ae1
server/openstorefront/openstorefront-web/src/main/webapp/client/scripts/component/savedSearchLinkInsertWindow.js
server/openstorefront/openstorefront-web/src/main/webapp/client/scripts/component/savedSearchLinkInsertWindow.js
/* * Copyright 2016 Space Dynamics Laboratory - Utah State University Research Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICE...
Add saved search selection window
Add saved search selection window We add a window which can be used to select a saved search from which a link may be embedded.
JavaScript
apache-2.0
jbottel/openstorefront,jbottel/openstorefront,jbottel/openstorefront,jbottel/openstorefront
--- +++ @@ -0,0 +1,43 @@ +/* + * Copyright 2016 Space Dynamics Laboratory - Utah State University Research Foundation. + * + * 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 + * + * ...
5f4a682b991bae07e0ac25df0f2d93cbc6b78473
benchmarks/hifiqa-master/measureTimingHifiQA-19Q4-staging2.js
benchmarks/hifiqa-master/measureTimingHifiQA-19Q4-staging2.js
Script.include("../BenchmarkLib.js"); var TRACING_RULES = "" + "trace.*=true\n" + "*.detail=true\n" + ""; Resources.overrideUrlPrefix(TEST_ROOT, Script.resolvePath("..")); var testScript = new TestScript(); testScript.addTest({ name: "measureTimingHifiqa-19Q4-staging2", loader: TestScript.location...
Create a new perf test for the new content
Create a new perf test for the new content
JavaScript
apache-2.0
highfidelity/hifi_tests,highfidelity/hifi_tests,highfidelity/hifi_tests
--- +++ @@ -0,0 +1,24 @@ +Script.include("../BenchmarkLib.js"); + +var TRACING_RULES = "" + + "trace.*=true\n" + + "*.detail=true\n" + + ""; + +Resources.overrideUrlPrefix(TEST_ROOT, Script.resolvePath("..")); +var testScript = new TestScript(); +testScript.addTest({ + name: "measureTimingHifiqa-19Q4-stag...
95986222a1313f9eb37651adf0ed9270c9a8961f
migrations/20170326151414_add_event_id_for_feed_items.js
migrations/20170326151414_add_event_id_for_feed_items.js
exports.up = function(knex, Promise) { return knex.schema.table('feed_items', function(table) { table.integer('event_id').index(); table.foreign('event_id') .references('id') .inTable('events') .onDelete('RESTRICT') .onUpdate('CASCADE'); }); }; exports.down = function(knex, Promise...
Add event_id column to feed_items table
Add event_id column to feed_items table
JavaScript
mit
kaupunki-apina/prahapp-backend,futurice/wappuapp-backend,kaupunki-apina/prahapp-backend,futurice/wappuapp-backend
--- +++ @@ -0,0 +1,17 @@ + +exports.up = function(knex, Promise) { + return knex.schema.table('feed_items', function(table) { + table.integer('event_id').index(); + table.foreign('event_id') + .references('id') + .inTable('events') + .onDelete('RESTRICT') + .onUpdate('CASCADE'); + }); +}; ...
f8e10ed2f67af93d6a4c00099959af6821c9051e
frontend_tests/node_tests/common.js
frontend_tests/node_tests/common.js
var common = require("js/common.js"); set_global('$', function (f) { if (f === '#home') { return [{ focus: function () {} }]; } f(); }); (function test_basics() { common.autofocus('#home'); }());
Add test coverage to autofocus.
node_tests: Add test coverage to autofocus.
JavaScript
apache-2.0
timabbott/zulip,brainwane/zulip,hackerkid/zulip,andersk/zulip,jrowan/zulip,brockwhittaker/zulip,synicalsyntax/zulip,punchagan/zulip,rishig/zulip,shubhamdhama/zulip,jrowan/zulip,j831/zulip,shubhamdhama/zulip,zulip/zulip,synicalsyntax/zulip,mahim97/zulip,vabs22/zulip,showell/zulip,jackrzhang/zulip,timabbott/zulip,tommyip...
--- +++ @@ -0,0 +1,12 @@ +var common = require("js/common.js"); + +set_global('$', function (f) { + if (f === '#home') { + return [{ focus: function () {} }]; + } + f(); +}); + +(function test_basics() { + common.autofocus('#home'); +}());
86d9855400fcbbd53e84e1668b92ba14abcf5d34
scripts/babel-relay-plugin/src/__tests__/BuildChecker-test.js
scripts/babel-relay-plugin/src/__tests__/BuildChecker-test.js
/** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @fullSyntaxTrans...
Add Build Checker for OSS Plugin
Relay: Add Build Checker for OSS Plugin Summary: I keep forgetting to do this. Others will, too. This adds a test that makes sure that `lib/` matches `src/`. Reviewed By: @josephsavona Differential Revision: D2520980 fb-gh-sync-id: ab8881ea0d22aed9b863ce52c276e263073ecce3
JavaScript
mit
venepe/relay,yungsters/relay,voideanvalue/relay,NevilleS/relay,cesarandreu/relay,IlyasM/relayWorking,chentsulin/relay,iamchenxin/relay,cpojer/relay,facebook/relay,xuorig/relay,almasakchabayev/relay,josephsavona/relay,facebook/relay,freiksenet/relay,atxwebs/relay,wincent/relay,gabelevi/relay,facebook/relay,dbslone/relay...
--- +++ @@ -0,0 +1,60 @@ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same...
e639dd204db6cd8dfffa0f70f711988c8048f72e
rules.js
rules.js
{ "rules": { // All data is readable by anyone. ".read": true, "people": { // A list of users with their names on the site. "$userid": { // Only the user can write their own entry into this list. ".write": "$userid == auth.id" } }, "users": { "$userid": { ...
Check if syntax highlighting is better with .js
Check if syntax highlighting is better with .js
JavaScript
mit
dieface/firefeed,googlearchive/firefeed,prisacaru/firefeed,googlearchive/firefeed,prisacaru/firefeed,prisacaru/firefeed,dieface/firefeed,googlearchive/firefeed,prisacaru/firefeed,dieface/firefeed,googlearchive/firefeed,dieface/firefeed
--- +++ @@ -0,0 +1,65 @@ +{ + "rules": { + // All data is readable by anyone. + ".read": true, + "people": { + // A list of users with their names on the site. + "$userid": { + // Only the user can write their own entry into this list. + ".write": "$userid == auth.id" + } + }...
8f5ac9ea7ebf07fb3debc18657f4ba43503d1240
src/js/framework/dom.js
src/js/framework/dom.js
import {styler as Styler} from "./styler"; class DOM { constructor() { this.cache = {}; } get controls() { if (this.cache.controls) { return this.cache.controls; } return this.cache.controls = this.reveal.querySelector(".controls"); } get controlsLock() { if (this.cache.controlsLock) { retu...
Add helper for retrieving specific DOM elements
Add helper for retrieving specific DOM elements
JavaScript
mit
tdg5/js4pm,tdg5/js4pm,tdg5/front-end-skills-for-pms,tdg5/front-end-skills-for-pms
--- +++ @@ -0,0 +1,34 @@ +import {styler as Styler} from "./styler"; + +class DOM { + constructor() { + this.cache = {}; + } + + get controls() { + if (this.cache.controls) { return this.cache.controls; } + return this.cache.controls = this.reveal.querySelector(".controls"); + } + + get controlsLock() {...
80555770d64384332f2f1c18cf93232097027933
http/examples/random-user/random-user.js
http/examples/random-user/random-user.js
import Cycle from '@cycle/core'; import {h, makeDOMDriver} from '@cycle/web'; import {makeHTTPDriver} from '@cycle/http'; function main(responses) { const USERS_URL = 'http://jsonplaceholder.typicode.com/users/'; let getRandomUser$ = responses.DOM.get('.get-random-user', 'click') .map(() => { let randomN...
Add "get random user" example
Add "get random user" example
JavaScript
mit
maskinoshita/cyclejs,cyclejs/cycle-core,cyclejs/cyclejs,ntilwalli/cyclejs,usm4n/cyclejs,usm4n/cyclejs,feliciousx-open-source/cyclejs,ntilwalli/cyclejs,staltz/cycle,cyclejs/cycle-core,maskinoshita/cyclejs,ntilwalli/cyclejs,usm4n/cyclejs,maskinoshita/cyclejs,feliciousx-open-source/cyclejs,maskinoshita/cyclejs,usm4n/cycle...
--- +++ @@ -0,0 +1,32 @@ +import Cycle from '@cycle/core'; +import {h, makeDOMDriver} from '@cycle/web'; +import {makeHTTPDriver} from '@cycle/http'; + +function main(responses) { + const USERS_URL = 'http://jsonplaceholder.typicode.com/users/'; + let getRandomUser$ = responses.DOM.get('.get-random-user', 'click') ...
41712642e22faaeddb9d850d37b22d8e1429aa8f
ui/browser/browser-style.js
ui/browser/browser-style.js
/* Copyright 2016 Mozilla Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed u...
Create a single Style instance for the entire browser
Create a single Style instance for the entire browser Signed-off-by: Victor Porof <7d8eebacd0931807085fa6b9af29638ed74e0886@mozilla.com>
JavaScript
apache-2.0
jsantell/tofino,mozilla/tofino,jsantell/tofino,jsantell/tofino,mozilla/tofino,bgrins/tofino,bgrins/tofino,mozilla/tofino,victorporof/tofino,jsantell/tofino,mozilla/tofino,bgrins/tofino,bgrins/tofino,victorporof/tofino
--- +++ @@ -0,0 +1,15 @@ +/* +Copyright 2016 Mozilla + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to ...
a5d6e22390cf381767bdd57757211081f973711f
js/components/module-wire.js
js/components/module-wire.js
(function(app) { 'use strict'; var jCore = require('jcore'); var helper = app.helper || require('../helper.js'); var ModuleWire = helper.inherits(function() { ModuleWire.super_.call(this); }, jCore.Component); if (typeof module !== 'undefined' && module.exports) module.exports = ModuleWire; els...
Add a constructor for a component of the module wire
Add a constructor for a component of the module wire
JavaScript
mit
ionstage/modular,ionstage/modular
--- +++ @@ -0,0 +1,15 @@ +(function(app) { + 'use strict'; + + var jCore = require('jcore'); + var helper = app.helper || require('../helper.js'); + + var ModuleWire = helper.inherits(function() { + ModuleWire.super_.call(this); + }, jCore.Component); + + if (typeof module !== 'undefined' && module.exports) ...
bb8dbc205387dc84799140dd53f12c9f6ee92df5
server/migrations/20140722230151-change-recyclingAvailable-to-integer-on-reports-table.js
server/migrations/20140722230151-change-recyclingAvailable-to-integer-on-reports-table.js
module.exports = { up: function(migration, DataTypes, done) { migration.changeColumn( 'reports', 'recyclingAvailable', {type: "integer USING 0"} ).complete(done); }, down: function(migration, DataTypes, done) { migration.changeColumn('reports', 'recyclingAvailable', {type: "boolean u...
Change recyclingAvailable column type to integer
Change recyclingAvailable column type to integer
JavaScript
mit
open-city/recycling,open-city/recycling,open-austin/mybuildingdoesntrecycle,open-city/recycling,open-austin/mybuildingdoesntrecycle,davidjamesknight/recycling,open-austin/mybuildingdoesntrecycle,davidjamesknight/recycling,davidjamesknight/recycling
--- +++ @@ -0,0 +1,12 @@ +module.exports = { + up: function(migration, DataTypes, done) { + migration.changeColumn( + 'reports', + 'recyclingAvailable', + {type: "integer USING 0"} + ).complete(done); + }, + down: function(migration, DataTypes, done) { + migration.changeColumn('reports', 'r...
2a5bedd9051c1e77ffff22b527ac53eecbb04b9d
src/storage/sessionStorage.js
src/storage/sessionStorage.js
const DEFAULT_KEY = 'redux-simple-auth-session' export default ({ key = DEFAULT_KEY } = {}) => ({ persist: data => { sessionStorage.setItem(key, JSON.stringify(data || {})) }, restore: () => JSON.parse(sessionStorage.getItem(key)) || {} })
Write a session storage implementation
Write a session storage implementation
JavaScript
mit
jerelmiller/redux-simple-auth
--- +++ @@ -0,0 +1,8 @@ +const DEFAULT_KEY = 'redux-simple-auth-session' + +export default ({ key = DEFAULT_KEY } = {}) => ({ + persist: data => { + sessionStorage.setItem(key, JSON.stringify(data || {})) + }, + restore: () => JSON.parse(sessionStorage.getItem(key)) || {} +})
52c592d303fa43837c85c01cad69e787d74c6c93
config/dependency-lint.js
config/dependency-lint.js
/* eslint-env node */ 'use strict'; module.exports = { allowedVersions: { 'ember-getowner-polyfill': '^1.0.0 || ^2.0.0', 'ember-inflector': '^1.0.0 || ^2.0.0', 'ember-hash-helper-polyfill': '^0.1.2 || ^0.2.0' // workaround for dep. conflict ember-tooltips/liquid-fire } };
/* eslint-env node */ 'use strict'; module.exports = { allowedVersions: { 'ember-get-config': '^0.2.0', // workaround for dep. conflict ember-cli-mirage/ember-light-table 'ember-getowner-polyfill': '^1.0.0 || ^2.0.0', 'ember-inflector': '^1.0.0 || ^2.0.0', 'ember-hash-helper-polyfill': '^0.1.2 || ^0....
Allow range of ember-get-config versions
Allow range of ember-get-config versions
JavaScript
mit
jrjohnson/frontend,djvoa12/frontend,ilios/frontend,ilios/frontend,djvoa12/frontend,thecoolestguy/frontend,dartajax/frontend,jrjohnson/frontend,dartajax/frontend,thecoolestguy/frontend
--- +++ @@ -3,6 +3,7 @@ module.exports = { allowedVersions: { + 'ember-get-config': '^0.2.0', // workaround for dep. conflict ember-cli-mirage/ember-light-table 'ember-getowner-polyfill': '^1.0.0 || ^2.0.0', 'ember-inflector': '^1.0.0 || ^2.0.0', 'ember-hash-helper-polyfill': '^0.1.2 || ^0.2.0...
72ba56e76d83c0cd0082ffcb17718c0db4fc9c15
server/db/db.js
server/db/db.js
const mongoose = require('mongoose'); mongoose.connect('mongodb://localhost/codr'); var db = mongoose.connection; db.on('error', console.error.bind(console, 'connection error:')); db.once('open', function() { // we're connected to codr! });
Set up database in mongoose
Set up database in mongoose
JavaScript
mit
OrderlyPhoenix/OrderlyPhoenix,OrderlyPhoenix/OrderlyPhoenix
--- +++ @@ -0,0 +1,10 @@ +const mongoose = require('mongoose'); + +mongoose.connect('mongodb://localhost/codr'); + +var db = mongoose.connection; + +db.on('error', console.error.bind(console, 'connection error:')); +db.once('open', function() { + // we're connected to codr! +});
86f35f94e89e201263e008a171525bfe6c302b7c
test/specs/deleteFile.spec.js
test/specs/deleteFile.spec.js
var path = require("path"), fileExists = require("exists-file").sync, directoryExists = require("directory-exists").sync; var localFilePath = path.resolve(__dirname, "../testContents/text document.txt"), localDirPath = path.resolve(__dirname, "../testContents/sub1"); describe("deleteFile", function() { ...
Add tests for deleteFile (failing due to webdav-server DELETE bug)
Add tests for deleteFile (failing due to webdav-server DELETE bug)
JavaScript
mit
perry-mitchell/webdav-client,perry-mitchell/webdav-client
--- +++ @@ -0,0 +1,49 @@ +var path = require("path"), + fileExists = require("exists-file").sync, + directoryExists = require("directory-exists").sync; + +var localFilePath = path.resolve(__dirname, "../testContents/text document.txt"), + localDirPath = path.resolve(__dirname, "../testContents/sub1"); + +des...
2839dbc4204609571a2ccb7167970dde201be6f4
core/client/tests/test-helper.js
core/client/tests/test-helper.js
import resolver from './helpers/resolver'; import { setResolver } from 'ember-mocha'; setResolver(resolver); /* jshint ignore:start */ mocha.setup({ timeout: 5000, slow: 500 }); /* jshint ignore:end */
import resolver from './helpers/resolver'; import { setResolver } from 'ember-mocha'; setResolver(resolver); /* jshint ignore:start */ mocha.setup({ timeout: 15000, slow: 500 }); /* jshint ignore:end */
Increase timeout in ember tests
Increase timeout in ember tests no issue - increases individual test timeout from 5sec to 15sec It seems Travis is occasionally _very_ slow and will timeout on heavier acceptance tests resulting in random failures. Hopefully this will reduce the number of random test failures we see.
JavaScript
mit
RufusMbugua/TheoryOfACoder,benstoltz/Ghost,allanjsx/Ghost,acburdine/Ghost,barbastan/Ghost,daimaqiao/Ghost-Bridge,ngosinafrica/SiteForNGOs,kaychaks/kaushikc.org,kevinansfield/Ghost,hnarayanan/narayanan.co,Japh/shortcoffee,petersucks/blog,syaiful6/Ghost,chris-yoon90/Ghost,edsadr/Ghost,weareleka/blog,madole/diverse-learne...
--- +++ @@ -5,7 +5,7 @@ /* jshint ignore:start */ mocha.setup({ - timeout: 5000, + timeout: 15000, slow: 500 }); /* jshint ignore:end */
ce7533923404c8bd74b5b767c27cde0f4765b444
modules/openlmis-web/src/main/webapp/public/js/vaccine/inventory/module/inventory-module.js
modules/openlmis-web/src/main/webapp/public/js/vaccine/inventory/module/inventory-module.js
/* * Electronic Logistics Management Information System (eLMIS) is a supply chain management system for health commodities in a developing country setting. * * Copyright (C) 2015 Clinton Health Access Initiative (CHAI). This program was produced for the U.S. Agency for International Development (USAID). It was prepa...
Add Stock on Hand Module
Add Stock on Hand Module
JavaScript
agpl-3.0
USAID-DELIVER-PROJECT/elmis,OpenLMIS/open-lmis,USAID-DELIVER-PROJECT/elmis,OpenLMIS/open-lmis,USAID-DELIVER-PROJECT/elmis,USAID-DELIVER-PROJECT/elmis,OpenLMIS/open-lmis,OpenLMIS/open-lmis
--- +++ @@ -0,0 +1,31 @@ +/* + * Electronic Logistics Management Information System (eLMIS) is a supply chain management system for health commodities in a developing country setting. + * + * Copyright (C) 2015 Clinton Health Access Initiative (CHAI). This program was produced for the U.S. Agency for International De...
4b1ec7b112d30e0888f8361b01561241d8c301e4
spec/appSpec.js
spec/appSpec.js
/* eslint-env jasmine */ describe('Launching the app', () => { it('creates a visible window', async () => { const Application = require('spectron').Application let app = new Application({ path: 'node_modules/.bin/electron', args: ['built/index.js'] }) await app.start() // expect(app.b...
Test if the app window is visible
Test if the app window is visible
JavaScript
agpl-3.0
briandk/transcriptase,briandk/transcriptase
--- +++ @@ -0,0 +1,15 @@ +/* eslint-env jasmine */ + +describe('Launching the app', () => { + it('creates a visible window', async () => { + const Application = require('spectron').Application + let app = new Application({ + path: 'node_modules/.bin/electron', + args: ['built/index.js'] + }) + ...
f0f71c7845c3da22db40df6013e09cfe7beecc46
expository/towerOfHanoi.js
expository/towerOfHanoi.js
'use strict'; /* * Hannoi * * Tower solved progress look like as below: * * | | | | | | | | | 1 | | * | 1 | => | | | => | | | => 2 | | * | 2 | | | 1 3 | 1 3 | | * 4 3 | 4 3 2 4 | 2 4 | | * * The less one must be set on the top of the greater one. * Greater and less one represe...
Add tower of hannoi problem.
Add tower of hannoi problem.
JavaScript
mit
vanpipy/AlgorithmsBase
--- +++ @@ -0,0 +1,24 @@ +'use strict'; + +/* + * Hannoi + * + * Tower solved progress look like as below: + * + * | | | | | | | | | 1 | | + * | 1 | => | | | => | | | => 2 | | + * | 2 | | | 1 3 | 1 3 | | + * 4 3 | 4 3 2 4 | 2 4 | | + * + * The less one must be set on the top of the grea...
0483d3505810bd8aabd2aeafc26bfda816813f5a
app/projects/model.js
app/projects/model.js
var mongoose = require('mongoose'); var schema = require('validate'); var Project = mongoose.model('Project', { name: {type: String, unique: true}, created: {type: Date, default: new Date()}, rating: {type: Number, default: 0} }); var validate = function (project) { var test = schema({ name: { required: ...
Write simple schema for projects
Write simple schema for projects
JavaScript
mit
hacksu/kenthackenough,hacksu/kenthackenough
--- +++ @@ -0,0 +1,68 @@ +var mongoose = require('mongoose'); +var schema = require('validate'); + +var Project = mongoose.model('Project', { + name: {type: String, unique: true}, + created: {type: Date, default: new Date()}, + rating: {type: Number, default: 0} +}); + +var validate = function (project) { + var te...
bf00ce887f1f0a8887a05121cc2cca8ffb00c7ea
mapreduce_jobs.js
mapreduce_jobs.js
/* Functions for extracting stats. * To run these, start the mongo shell w/ the processed db and this file: * mongo --shell processed mapreduce_jobs.js * ... then call functions. * If you need more specifics, like job completion times, it may be easier * to just copy/paste the lines into the mongo shell. */ //...
Add sample MapReduce stats jobs
Add sample MapReduce stats jobs To compute the most popular locations, projects, etc.
JavaScript
mit
emarschner/gothub,emarschner/gothub,emarschner/gothub,emarschner/gothub
--- +++ @@ -0,0 +1,66 @@ +/* Functions for extracting stats. + * To run these, start the mongo shell w/ the processed db and this file: + * mongo --shell processed mapreduce_jobs.js + * ... then call functions. + * If you need more specifics, like job completion times, it may be easier + * to just copy/paste the li...
c7932da821fb5b11ec76a9aedeafe17d9d6dfdb3
week-7/variables-objects.js
week-7/variables-objects.js
// JavaScript Variables and Objects // I worked on this challenge alone // __________________________________________ // Write your code below. var secretNumber = 7 var password = "just open the door" var allowedIn = false var members = [] members[0] = "John" members[3] = "Mary" // ______________________________...
Add file with all test passing
Add file with all test passing
JavaScript
mit
Michael-Jas/phase-0,Michael-Jas/phase-0,Michael-Jas/phase-0
--- +++ @@ -0,0 +1,82 @@ + // JavaScript Variables and Objects + +// I worked on this challenge alone + +// __________________________________________ +// Write your code below. + +var secretNumber = 7 +var password = "just open the door" +var allowedIn = false +var members = [] +members[0] = "John" +members[3] = "Ma...
143d05297d369507d04044bf8161eb0c64c935b3
src/utils/package_description.js
src/utils/package_description.js
/** * @license Apache-2.0 * * Copyright (c) 2021 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
Add utility to return a package description for a specified version
Add utility to return a package description for a specified version
JavaScript
apache-2.0
stdlib-js/www,stdlib-js/www,stdlib-js/www
--- +++ @@ -0,0 +1,45 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2021 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses...
d377f6d6e45f3593403b27cf3e828268bb7a1fec
js/views/modals/about/BTCTicker.js
js/views/modals/about/BTCTicker.js
import loadTemplate from '../../../utils/loadTemplate'; import baseVw from '../../baseVw'; import { getExchangeRate } from '../../../utils/currency'; import app from '../../../app'; const RATE_EXPIRY_S = '300'; export default class extends baseVw { constructor(options = {}) { super({ className: 'aboutBTC...
import loadTemplate from '../../../utils/loadTemplate'; import baseVw from '../../baseVw'; import { getExchangeRate } from '../../../utils/currency'; import app from '../../../app'; const RATE_EXPIRY_S = '300'; export default class extends baseVw { constructor(options = {}) { super({ className: 'aboutBTC...
Remove unused classes in btc ticker.
Remove unused classes in btc ticker.
JavaScript
mit
jjeffryes/openbazaar-desktop,srhoulam/openbazaar-desktop,OpenBazaar/openbazaar-desktop,jjeffryes/openbazaar-desktop,srhoulam/openbazaar-desktop,jashot7/openbazaar-desktop,OpenBazaar/openbazaar-desktop,srhoulam/openbazaar-desktop,jashot7/openbazaar-desktop,jjeffryes/openbazaar-desktop,OpenBazaar/openbazaar-desktop,jasho...
--- +++ @@ -9,7 +9,7 @@ export default class extends baseVw { constructor(options = {}) { super({ - className: 'aboutBTCTicker pureFlex alwaysFirst', + className: 'aboutBTCTicker', ...options, });
7bc2711c29d39466d1bfec43ac85bf936fe7a49f
test/coffee_script_redux_test.js
test/coffee_script_redux_test.js
var empower = require('../lib/empower'), CoffeeScript = require('coffee-script-redux'), q = require('qunitjs'), util = require('util'), tap = (function (qu) { var qunitTap = require("qunit-tap").qunitTap; var tap = qunitTap(qu, util.puts, {showSourceOnFailure: false}); qu.init();...
Add test for CoffeeScriptRedux support.
Add test for CoffeeScriptRedux support.
JavaScript
mit
twada/empower-core,falsandtru/power-assert,power-assert-js/power-assert,twada/power-assert,yagitoshiro/power-assert,twada/power-assert,power-assert-js/empower,power-assert-js/power-assert,twada/empower-core,falsandtru/power-assert,azu/power-assert,saneyuki/power-assert,yagitoshiro/power-assert,power-assert-js/empower,j...
--- +++ @@ -0,0 +1,31 @@ +var empower = require('../lib/empower'), + CoffeeScript = require('coffee-script-redux'), + q = require('qunitjs'), + util = require('util'), + tap = (function (qu) { + var qunitTap = require("qunit-tap").qunitTap; + var tap = qunitTap(qu, util.puts, {showSourceOnFa...
a37c35478735ffd52fb8ef0a7d409a5ab678a30d
logic/account/suspensionChecker.js
logic/account/suspensionChecker.js
var redisClient = require('../redis_client/redisClient').getClient() var configuration = require('../config/configuration.json') var utility = require('../utility') module.exports = { addToSuspensionList: function(accountHashID, suspendType, callback) { var suspendTable = TableAccountModel.SuspendStatus[...
Implement Account Suspension Checker Module for Add/Remove/Check Suspension
Implement Account Suspension Checker Module for Add/Remove/Check Suspension
JavaScript
mit
Flieral/AAA-Service
--- +++ @@ -0,0 +1,44 @@ +var redisClient = require('../redis_client/redisClient').getClient() +var configuration = require('../config/configuration.json') +var utility = require('../utility') + +module.exports = { + addToSuspensionList: function(accountHashID, suspendType, callback) { + var suspendTable ...
88d4ed807e0a3ebe06d4573722dca44df9ea2d92
node/src/main/generic-plugin.js
node/src/main/generic-plugin.js
'use strict'; var common = require('./common'); function Parser(selector, name, fields) { this.name = name; this.parse = function parse(services) { var instance = common.getInstance(services, selector); if (!instance) { return null; } var details = instance.crede...
Add a plugin that can be configured through the constructor.
Add a plugin that can be configured through the constructor.
JavaScript
mit
mattunderscorechampion/vcap-services-parser
--- +++ @@ -0,0 +1,35 @@ + +'use strict'; + +var common = require('./common'); + +function Parser(selector, name, fields) { + this.name = name; + + this.parse = function parse(services) { + var instance = common.getInstance(services, selector); + if (!instance) { + return null; + ...
fa56f9ba64a32e8e998ccc2a598227f67ddd5090
utils/word-count.js
utils/word-count.js
export default function (s) { s = s.replace(/(^\s*)|(\s*$)/gi, ''); // exclude start and end white-space s = s.replace(/[ ]{2,}/gi, ' '); // 2 or more space to 1 s = s.replace(/\n /, '\n'); // exclude newline with a start spacing return s.split(' ').length; }
export default function (s) { s = s.replace(/(^\s*)|(\s*$)/gi, ''); // exclude start and end white-space s = s.replace(/[ ]{2,}/gi, ' '); // 2 or more space to 1 s = s.replace(/\n /gi, '\n'); // exclude newline with a start spacing s = s.replace(/\n+/gi, '\n'); return s.split(/ |\n/).length; }
Fix word count in ember.
Fix word count in ember.
JavaScript
mit
JohnONolan/Ghost-Admin,dbalders/Ghost-Admin,airycanon/Ghost-Admin,dbalders/Ghost-Admin,acburdine/Ghost-Admin,airycanon/Ghost-Admin,acburdine/Ghost-Admin,TryGhost/Ghost-Admin,kevinansfield/Ghost-Admin,kevinansfield/Ghost-Admin,TryGhost/Ghost-Admin,JohnONolan/Ghost-Admin
--- +++ @@ -1,6 +1,7 @@ export default function (s) { s = s.replace(/(^\s*)|(\s*$)/gi, ''); // exclude start and end white-space s = s.replace(/[ ]{2,}/gi, ' '); // 2 or more space to 1 - s = s.replace(/\n /, '\n'); // exclude newline with a start spacing - return s.split(' ').length; + s = s.rep...
b833aa48e93095896448d1bf8bf998256a5567ee
test/mjsunit/test-keep-alive.js
test/mjsunit/test-keep-alive.js
// This test requires the program "ab" process.mixin(require("./common")); http = require("http"); sys = require("sys"); PORT = 8891; body = "hello world\n"; server = http.createServer(function (req, res) { res.sendHeader(200, { "Content-Length": body.length, "Content-Type": "text/plain", }); res.send...
Add test to ensure the server can handle keep-alive
Add test to ensure the server can handle keep-alive
JavaScript
apache-2.0
dreamllq/node,dreamllq/node,dreamllq/node,dreamllq/node,dreamllq/node,dreamllq/node,isaacs/nshtools,dreamllq/node,dreamllq/node,dreamllq/node
--- +++ @@ -0,0 +1,61 @@ +// This test requires the program "ab" +process.mixin(require("./common")); +http = require("http"); +sys = require("sys"); +PORT = 8891; + +body = "hello world\n"; +server = http.createServer(function (req, res) { + res.sendHeader(200, { + "Content-Length": body.length, + "Content-...
b56581fb002c5d54fe1a83c5d2c738912ab680b5
js/components/developer/job-preview-screen/jobTypeCardPreview.js
js/components/developer/job-preview-screen/jobTypeCardPreview.js
import React, { Component } from 'react'; import { Card } from 'native-base'; import CardImageHeader from '../common/cardImageHeader'; import SimpleCardBody from '../common/simpleCardBody'; export default class JobTypeCardPreview extends Component { static propTypes = { title: React.PropTypes.string.isRequired,...
Create job type card preview component
Create job type card preview component
JavaScript
mit
justarrived/p2p-client,justarrived/p2p-client,justarrived/p2p-client,justarrived/p2p-client
--- +++ @@ -0,0 +1,23 @@ +import React, { Component } from 'react'; +import { Card } from 'native-base'; + +import CardImageHeader from '../common/cardImageHeader'; +import SimpleCardBody from '../common/simpleCardBody'; + +export default class JobTypeCardPreview extends Component { + static propTypes = { + title...
71d4bea94ed2b822d8efae09d1f2e0a657ace1fd
js/lib/saveable.js
js/lib/saveable.js
/*global lib, JSON */ lib.saveable = function (_public, _protected, key) { if (!JSON) { throw new Error("JSON does not exist"); } _public.save = function () { return lib.storage.setItem(key, JSON.stringify(_public.attributes())); }; _public.fetch = function () { var data = ...
Add a way to save & fetch a model's attributes to/from local storage.
Add a way to save & fetch a model's attributes to/from local storage.
JavaScript
mit
rapportive-oss/model-r,rapportive-oss/model-r
--- +++ @@ -0,0 +1,35 @@ +/*global lib, JSON */ +lib.saveable = function (_public, _protected, key) { + if (!JSON) { + throw new Error("JSON does not exist"); + } + + _public.save = function () { + return lib.storage.setItem(key, JSON.stringify(_public.attributes())); + }; + + _public.fet...
0e4fe82f6f0b4ed5a9d93a626fb780023bca156b
test/unit/UserTest.js
test/unit/UserTest.js
define( [ 'chai', 'sinon', 'fixtures', 'argumenta/widgets/User', 'argumenta/widgets/Base', 'argumenta/config' ], function(chai, undefined, fixtures, User, Base, Config) { var assert = chai.assert; var baseUrl = Config.baseUrl; // Helpers var withUser = function() { va...
Add basic tests for user widget.
Add basic tests for user widget.
JavaScript
mit
argumenta/argumenta-widgets,argumenta/argumenta-widgets
--- +++ @@ -0,0 +1,56 @@ + +define( +[ + 'chai', + 'sinon', + 'fixtures', + 'argumenta/widgets/User', + 'argumenta/widgets/Base', + 'argumenta/config' +], +function(chai, undefined, fixtures, User, Base, Config) { + + var assert = chai.assert; + var baseUrl = Config.baseUrl; + + // Helpers ...
61a136ef8639eba98c058bb04698813552e7ade8
src/commands/general/delet-this.js
src/commands/general/delet-this.js
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ const Commando = require('discord.js-commando'); const Helpers = require('../../util/helpers.js'); module.export...
Add deletthis command, for when images are just that bad
Add deletthis command, for when images are just that bad
JavaScript
mpl-2.0
BytewaveMLP/Randibooru.js
--- +++ @@ -0,0 +1,29 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +const Commando = require('discord.js-commando'); +const Helpers = require('../../u...
cd54d10d9f9cd27e93b6c0119f0daa20c729ceeb
files/bootstrap.hover-dropdown/2.0.11/bootstrap-hover-dropdown.min.js
files/bootstrap.hover-dropdown/2.0.11/bootstrap-hover-dropdown.min.js
/** * Project: Bootstrap Hover Dropdown * Author: Cameron Spear * Contributors: Mattia Larentis * * Dependencies: Bootstrap's Dropdown plugin, jQuery * * A simple plugin to enable Bootstrap dropdowns to active on hover and provide a nice user experience. * * License: MIT * * http://cameronspear.com/blog/boot...
Update project bootstrap-hover-dropdown to 2.0.11
Update project bootstrap-hover-dropdown to 2.0.11
JavaScript
mit
spud2451/jsdelivr,Sneezry/jsdelivr,markcarver/jsdelivr,afghanistanyn/jsdelivr,royswastik/jsdelivr,stevelacy/jsdelivr,MaxMillion/jsdelivr,evilangelmd/jsdelivr,siscia/jsdelivr,leebyron/jsdelivr,CTres/jsdelivr,leebyron/jsdelivr,MenZil/jsdelivr,cake654326/jsdelivr,MenZil/jsdelivr,dandv/jsdelivr,fchasen/jsdelivr,asimihsan/j...
--- +++ @@ -0,0 +1,13 @@ +/** + * Project: Bootstrap Hover Dropdown + * Author: Cameron Spear + * Contributors: Mattia Larentis + * + * Dependencies: Bootstrap's Dropdown plugin, jQuery + * + * A simple plugin to enable Bootstrap dropdowns to active on hover and provide a nice user experience. + * + * License: MIT + ...
e7accd8135d9847c02efbc3c445eceb7b2454a09
scripts/blueRed.js
scripts/blueRed.js
var conn = new Mongo(); var db = conn.getDB("local"); db.matches.find().forEach(function(doc){ var red = 0, games = []; doc.games.forEach(function(game){ if (game.redScore > game.blueScore) red++; else red--; }); var winner = red > 0 ? "red" : "blue"; var loser = red < 0 ? "red" : "blue"; if (red === 0) db.ma...
Add script to convert data from blue/red to winner/loser
Add script to convert data from blue/red to winner/loser
JavaScript
mit
jshemas/PingPong,jshemas/PingPong
--- +++ @@ -0,0 +1,39 @@ +var conn = new Mongo(); +var db = conn.getDB("local"); +db.matches.find().forEach(function(doc){ + var red = 0, games = []; + doc.games.forEach(function(game){ + if (game.redScore > game.blueScore) red++; + else red--; + }); + var winner = red > 0 ? "red" : "blue"; + var loser = red < 0 ? ...
339e8e1ea11aef45a78dd8bf6a0defd6d3004efa
test/cases/resolving/commomjs-local-module/index.js
test/cases/resolving/commomjs-local-module/index.js
var should = require("should"); define("regular", function(require, exports, module) { module.exports = "regular-module"; }); define("override-exports", function(require, exports, module) { exports = "this one overrides exports reference"; }); define("return-module", function(require, exports, module) { return...
Fix tests — let's default to an empty object if exports keyword is overriden
Fix tests — let's default to an empty object if exports keyword is overriden
JavaScript
mit
ts-webpack/webpack,g0ddish/webpack,NekR/webpack,g0ddish/webpack,SimenB/webpack,SimenB/webpack,ts-webpack/webpack,SimenB/webpack,NekR/webpack,SimenB/webpack,webpack/webpack,EliteScientist/webpack,EliteScientist/webpack,g0ddish/webpack,ts-webpack/webpack,ts-webpack/webpack,webpack/webpack,webpack/webpack,webpack/webpack
--- +++ @@ -0,0 +1,23 @@ +var should = require("should"); + +define("regular", function(require, exports, module) { + module.exports = "regular-module"; +}); + +define("override-exports", function(require, exports, module) { + exports = "this one overrides exports reference"; +}); + +define("return-module", functio...
fb04081962f07efa9359b0b0bc6fd526d24324d8
src/userlist/UserStatusIndicator.js
src/userlist/UserStatusIndicator.js
import React, { Component } from 'react'; import { StyleSheet, View, } from 'react-native'; import { UserStatus } from '../api'; const styles = StyleSheet.create({ common: { width: 16, height: 16, borderRadius: 100, }, active: { borderColor: 'pink', backgroundColor: 'green', }, idle:...
import React, { Component } from 'react'; import { StyleSheet, View, } from 'react-native'; import { UserStatus } from '../api'; const styles = StyleSheet.create({ common: { width: 12, height: 12, borderRadius: 100, }, active: { backgroundColor: '#44c21d', }, idle: { backgroundColor:...
Make status indicators more like current site
Make status indicators more like current site
JavaScript
apache-2.0
Sam1301/zulip-mobile,nashvail/zulip-mobile,vishwesh3/zulip-mobile,saketkumar95/zulip-mobile,nashvail/zulip-mobile,Sam1301/zulip-mobile,vishwesh3/zulip-mobile,nashvail/zulip-mobile,kunall17/zulip-mobile,Sam1301/zulip-mobile,nashvail/zulip-mobile,vishwesh3/zulip-mobile,vishwesh3/zulip-mobile,saketkumar95/zulip-mobile,Sam...
--- +++ @@ -8,23 +8,22 @@ const styles = StyleSheet.create({ common: { - width: 16, - height: 16, + width: 12, + height: 12, borderRadius: 100, }, active: { - borderColor: 'pink', - backgroundColor: 'green', + backgroundColor: '#44c21d', }, idle: { backgroundColor: 'rg...