conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Stop clearing search results on popup init\n" }, { "from": "human", "value": "import { connect } from \"react-redux\";\nimport EntriesPage from \"../components/EntriesPage.js\";\nimport { clearSearchResults } from \"../library/messaging.js\";\nimport { searchEntries...
javascript
chosen
[ { "from": "system", "value": "Remove some debug logging from the frontend\n" }, { "from": "human", "value": "import { put, call, fork } from 'redux-saga/effects';\nimport { takeLatest } from 'redux-saga';\nimport { getBranches, register } from './resources';\n\nimport {\n BRANCH_LIST_REQUESTED,...
javascript
chosen
[ { "from": "system", "value": "Make .json config paths relative\n" }, { "from": "human", "value": "var nconf = require('nconf');\n\nvar scheConf = new nconf.Provider();\nvar mainConf = new nconf.Provider();\nvar optConf = new nconf.Provider();\nvar name2Conf = {\"sche\" : scheConf, \"main\": main...
javascript
chosen
[ { "from": "system", "value": "Change URL to our online apidocs server\n" }, { "from": "human", "value": "\"use strict\";\n\nangular.module(\"angular-mobile-docs\")\n .factory(\"MockFetchService\", function ($http, $q) {\n\n var config = {\n url: \"http://localhost:8080/asset...
javascript
chosen
[ { "from": "system", "value": "Add support for passing plugin names as strings" }, { "from": "human", "value": "var importcss = require('rework-npm')\n , rework = require('rework')\n , vars = require('rework-vars')\n , path = require('path')\n , read = require('fs').readFileSync\n\nmodule.exp...
javascript
chosen
[ { "from": "system", "value": "Implement reconnection with backoff for WebSocket driver\n" }, { "from": "human", "value": "import buffer from '../buffer';\n\nfunction websocket({ url, bufferTime = 0 }, { feed }) {\n const buf = buffer(feed, bufferTime);\n let socket;\n\n return {\n start: (...
javascript
chosen
[ { "from": "system", "value": "Test for invalid request token call\n" }, { "from": "human", "value": "/* eslint-disable import/no-extraneous-dependencies */\nrequire('dotenv').config();\nconst test = require('ava').test;\nconst pickpocket = require('../pickpocket');\n\nconst p = pickpocket({\n c...
javascript
chosen
[ { "from": "system", "value": "Fix tests with different length strings to look for undefined result, rather than zero.\n" }, { "from": "human", "value": "var compute = require('./hamming').compute;\n\ndescribe('Hamming', function () {\n\n it('no difference between identical strands', function ()...
javascript
chosen
[ { "from": "system", "value": "Fix deleting an issue redirecting to an undefined project.\n" }, { "from": "human", "value": "redmineApp.controller('IssueShowController', function($scope, $rootScope, $window, $routeParams, $location, ProjectService, IssueService, Restangular) {\n\t$scope.issue = {...
javascript
chosen
[ { "from": "system", "value": "Use nicer name for log level env variable\n" }, { "from": "human", "value": "import deviceMiddleware from 'express-device';\nimport express from 'express';\nimport bodyParser from 'body-parser';\nimport winston from 'winston';\n\nimport routerRender from './middlewa...
javascript
chosen
[ { "from": "system", "value": "Fix comment button being removed\n" }, { "from": "human", "value": "var lines = document.querySelectorAll('.diff-line-code');\n\nfor (var i = 0; i < lines.length; i++) {\n var line = lines[i],\n lineContent = line.innerText,\n firstChar = lineContent[0],\...
javascript
chosen
[ { "from": "system", "value": "Remove nasty querySelector / head / appendChild hack for ShadowDOM Polyfill\n\n- Requires fix from Polymer/ShadowDOM#228\n" }, { "from": "human", "value": "(function() {\n function selector(v) {\n return '[touch-action=\"' + v + '\"]';\n }\n function rule(v) {...
javascript
chosen
[ { "from": "system", "value": "Support time series data represented in epoch time\n" }, { "from": "human", "value": " // Copyright: 2013 PMSI-AlignAlytics\n // License: \"https://github.com/PMSI-AlignAlytics/dimple/blob/master/MIT-LICENSE.txt\"\n // Source: /src/objects/axis/...
javascript
chosen
[ { "from": "system", "value": "Remove redundant class name bindings in BS4.\n" }, { "from": "human", "value": "import Collapse from 'ember-bootstrap/components/base/bs-collapse';\n\nexport default Collapse.extend({\n classNameBindings: ['collapse', 'showContent:show', 'collapsing']\n});\n" }, ...
javascript
chosen
[ { "from": "system", "value": "Fix manifest file wrong include name\n" }, { "from": "human", "value": "// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/assets/javasc...
javascript
chosen
[ { "from": "system", "value": "Add code commented note about setTimeout\n" }, { "from": "human", "value": ";(function(){\n var app = angular.module('Communicant', []);\n\n app.controller('ListOfMessagesController', ['$scope', '$http', function($scope, $http){\n $http.get(\"/messages.json\")\...
javascript
chosen
[ { "from": "system", "value": "Add tablesorter to effects table\n" }, { "from": "human", "value": "$(function() {\n\t$(\".add\").button();\n\t$(\".edit\").button();\n\t$(\".delete\").button().click(function() {\n\t\tvar res = confirm(\"Are you sure you want to delete this item?\");\n\t\tif (res)\...
javascript
chosen
[ { "from": "system", "value": "Update available browsers as this has changed by default in 0.10.2" }, { "from": "human", "value": "module.exports = function( config ) {\n config.set({\n // base path, that will be used to resolve files and exclude\n basePath: '',\n\n frameworks: ['mocha'...
javascript
chosen
[ { "from": "system", "value": "refactor: Change the default passphrase generation options\n" }, { "from": "human", "value": "module.exports = {\n CONFIG_FILE_NAME: 'ssh-seed.yml',\n PASS_FILE_NAME: 'ssh-seed.pass.yml',\n DEFAULT_CONFIG: {\n passphrase: {\n length: 12,\n options: '...
javascript
chosen
[ { "from": "system", "value": "Set Up The Bomb here too\n" }, { "from": "human", "value": "'use strict'\n\nconst path = require('path')\n\nconst projectRoot = path.join(__dirname, '..')\nconst appPackage = require(path.join(projectRoot, 'package.json'))\n\nfunction getDistPath () {\n return path...
javascript
chosen
[ { "from": "system", "value": "Hide extra webpack stats on development.\n" }, { "from": "human", "value": "const WebpackDevServer = require('webpack-dev-server');\nconst webpack = require('webpack');\nconst config = require('../webpack/webpack.config.dev');\n\nnew WebpackDevServer(webpack(config)...
javascript
chosen
[ { "from": "system", "value": "Add log level configuration specs\n" }, { "from": "human", "value": "describe('logge', function() {\n var $console, log;\n\n beforeEach(module('logge'));\n beforeEach(function() {\n var logMethod = function(msg) { log += (msg + ';'); };\n\n log = '';\n $...
javascript
chosen
[ { "from": "system", "value": "Add debug message for import once\n" }, { "from": "human", "value": "const path = require('path');\nconst sassTrue = require('sass-true')\nconst globImporter = require('node-sass-glob-importer')\n\nconst alreadyImported = []\nconst importOnce = (url, prev, done) => ...
javascript
chosen
[ { "from": "system", "value": "Revert \"add newrelic to social worker\"\n\nThis reverts commit e27600b036531be98593688f50a4d8da22b79356.\n" }, { "from": "human", "value": "require('coffee-script');\nrequire('newrelic');\nmodule.exports = require('./lib/social/main.coffee');\n" }, { "from"...
javascript
chosen
[ { "from": "system", "value": "Add getNoteById method. Add to\n" }, { "from": "human", "value": "// js/services/note.js\n\n(function() {\n \"use strict\";\n\n angular.module(\"NoteWrangler\")\n .factory(\"Note\", NoteFactory);\n\n NoteFactory.$inject = [\"$http\"];\n\n function NoteFactor...
javascript
chosen
[ { "from": "system", "value": "Improve UMD boilerplate to export snabbt-function directly\n" }, { "from": "human", "value": "(function (root, factory) {\n if (typeof exports === 'object') {\n // CommonJS\n module.exports = factory();\n } else if (typeof define === 'function' && define.amd...
javascript
chosen
[ { "from": "system", "value": "ADD support for manager.js as a replacement for addons.js\n" }, { "from": "human", "value": "import path from 'path';\nimport { logger } from '@storybook/node-logger';\n\nimport { getInterpretedFile } from './interpret-files';\n\nfunction loadCustomAddons({ configDi...
javascript
chosen
[ { "from": "system", "value": "Add new test to allow me to visualize Placemark list in the debugger\n" }, { "from": "human", "value": "/*global defineSuite*/\ndefineSuite(['DynamicScene/KmlDataSource',\n 'DynamicScene/DynamicObjectCollection',\n 'Core/Event'\n ]...
javascript
chosen
[ { "from": "system", "value": "Set app to throwErrors on by default\n" }, { "from": "human", "value": "var controller;\n$(function(){\n var appName = \"[ENTER YOUR APP NAME HERE]\",\n app = $.ku4webApp.app();\n controller = $.ku4webApp.controllers[appName](app)\n $.ku4webApp.views...
javascript
chosen
[ { "from": "system", "value": "Fix mathtype enum for latex\n" }, { "from": "human", "value": "/**\n* Equation.js\n*\n* @description :: An equation with input type, equation in source format,\n* \t\t\t\t and generated components.\n* @docs :: http://sailsjs.org/#!documentation/models\n*/\n...
javascript
chosen
[ { "from": "system", "value": "Use the object to test\n" }, { "from": "human", "value": "describe(\"Dom Tests\", function() {\n\n var substrata = {};\n\n beforeEach(function(){\n substrata = new Substrata();\n });\n\n it(\"has a function called testRun which returns true\", fun...
javascript
chosen
[ { "from": "system", "value": "Update hooks for latest wdio-screen-commands.\n" }, { "from": "human", "value": "'use strict'\n\n/* global browser */\n\nconst cmds = require('wdio-screen-commands')\n\nmodule.exports = {\n before: () => {\n global.should = require('chai').should()\n browser....
javascript
chosen
[ { "from": "system", "value": "Return metadata which are in {\"class\": string, \"value\": string} format only\n" }, { "from": "human", "value": "class MetaData {\n constructor(data, extra_key) {\n this.data = data;\n this.extra_key = extra_key;\n }\n\n get(keys) {\n if (!this.data)\n...
javascript
chosen
[ { "from": "system", "value": "Add buyers to Home container\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport { connect } from 'react-redux';\n\n\nclass Home extends Component {\n render () {\n return (\n <div>\n Wellcome to auction-app! ;)\n ...
javascript
chosen
[ { "from": "system", "value": "Return null from resolveuser since it seems to confuse bluebird\n" }, { "from": "human", "value": "'use strict';\n\nimport models from '../../models';\nimport { GENERIC } from '../../utils/errorTypes.js';\n\nlet User = models.User;\n\nexport default function re...
javascript
chosen
[ { "from": "system", "value": "Add comment about client id\n" }, { "from": "human", "value": "\n'use strict';\n\nconst graphql = require('graphql');\n\nconst MoistureType = new graphql.GraphQLObjectType({\n name: 'Moisture',\n fields: {\n date: { type: graphql.GraphQLString },\n moisture:...
javascript
chosen
[ { "from": "system", "value": "Remove extensão .js de alguns imports\n" }, { "from": "human", "value": "import { split } from './int-util.js'\nimport { name, clear, singularize, addConjunction, addComma, write } from './parts-util.js'\n\n/**\n * Escrever números maiores que mil.\n *\n * @param {s...
javascript
chosen
[ { "from": "system", "value": "Set default label on song upload from filename\n" }, { "from": "human", "value": "/**\n * @class Admin_Form_Song\n * @extends CM_Form_Abstract\n */\nvar Admin_Form_Song = CM_Form_Abstract.extend({\n\t_class: 'Admin_Form_Song'\n});\n" }, { "from": "gpt", ...
javascript
chosen
[ { "from": "system", "value": "Add 404 catch all route to boilerplate module code\n" }, { "from": "human", "value": "define([\n 'backbone',\n 'modules/boilerplate/module',\n 'modules/boilerplate/views/home',\n], function (Backbone, BoilerplateModule, HomeView) {\n\n var Router = Backb...
javascript
chosen
[ { "from": "system", "value": "Improve isType function for reducing gzip size\n" }, { "from": "human", "value": "/**\n * util-lang.js - The minimal language enhancement\n */\n\nfunction isType(type) {\n return function(obj) {\n return Object.prototype.toString.call(obj) === \"[object \" + typ...
javascript
chosen
[ { "from": "system", "value": "Update QUnit version to 1.18.0.\n\n[Changelog](https://github.com/jquery/qunit/blob/1.18.0/History.md):\n\n* Assert: throws uses push method only\n* Assert: Fix missing test on exported throws\n* Assert: Implements notOk to assert falsy values\n* Core: More graceful handling of...
javascript
chosen
[ { "from": "system", "value": "Add jquery as an external\n" }, { "from": "human", "value": "process.traceDeprecation = true;\nconst path = require(\"path\");\nconst patternslib_config = require(\"@patternslib/patternslib/webpack/webpack.config\");\nconst svelte_config = require(\"@patternslib/pat...
javascript
chosen
[ { "from": "system", "value": "Send a message through porthole\n" }, { "from": "human", "value": "'use strict';\n\n/*@ngInject*/\nmodule.exports = function($state) {\n if ($state.params.student) {\n }\n console.log(Porthole);\n};\n" }, { "from": "gpt", "value": "/*global Porthole*/...
javascript
chosen
[ { "from": "system", "value": "Use dispatch callback in connect middleware\n" }, { "from": "human", "value": "var React = require('react');\nvar urllite = require('urllite');\nvar renderDocumentString = require('../utils/renderDocumentString');\n\n\nvar connectMiddleware = function(router) {\n r...
javascript
chosen
[ { "from": "system", "value": "Update tonic example for new API\n" }, { "from": "human", "value": "var jss = require('jss');\nvar extend = require('jss-extend');\nvar nested = require('jss-nested');\nvar camelCase = require('jss-camel-case');\nvar defaultUnit = require('jss-default-unit');\n\nvar...
javascript
chosen
[ { "from": "system", "value": "refactor: Use the BufferGeometry class instead of the Geometry.\n" }, { "from": "human", "value": "import { Geometry } from './three.js';\nimport { validatePropString } from './utils.js';\nimport { geometries } from './object-stores.js';\n\nexport default {\n injec...
javascript
chosen
[ { "from": "system", "value": "Set to undefined when clearing\n" }, { "from": "human", "value": "Ember.Validations.Errors = Ember.Object.extend({\n add: function(property, value) {\n this.set(property, (this.get(property) || []).concat(value));\n },\n clear: function() {\n var keys = Obj...
javascript
chosen
[ { "from": "system", "value": "Build into single file rather than by module\n" }, { "from": "human", "value": "({\n mainConfigFile: './require.conf.js',\n dir: '../dist',\n modules: [\n {\n name: 'app',\n exclude: [\n /*\n * https://groups.google.com/forum/#!msg/req...
javascript
chosen
[ { "from": "system", "value": "serve: Remove plugin name from URL before passing it to the plugin.\n" }, { "from": "human", "value": "import { createServer } from 'http'\nimport { Plugin } from 'munar-core'\nimport micro, { createError } from 'micro'\n\nexport default class Serve extends Plugin {...
javascript
chosen
[ { "from": "system", "value": "Fix spacing on import in ReadmePage." }, { "from": "human", "value": "/*\n * ReadmePage\n *\n * This is the page users see when they click the \"Setup\" button on the HomePage\n */\n\nimport React, { Component} from 'react';\nimport { Link } from 'react-router';\n\n...
javascript
chosen
[ { "from": "system", "value": "Use 3 persistent tcp connections while discovering the deps graph\n" }, { "from": "human", "value": "\nvar async = require('async')\nvar rb = require('./rubygems')\n\n\nexports.run = (root, step, done) => {\n var gems = {}\n var error = false\n\n getGem({name: ro...
javascript
chosen
[ { "from": "system", "value": "Remove deoptimized calls based on profiling\n" }, { "from": "human", "value": "'use strict';\n\nvar PIXI = window.PIXI,\n Point = require('../data/point'),\n Rect = require('../data/rect');\n\nfunction Frame(position, url, options) {\n this.pos = position;\n ...
javascript
chosen
[ { "from": "system", "value": "Make axios automatically send the `X-CSRF-TOKEN`\n" }, { "from": "human", "value": "\nwindow._ = require('lodash');\n\n/**\n * We'll load jQuery and the Bootstrap jQuery plugin which provides support\n * for JavaScript based Bootstrap features such as modals and tab...
javascript
chosen
[ { "from": "system", "value": "Add version to addBowerPackageToProject call\n\nSpecify a version string for i18next in the `afterInstall` hook's\ncall to `addBowerPackageToProject` so that i18next < 2.0 is used.\nFixes #25.\n" }, { "from": "human", "value": "module.exports = {\n description: 'Ad...
javascript
chosen
[ { "from": "system", "value": "Add function to assemble node from data\n" }, { "from": "human", "value": "// import polyfills. Done as an export to make sure polyfills are imported first\nexport * from './polyfill';\n\n// export core\nexport * from './core';\n\n// export libs\nimport * as accessi...
javascript
chosen
[ { "from": "system", "value": "Swap code lines FTW =)\n" }, { "from": "human", "value": "var util = require('util'),\n Pipeline = require('pipeline'),\n SerializationPlugin = require('./plugins/serialization');\n\n\n//Modifier\nvar Modifier = module.exports = function (availablePlugins) {\n...
javascript
chosen
[ { "from": "system", "value": "feat(header): Add link to Docker Hub :rocket:\n\n" }, { "from": "human", "value": "import React from 'react'\n\nimport {iconify} from '../lib/str'\nimport styles from './styles'\n\nexport const Link = ({name, href, title}) => (\n <a className={styles.link} href={hr...
javascript
chosen
[ { "from": "system", "value": "Add stylesheets rules for Prettier\n" }, { "from": "human", "value": "module.exports = {\n tabWidth: 4,\n printWidth: 100,\n singleQuote: true,\n arrowParens: \"always\",\n trailingComma: \"all\",\n\n overrides: [\n {\n files: [\"...
javascript
chosen
[ { "from": "system", "value": "Comment for revealing module pattern\n" }, { "from": "human", "value": "'use strict';\n\n/* Services */\n\n\n// Demonstrate how to register services\n// In this case it is a simple value service.\nangular.module('myApp.services', []).\n value('version', '0.1')\n ....
javascript
chosen
[ { "from": "system", "value": "Fix unused required of the 'bcrypt' module.\n" }, { "from": "human", "value": "var config = require('/opt/cocorico/api-web/config.json');\n\nvar keystone = require('keystone');\nvar transform = require('model-transform');\nvar bcrypt = require('bcrypt');\n\nvar Type...
javascript
chosen
[ { "from": "system", "value": "Make ember-jsonapi-resources work with ember-simple-auth, by overriding fetch() options to include the bearer token in the session.\n" }, { "from": "human", "value": "import ApplicationAdapter from 'ember-jsonapi-resources/adapters/application';\n\nexport default Ap...
javascript
chosen
[ { "from": "system", "value": "Fix 'body' selector in init function" }, { "from": "human", "value": ";var conpigurator = {\n\tactive:false,\n\thandleChange:function(event){\n\t\tif($(event.target).hasClass('conpiguratorInput')){\n\t\t\tif(event.target.value && event.target.value !== '' && typeof ...
javascript
chosen
[ { "from": "system", "value": "Add UI for unknow exception\n" }, { "from": "human", "value": "import React from 'react';\nimport { connect } from 'react-redux';\nimport Grid from 'react-bootstrap/lib/Grid';\nimport Errors from '../../constants/Errors';\nimport { removeError } from '../../actions/...
javascript
chosen
[ { "from": "system", "value": "Add zivi delete by name API\n" }, { "from": "human", "value": "var express = require('express');\nvar router = express.Router();\n\nvar models = require('../../models/index');\nvar ZiviService = require('../../services/zivi.service');\n\nrouter.get('/', function (re...
javascript
chosen
[ { "from": "system", "value": "Add test for variable collection serialization\n" }, { "from": "human", "value": "'use strict';\n\nvar expect = require('chai').expect;\nvar VariableCollection = require('../app/scripts/variable-collection');\nvar Variable = require('../app/scripts/variable');\n\nde...
javascript
chosen
[ { "from": "system", "value": "Allow CLI to find devices based on model and type\n" }, { "from": "human", "value": "'use strict';\n\nconst { EventEmitter } = require('events');\nconst { Browser, Devices } = require('../lib/discovery');\n\nfunction asFilter(filter) {\n\tif(typeof filter === 'strin...
javascript
chosen
[ { "from": "system", "value": "Make the app use the right database\n" }, { "from": "human", "value": "var mongoose = require('mongoose');\n\nvar dbURI = 'mongodb://localhost/Loc8r';\nmongoose.connect(dbURI);\n\nmongoose.connection.on('connected', function() {\n console.log('Mongoose connected ...
javascript
chosen
[ { "from": "system", "value": "Remove non existing class name\n" }, { "from": "human", "value": "// Copyright 2020 Google LLC\n\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of t...
javascript
chosen
[ { "from": "system", "value": "Remove node version debug line\n" }, { "from": "human", "value": "const exec = require('shell-utils').exec;\nconst _ = require('lodash');\n\nconst fix = _.includes(process.argv, '--fix') ? '--fix' : '';\n\nconst dirs = [\n 'lib/src',\n 'integration',\n 'e2e',\n ...
javascript
chosen
[ { "from": "system", "value": "Move babel cache to local project\n\nThis removes potentially large performance overhead from loading the babel cache across many unrelated projects.\n" }, { "from": "human", "value": "Error.stackTraceLimit = Infinity; // And beyond\n\nrequire('babel-core/register...
javascript
chosen
[ { "from": "system", "value": "Use selected_identity for logged in user predicate\n" }, { "from": "human", "value": "define([], function () {\n return {\n hasLoggedInUser: function() {\n return !!(this.profile && this.profile.get('username'));\n },\n profile: null\n }\n});\n" ...
javascript
chosen
[ { "from": "system", "value": "Move https middleware up front\n" }, { "from": "human", "value": "const express = require('express');\nconst path = require('path');\nconst PORT = process.env.PORT || 4000;\nconst app = express();\n\n\n// API endpoints\napp.get('/api/hello', (req, res) => {\n res.s...
javascript
chosen
[ { "from": "system", "value": "Fix weird logout/login websocket connection issue\n" }, { "from": "human", "value": "angular.module(\"omniServices\")\n\t.service(\"BalanceSocket\", [\"$rootScope\",\"$location\",function BalanceSocketService($rootScope,$location){\n\t\tvar self = this;\n\t\tself.co...
javascript
chosen
[ { "from": "system", "value": "Fix order of fields in registration form.\n\nUser name was displayed after passwords. The only way to control the order\nseems to remove the standard fields first and then to add them again.\n" }, { "from": "human", "value": "\nAccountsTemplates.addFields([\n {\n ...
javascript
chosen
[ { "from": "system", "value": "Use post.title for page title\n" }, { "from": "human", "value": "'use strict';\nvar React = require('react');\n\nvar paths = require('../paths');\n\n\nmodule.exports = {\n contextTypes: function() {\n return {\n getCurrentPathname: React.PropTypes.func.isR...
javascript
chosen
[ { "from": "system", "value": "Change log level for 'Request accepted'\n" }, { "from": "human", "value": "import * as Types from './types'\r\n\r\nconst initialState = {\r\n server: {}\r\n}\r\n\r\nconst mapServerState = (serverState, state) => {\r\n return {\r\n ...state,\r\n server: serve...
javascript
chosen
[ { "from": "system", "value": "Include original error message in TranscodeError.\n\nInclude original error message in error output for a\n`TranscodeError`.\n" }, { "from": "human", "value": "export default class TranscodeError extends Error {\n constructor(message, file, additional = '') {\n ...
javascript
chosen
[ { "from": "system", "value": "Fix Class being loaded 2 times in tests.\n" }, { "from": "human", "value": "/*jslint node:true, sloppy:true*/\n/*globals define*/\n\nif (!global.evaluated) {\n require('../util/adapter.js');\n}\n\nvar path = '../dist/amd/strict';\nglobal.modules = [path + '/Class...
javascript
chosen
[ { "from": "system", "value": "Upgrade image base_url to SSL\n" }, { "from": "human", "value": "const _ = require('lodash');\nconst imageConfig = require('../config/tmdb.json').images;\nconst formatApiResponse = require('../utils/formatApiResponse');\nconst { createTransformMany } = require('./ut...
javascript
chosen
[ { "from": "system", "value": "Use consistent auth token variable\n\nOther snippets for installations auth token is called `installationToken` using that here instead." }, { "from": "human", "value": "const firebase = require(\"firebase\");\n\nasync function deleteInstallation() {\n try {\n /...
javascript
chosen
[ { "from": "system", "value": "Replace space with \"T\" in date strings, to allow parsing.\n" }, { "from": "human", "value": "define(['jquery', 'underscore', 'backbone', 'model_want', 'utils'], function($, _, Backbone, Models, Utils) {\n\tModels.Wants = Backbone.Collection.extend({\n\t\tmodel: Mo...
javascript
chosen
[ { "from": "system", "value": "Add github to list of streams\n" }, { "from": "human", "value": "module.path.unshift('js');\n\n(function(){\n\tmodule('import class ui.TabContainer');\n\tmodule('import class marcuswestin.Layout');\n\tmodule('import class lib.navigationManager');\n\tmodule('import c...
javascript
chosen
[ { "from": "system", "value": "Remove linting warning in build script\n" }, { "from": "human", "value": "import {spawn} from 'child_process';\n\nconst requiresHarmonyFlag = parseInt(/^v(\\d+)\\./.exec(process.version)[1], 10) < 7;\nconst harmonyProxies = requiresHarmonyFlag ? ['--harmony_proxies'...
javascript
chosen
[ { "from": "system", "value": "Use scrollTo action for edit entity commands.\n" }, { "from": "human", "value": "import { Command } from 'substance'\n\n/*\n This command intended to switch view and scroll to the selected node.\n Command state becoming active only for certain type of custom selec...
javascript
chosen
[ { "from": "system", "value": "Move callback method to prototype\n" }, { "from": "human", "value": "TC.control = TC.control || {};\r\n\r\nif (!TC.Control) {\r\n TC.syncLoadJS(TC.apiLocation + 'TC/Control');\r\n}\r\n\r\nTC.control.Click = function () {\r\n var self = this;\r\n\r\n TC.Con...
javascript
chosen
[ { "from": "system", "value": "Fix uri in secto_identifier js\n" }, { "from": "human", "value": "[ \"https://${test.server.name}/oxauth-rp/home.seam\",\n \"https://client.example.org/callback\",\n \"https://client.example.org/callback2\",\n \"https://client.other_company.example.net/call...
javascript
chosen
[ { "from": "system", "value": "Add request ID to every ajax in legacy Florence\n\n\nFormer-commit-id: f0107e87b690b2b6eb77ef75692ab09718e70988\nFormer-commit-id: 094331c7554b4043bf296e6728ff0de511a8fb55\nFormer-commit-id: 1fc95c6218fe635a11d05b7f2dfa3db24796bebf" }, { "from": "human", "value": "v...
javascript
chosen
[ { "from": "system", "value": "Update inspecitng an object example\n" }, { "from": "human", "value": "// If you try printing the below you would see \"[object Object]\"\" which is not that useful.\n\n// Instead, you can click \"Inspect it\" to see the result in the JavaScript console where you ca...
javascript
chosen
[ { "from": "system", "value": "Fix url redirection to relative\n" }, { "from": "human", "value": "angular\n .module('search', ['angucomplete-alt'])\n .controller('SearchController', ['SEARCH_DATA', '$window', function (searchData, $window) {\n var me = this;\n\n me.docs = searchData.d...
javascript
chosen
[ { "from": "system", "value": "Make Webpack logs a bit less verbose.\n" }, { "from": "human", "value": "/*\n * `server` task\n * =============\n *\n * Creates a Browsersync Web server instance for live development. Makes use of\n * some Webpack middlewares to enable live reloading features.\n */\...
javascript
chosen
[ { "from": "system", "value": "Create ship structure. Render function\n" }, { "from": "human", "value": "function setup(){\n // Defining Initial Configuration\n var DIFF_INIT = 4;\n createCanvas(windowWidth - DIFF_INIT, windowHeight - DIFF_INIT);\n}\n\nfunction draw(){\n background(0);\n}\n" ...
javascript
chosen
[ { "from": "system", "value": "Update basic auth realm from festapp-server to conference-server\n" }, { "from": "human", "value": "var FESTAPP_REALM = 'Basic realm=\"festapp-server\"';\n\nfunction validateBasicAuth(accounts, req, res, next) {\n if (req.headers.authorization && req.headers.author...
javascript
chosen
[ { "from": "system", "value": "Update services to use full namespace (Scatter 0.7)\n" }, { "from": "human", "value": "\n\nmodule.exports = {\n __module: {\n provides: {\n use_scripts: {},\n use_stylesheets: {},\n register_assets_dir: {after: ['assetManager/bootstrap', 'assetMan...
javascript
chosen
[ { "from": "system", "value": "Clean up some error message.\n" }, { "from": "human", "value": "\"use strict\";\n\nmodule.exports = {\n loadUninitialized: \"You must first call store.load\",\n undefinedValue: \"Value must not be undefined.\",\n invalidNamespace: \"namespace can not contai...
javascript
chosen
[ { "from": "system", "value": "Clarify use of 'debug' option\n" }, { "from": "human", "value": "'use strict';\n\nvar browserify = require('browserify');\nvar gulp = require('gulp');\nvar source = require('vinyl-source-stream');\nvar buffer = require('vinyl-buffer');\nvar uglify = require('gulp-ug...
javascript
chosen
[ { "from": "system", "value": "[fix] Replace Unicode space (U+00A0) with ASCII space\n" }, { "from": "human", "value": "/*\n * config.js: Configuration information for your Loggly account.\n * This information is only used for require('loggly')./\\.+/ methods\n *\n * (C) 2010 Nodejitsu...
javascript
chosen
[ { "from": "system", "value": "Fix bug in buildCacheKey function causing caching to miss every time.\n" }, { "from": "human", "value": "var ResponseCache = function() {\n\tthis.cache = {};\n};\n\nResponseCache.prototype.buildCacheKey = function(request) {\n return request.files.join(',') + (re...
javascript
chosen
[ { "from": "system", "value": "Update kernel version of ubuntu microkernel to 3.16.0-25-generic.\n" }, { "from": "human", "value": "// Copyright 2015, EMC, Inc.\n\n'use strict';\n\nmodule.exports = {\n friendlyName: 'Bootstrap Ubuntu',\n injectableName: 'Task.Linux.Bootstrap.Ubuntu',\n i...
javascript
chosen
[ { "from": "system", "value": "Remove update notifications, broken due to new CSP header\n" }, { "from": "human", "value": "// BetterDiscord pls.\ntry {\n window.localStorage = bdPluginStorage;\n} catch (e) {\n // Non-BD localStorage shim\n if(window.localStorage === undefined) {\n ...
javascript
chosen
[ { "from": "system", "value": "Update test for getProfile with new profile fields" }, { "from": "human", "value": "'use strict'\nconst tap = require('tap')\nconst nock = require('nock')\nconst Bot = require('../')\n\ntap.test('bot.getProfile() - successful request', (t) => {\n let bot = new Bot(...
javascript
chosen