conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Use the current directory by default for the CLI\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n'use strict';\n\nvar path = require('path');\n\nvar chalk = require('chalk');\n\nvar checkLocales = require('./');\n\nif (process.argv.length < 3) {\n\tconsole.e... | javascript | chosen |
[
{
"from": "system",
"value": "Add function to extract Trello board ID from path\n"
},
{
"from": "human",
"value": "(function (){\n \"use strict\";\n console.log('Extension only works in trello.com/*');\n})();\n"
},
{
"from": "gpt",
"value": "(function (){\n \"use strict\";\n\n fu... | javascript | chosen |
[
{
"from": "system",
"value": "Remove trailing spaces in the source code\n"
},
{
"from": "human",
"value": "(function($){\n\n\t$(function(){\n \t\t$('.block_area').each(function(){\n \t\t\tvar self = $(this);\n \t\t\tvar label = '<span>' + self.data('areaid') + ' Block Area</span>';\n \t\t\tself.... | javascript | chosen |
[
{
"from": "system",
"value": "Remove lodash dependency when auto registering Vue components\n"
},
{
"from": "human",
"value": "\n/**\n * First we will load all of this project's JavaScript dependencies which\n * include Vue and Vue Resource. This gives a great starting point for\n * building rob... | javascript | chosen |
[
{
"from": "system",
"value": "Build up map of cards to children\n"
},
{
"from": "human",
"value": "'use strict'\n\nvar cards = {}\n\nTrelloPowerUp.initialize({\n 'card-badges': function(t) {\n var cardId = ''\n return t.card('id', 'url')\n .then(function(card) {\n cardId = car... | javascript | chosen |
[
{
"from": "system",
"value": "Insert encrypt button placeholder in open chat tabs\n"
},
{
"from": "human",
"value": "// ==UserScript==\n// @name OTR for Facebook\n// @include http://*.facebook.com\n// @include https://*.facebook.com\n// @require lib/jquery.js\n// @require lib/dep/bigint.js\n// @... | javascript | chosen |
[
{
"from": "system",
"value": "Fix link to home in header\n"
},
{
"from": "human",
"value": "import React from \"react\";\nimport { Link } from \"react-router\";\nimport { Header, Footer } from \"formidable-landers\";\n\n// Variables and Stylesheet\nimport LOGO from \"../../static/logo.svg\";\nim... | javascript | chosen |
[
{
"from": "system",
"value": "Update test for run method\n"
},
{
"from": "human",
"value": "define(function(require) {\n\tvar registerSuite = require('intern!object'),\n\t\tassert = require('intern/chai!assert'),\n\t\tel;\n\n\trequire('js/tests/support/exports.js');\n\n\tregisterSuite({\n\t\tnam... | javascript | chosen |
[
{
"from": "system",
"value": "Add partial and close server responses"
},
{
"from": "human",
"value": "var Hapi = require('hapi');\n\nvar server = Hapi.createServer('localhost', 8000);\n\nserver.route({\n method: 'GET',\n path: '/hang',\n handler: function(request, reply) {\n console.log(ne... | javascript | chosen |
[
{
"from": "system",
"value": "Switch to blue for primary color\n"
},
{
"from": "human",
"value": "/* eslint-disable no-underscore-dangle */\n\nimport { SheetsRegistry } from 'jss'\nimport { createMuiTheme, createGenerateClassName } from '@material-ui/core/styles'\nimport orange from '@material-u... | javascript | chosen |
[
{
"from": "system",
"value": "Set JWT token expiration to 1 month for ease of use\n"
},
{
"from": "human",
"value": "const express = require('express');\nconst router = express.Router();\n\nconst mongoose = require('mongoose');\nconst User = require('../models/user.js');\n\nconst jwt = require('... | javascript | chosen |
[
{
"from": "system",
"value": "Fix quotes in test titles\n"
},
{
"from": "human",
"value": "import { expect } from \"chai\"\nimport Home from \"../pages/home.page\"\n\ndescribe(\"Anet home page\", function() {\n it(\"should have the right title\", function() {\n Home.open()\n const title =... | javascript | chosen |
[
{
"from": "system",
"value": "Fix check that decides when SSO screen is rendered\n"
},
{
"from": "human",
"value": "import { Map } from 'immutable';\nimport LastLoginScreen from './last_login_screen';\nimport LoadingScreen from '../loading_screen';\nimport { findConnection } from '../index';\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Make job type card use extracted components\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport { StyleSheet } from 'react-native';\nimport {\n Right,\n Icon,\n Card,\n CardItem,\n Thumbnail,\n Text,\n Body,\n} from 'native-ba... | javascript | chosen |
[
{
"from": "system",
"value": "Support trailing arguments in case of dbjs handling\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar Fieldset = require('dbjs-dom/input/utils/fieldset').Fieldset\n\n , isArray = Array.isArray;\n\nmodule.exports = function (domjs) {\n\tvar fieldset = domjs.ns... | javascript | chosen |
[
{
"from": "system",
"value": "Add helper funcs to get dead or living chars.\n"
},
{
"from": "human",
"value": "const crypto = require('crypto');\n\nconst Accounts = function() {\n this.accounts = [];\n};\n\nconst Account = function() {\n\n this.username = '';\n this.characters = [];\n this... | javascript | chosen |
[
{
"from": "system",
"value": "Add loading_embedly variable to parent scope\n"
},
{
"from": "human",
"value": "/**\n * Created by moran on 12/06/14.\n */\n\n(function (module) {\n module.directive('emEmbed', ['embedlyService', function(embedlyService) {\n return {\n restrict:... | javascript | chosen |
[
{
"from": "system",
"value": "Add slug transform from name.\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nconst\n _ = require('lodash'),\n xss = require('xss'),\n router = require('koa-router')(),\n auth = require('../auth/auth.service'),\n params = require('../lib/params'... | javascript | chosen |
[
{
"from": "system",
"value": "Correct internal temperature controller name\n"
},
{
"from": "human",
"value": "var util = require('util');\n\nvar five = require('johnny-five');\n\nvar Controllers = require('./controllers');\n\nfunction InternalTemperature(opts) {\n opts = opts || {};\n\n opts.c... | javascript | chosen |
[
{
"from": "system",
"value": "[1.8] Remove an error message logged when FBTrace is not installed.\n\nhttp://code.google.com/p/fbug/source/detail?r=10890\n"
},
{
"from": "human",
"value": "/* See license.txt for terms of usage */\n\n// *************************************************************... | javascript | chosen |
[
{
"from": "system",
"value": "Add requireApiKey var to view\n"
},
{
"from": "human",
"value": "var fs = require(\"fs\");\nvar mu = require(\"mu2\");\nvar webInterface = fs.readFileSync(\"./lib/webInterface.html\");\n\nfunction webInterfaceEndpoint(req, res) {\n var vars = {\n senderId:... | javascript | chosen |
[
{
"from": "system",
"value": "Remove support for app:// protocol\n"
},
{
"from": "human",
"value": "import { L10nError } from '../../lib/errors';\n\nconst HTTP_STATUS_CODE_OK = 200;\n\nfunction load(url) {\n return new Promise((resolve, reject) => {\n const xhr = new XMLHttpRequest();\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use a symbol name for debugging.\n"
},
{
"from": "human",
"value": "import {map} from \"d3-collection\";\nimport {slice} from \"./array\";\n\nexport var implicit = {};\n\nexport default function ordinal() {\n var index = map(),\n domain = [],\n range = []... | javascript | chosen |
[
{
"from": "system",
"value": "Use window as global by default, fall back to eval\n"
},
{
"from": "human",
"value": "import collectionHandlers from './collections'\n\n// eslint-disable-next-line\nconst globalObj = Function(\"return this\")();\n\n// built-in object can not be wrapped by Proxies\n/... | javascript | chosen |
[
{
"from": "system",
"value": "Resolve 'switchMap' error. Thanks Wil Wilsman."
},
{
"from": "human",
"value": "import { combineEpics, createEpicMiddleware } from 'redux-observable';\nimport { BehaviorSubject } from 'rxjs/BehaviorSubject';\nimport 'rxjs/add/operator/mergeMap';\nimport 'rxjs/add/op... | javascript | chosen |
[
{
"from": "system",
"value": "Fix component defaults was shared\n"
},
{
"from": "human",
"value": "import pluck from './pluck';\nimport {\n ref,\n refs,\n noop,\n mixin,\n insertCss,\n emptyTemplate,\n computedAll,\n pureComputedAll\n} from '../util/';\n\nconst modulePoly... | javascript | chosen |
[
{
"from": "system",
"value": "Update test file according to angular\n"
},
{
"from": "human",
"value": "'use strict';\nvar path = require('path');\nvar assert = require('yeoman-assert');\nvar helpers = require('yeoman-test');\n\ndescribe('generator-hionic:app', function() {\n before(function(don... | javascript | chosen |
[
{
"from": "system",
"value": "Fix incorrect Entity subclassing of Object3D.\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar Object3D = require( '../object3d' );\n\nfunction Entity( geometry, material ) {\n Object3D.call( this );\n\n this.geometry = geometry;\n this.material = material... | javascript | chosen |
[
{
"from": "system",
"value": "Add new line at EOF\n"
},
{
"from": "human",
"value": "// Copyright 2019 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 the Licens... | javascript | chosen |
[
{
"from": "system",
"value": "Add 'createdAt' column to users table\n"
},
{
"from": "human",
"value": "exports.up = knex => (\n knex.schema\n /**\n * Users table\n *\n * Contains info on all users in the system\n */\n .createTableIfNotExists('users', (table) => {\n ta... | javascript | chosen |
[
{
"from": "system",
"value": "Fix eslint errors - 3\n"
},
{
"from": "human",
"value": "angular.module('MainApp')\n .controller('TaskControl', ($scope, db) => {\n db.find('open', (tasks) => {\n $scope.tasks = tasks;\n $scope.array = Array.apply(\n null, { length: tasks.length... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Parting Shot in Trademarked\n"
},
{
"from": "human",
"value": "'use strict';\n\nexports.BattleScripts = {\n\tinit: function() {\n\t\tObject.values(this.data.Movedex).forEach(move => {\n\t\t\tlet bannedMoves = {'Baton Pass':1, 'Detect':1, 'Mat Block':1, 'Parting ... | javascript | chosen |
[
{
"from": "system",
"value": "Copy only new WP Plugins\n"
},
{
"from": "human",
"value": "/**\n * Copy Wordpress Plugins\n * @description Copy all Wordpress Plugins\n */\n\nimport kc from '../../config.json'\nimport gulp from 'gulp'\n\nconst copyWPPlugins = () => {\n gulp\n .src(kc.src.plugi... | javascript | chosen |
[
{
"from": "system",
"value": "Allow any king of geometry to data observatory analysis\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar dot = require('dot');\ndot.templateSettings.strip = false;\n\nvar Node = require('../node');\n\nvar TYPE = 'data-observatory-measure';\nvar PARAMS = {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix minor styling issue in Swedish locale\n"
},
{
"from": "human",
"value": "// @flow\n/* eslint-env mocha */\n\nvar assert = require('power-assert')\nvar enLocale = require('./')\n\ndescribe('sv locale', function () {\n it('exports distanceInWords object', functio... | javascript | chosen |
[
{
"from": "system",
"value": "Set column width by 'resize'."
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport RegisterTableComponentMixin from 'ember-table/mixins/register-table-component';\n\nexport default Ember.View.extend(RegisterTableComponentMixin, {\n templateName: 'col... | javascript | chosen |
[
{
"from": "system",
"value": "[native] Use hook instead of connect in ConnectivityUpdater\n\nTest Plan: Checked if onConnectionChange was still being called properly\n\nReviewers: palys-swm, ashoat, atul\n\nReviewed By: ashoat\n\nSubscribers: ashoat, KatPo, zrebcu411, Adrian, atul\n\nDifferential Revision: ... | javascript | chosen |
[
{
"from": "system",
"value": "Make domain address env variable\n"
},
{
"from": "human",
"value": "require('dotenv').config();\n\nmodule.exports = {\n serverDomain: 'https://43697aef.ngrok.io',\n serverPort: process.env.PORT || 4321,\n googleKey: process.env.google_key,\n weatherKey: ... | javascript | chosen |
[
{
"from": "system",
"value": "Change to look more like a \"plugin js\"\n"
},
{
"from": "human",
"value": "var ShortcutPlugin = {\n CreateShortcut: function(shortcut_text, successCallback, errorCallback) {\n cordova.exec(\n successCallback,\n errorCallback,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"be more explicit when importing files\"\n"
},
{
"from": "human",
"value": "import React, { Component, PropTypes } from 'react'\nimport { connect } from 'react-redux'\nimport { checkout } from '../actions/index'\nimport { getTotal, getCartProducts } from '..... | javascript | chosen |
[
{
"from": "system",
"value": "Bring Linux and osx into alignment\n\n"
},
{
"from": "human",
"value": "var hostile = require('hostile');\n\nvar hosts = [\n\t'databox.registry',\n\t'databox-arbiter',\n\t'databox.store'\n];\n\nvar p = Promise.resolve();\nhosts.forEach((host, i) => {\n\tp = p.then((... | javascript | chosen |
[
{
"from": "system",
"value": "Update & add stories to demo the new icon & iconPlacement props\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport { storiesOf } from '@storybook/react';\nimport { boolean, select } from '@storybook/addon-knobs/react';\nimport { Link, TextDisplay ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove sass handling from gulp (handled by webpack)\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar gulp = require('gulp');\nvar sass = require('gulp-sass');\nvar sassLint = require('gulp-sass-lint');\nvar concat = require('gulp-concat');\nvar sourcemaps = r... | javascript | chosen |
[
{
"from": "system",
"value": "Fix issue where bundle was happening before compile finished\n"
},
{
"from": "human",
"value": "var tsproject = require('tsproject');\nvar gulp = require('gulp');\nvar rjs = require('requirejs');\n\ngulp.task('compile', function () {\n tsproject.src('./')\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Include subfolders of `demo` and `test` folders for linting\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar gulp = require('gulp');\nvar eslint = require('gulp-eslint');\nvar htmlExtract = require('gulp-html-extract');\nvar stylelint = require('gulp-stylelin... | javascript | chosen |
[
{
"from": "system",
"value": "Fix ordering of gulp tasks\n"
},
{
"from": "human",
"value": "var gulp = require('gulp');\nvar jade = require('gulp-jade');\nvar uglify = require('gulp-uglify');\nvar concat = require('gulp-concat');\nvar rename = require('gulp-rename');\nvar minifyCSS = require('gu... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor to follow style guides\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\n\n/**\n * @module components\n * @class sl-pagination-info\n */\nexport default Ember.Component.extend({\n\n /**\n * Class names for the root element\n *\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Disable polling messages on the telegram bot\n\n* Since the bot does not need to receive messages, disabling polling would\n not affect the program.\n"
},
{
"from": "human",
"value": "const TelegramBot = require('node-telegram-bot-api');\nmodule.exports = class Tel... | javascript | chosen |
[
{
"from": "system",
"value": "Use Firefox by default and \"Verbose\" view\n"
},
{
"from": "human",
"value": "module.exports = {\n baseURL: 'http://localhost:2030',\n browser: 'chrome'\n}\n"
},
{
"from": "gpt",
"value": "module.exports = {\n baseURL: 'http://localhost:2030',\... | javascript | chosen |
[
{
"from": "system",
"value": "Allow console use in Phantom\n"
},
{
"from": "human",
"value": "module.exports = {\n afterEnd: function(runner) {\n var fs = require('fs');\n var coverage = runner.page.evaluate(function() {\n return window.__coverage__;\n });\n\n if (coverage) {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add comment around weird `lastMonth` in Home route\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar renderComponent = require('../lib/component').render;\n\nmodule.exports = function (route) {\n route.name = 'home';\n\n route.get(function (req, res) {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add check so clearTimeout passes flow\n"
},
{
"from": "human",
"value": "/*\n * @flow\n */\n\nexport default function debounce(\n fn: () => void,\n delay: number = 250,\n): () => void {\n let timer = null;\n return function() {\n clearTimeout(timer);\n tim... | javascript | chosen |
[
{
"from": "system",
"value": "Add tests for failure conditions\n"
},
{
"from": "human",
"value": "const expect = require('chai').expect;\nconst validPassword = require('../lib/validPassword');\n\nit('should return new password', function() {\n let result = validPassword('old', 'new', 'new');\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Remove commented code because it's the right thing to do.\n"
},
{
"from": "human",
"value": "// import React, { Component } from 'react';\n// import {\n// StyleSheet,\n// Text,\n// View,\n// Image,\n// TouchableHighlight,\n// Alert,\n// TextInput,\n// ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix test support in monorepo\n"
},
{
"from": "human",
"value": "module.exports = {\n setupFilesAfterEnv: ['./rtl.setup.js'],\n verbose: true,\n moduleDirectories: ['<rootDir>/node_modules'],\n transform: {\n '^.+\\\\.(js|tsx?)$': '<rootDir>/jest.t... | javascript | chosen |
[
{
"from": "system",
"value": "Set valid as true if name is correct\n"
},
{
"from": "human",
"value": "var cordova = require(\"cordova\");\nwindow.onload = action\nvar action = document.pesan.action = login();\t\nvar rs = [\"Royal Progress\", \"RSUP Dr Cipto Mangunkusumo\", \"RSUP Fatmawati\", \"... | javascript | chosen |
[
{
"from": "system",
"value": "Remove forward slashes on path.join call for htpasswd file\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst http = require('http');\nconst path = require('path');\nconst url = require('url');\nconst auth = require('http-auth');\nconst HttpStatusCodes = req... | javascript | chosen |
[
{
"from": "system",
"value": "Allow cache path to be overwritten on by commandline option\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\nvar path = require('path');\n\n/*\n * NPM modules\n */\nvar program = require('commander');\nvar yaml = require(\"js-yaml\");\nvar fs = require('fs-... | javascript | chosen |
[
{
"from": "system",
"value": "Move the construction of user credentials into parseUrl(), and only construct username and password if they're undefined (which is currently the case with phantomjs.\n"
},
{
"from": "human",
"value": "import Ember from \"ember\";\n\n// We create an anchor since that... | javascript | chosen |
[
{
"from": "system",
"value": "Add remove function to drama model\n"
},
{
"from": "human",
"value": "(function(){\n'use strict';\n\nangular\n .module('secondLead')\n \n .factory('DramaModel',['Restangular', function(Restangular) {\n var baseDramas = Restangular.all('dramas');\n\n retur... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug where format links did not work\n"
},
{
"from": "human",
"value": "$(document).ready(function() {\n\t$('#FontSize a').click(function() {\n\t\t$('.content').css(\"font-size\", this.dataset.size);\n\t});\n\n\t$('#FontFamily a').click(function(){\n\t\t$('.conte... | javascript | chosen |
[
{
"from": "system",
"value": "Use full path for eslint-config-airbnb\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst _ = require('lodash')\n\nconst extendConfig = require('../lib/extendConfig')\nconst mainRules = require('./main')\n\nconst eslintConfigAirbnb = extendConfig({\n extends:... | javascript | chosen |
[
{
"from": "system",
"value": "Make progressbar 0% wide if no votes for that alternative\n"
},
{
"from": "human",
"value": "import React, { PropTypes } from 'react';\nimport css from './VoteCounter.css';\n\nconst VoteCounter = ({ count, total, label }) => (\n <div className={css.counter}>\n <... | javascript | chosen |
[
{
"from": "system",
"value": "Add plan binding and remove this.plan from constructor\n"
},
{
"from": "human",
"value": "import angular from 'angular';\n// components used by this module\n\n// imports for this component\nimport template from './feed.html';\nimport './feed.css';\n\nclass FeedContr... | javascript | chosen |
[
{
"from": "system",
"value": "Set mocha test timeout for entire test, extended timeout to 30 seconds.\n"
},
{
"from": "human",
"value": "/*global describe, beforeEach, it*/\n'use strict';\n\nvar path = require('path');\nvar helpers = require('yeoman-generator').test;\n\ndescribe('Ionic Framew... | javascript | chosen |
[
{
"from": "system",
"value": "Set getAssetPath method stub in render function used in tests\n"
},
{
"from": "human",
"value": "const nunjucks = require('nunjucks')\nconst jsdom = require('jsdom')\nconst { JSDOM } = jsdom\n\nconst tradeElementsFilters = require('~/config/nunjucks/trade-elements-f... | javascript | chosen |
[
{
"from": "system",
"value": "Fix case where there's no subject in an email\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar Immutable = require('immutable')\n\nconst AUTHORS_BY_MSG_ID = {}\n\nconst EMPTY_ITEM_MAP = Immutable.Map({ total: 0, trend: 0 })\n , inc = n => n + 1\n , in... | javascript | chosen |
[
{
"from": "system",
"value": "Allow quality to be configurable\n\nIn images with few colors (such as a 4-color palette), a high value would remove most of the detail, resulting in a nearly flat/blank image."
},
{
"from": "human",
"value": "var GifEncoder = require(\"gif-encoder\")\nvar concat = ... | javascript | chosen |
[
{
"from": "system",
"value": "Use roman numerals for additional conditions\n\n"
},
{
"from": "human",
"value": "const {firstItem} = require('./functionalHelpers');\n\nmodule.exports = {romanise, romaniseLower};\n\nconst numerals = {\n 1: 'I',\n 4: 'IV',\n 5: 'V',\n 9: 'IX',\n 10: ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix thread color parameter as optional\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar utils = require(\"../utils\");\nvar log = require(\"npmlog\");\n\nmodule.exports = function(defaultFuncs, api, ctx) {\n return function changeThreadColor(color, threadI... | javascript | chosen |
[
{
"from": "system",
"value": "Allow new user AJAX call to accept HTTP status code instead of manual code\n"
},
{
"from": "human",
"value": "angular.module('dataGoMain')\n .controller('WelcomeController', ['$scope', '$http', 'dataGoAPI', '$rootScope',function($scope, $http, dataGoAPI, $rootSco... | javascript | chosen |
[
{
"from": "system",
"value": "Update every five seconds, fade it in.\n"
},
{
"from": "human",
"value": "(function($) {\n var coins = ['btc', 'ltc', 'nmc', 'ppc'];\n\n coins.forEach(function(coin) {\n updateCoin(coin);\n });\n})(jQuery);\n\nfunction updateCoin(coin) {\n var baseUrl = 'http... | javascript | chosen |
[
{
"from": "system",
"value": "Add check for all states\n"
},
{
"from": "human",
"value": "const resources_template = require(\"./templates/resources-simple.hbs\");\n\n/* parallax on blog posts with cover image */\nvar parallaxImage = document.getElementById('ParallaxImage');\nvar windowScrolled;... | javascript | chosen |
[
{
"from": "system",
"value": "Remove hard coded route function\n"
},
{
"from": "human",
"value": "var DropboxBase = require('./dropbox-base');\nvar routes = require('./routes');\nvar Dropbox;\n\n/**\n * @class Dropbox\n * @extends DropboxBase\n * @classdesc The Dropbox SDK class that provides me... | javascript | chosen |
[
{
"from": "system",
"value": "Update the ES version supported by ESLint\n"
},
{
"from": "human",
"value": "// See http://eslint.org/docs/\nmodule.exports = {\n env: {es6: true, commonjs: true},\n parserOptions: {\n ecmaVersion: 6,\n ecmaFeatures: {jsx: true}\n },\n exte... | javascript | chosen |
[
{
"from": "system",
"value": "Add parentheses around all lists so that nested lists are supported (without them Sass throws an error).\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar opts = {\n prefix: '',\n suffix: '',\n suffixLastItem: true,\n};\n\nfunction objToValue(obj, opts) {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Update blueprint to add npm package\n"
},
{
"from": "human",
"value": "// /*jshint node:true*/\n// module.exports = {\n// description: 'add leaflet-draw assets, using bower',\n//\n// normalizeEntityName: function() {}, // no-op since we're just adding dependenci... | javascript | chosen |
[
{
"from": "system",
"value": "Allow Gutibot to supply incoming hook url\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nconst slack = require('./utils/slackUtils');\nconst axios = require('axios');\n\nfunction _ok(response) {\n return response.status(200);\n}\n\nfunction respondOk(respons... | javascript | chosen |
[
{
"from": "system",
"value": "Remove custom 1D lerp() function.\n\nTHREE.Math.lerp() was added in three.js r82.\n"
},
{
"from": "human",
"value": "import * as THREE from 'three';\n\nexport function randomPointOnSphere( vector = new THREE.Vector3() ) {\n const theta = 2 * Math.PI * Math.random()... | javascript | chosen |
[
{
"from": "system",
"value": "Set random 5-10 second interval\n"
},
{
"from": "human",
"value": "let dictionary = new Dictionary();\nlet httpRequest = new HttpRequest();\n\nhttpRequest.get(dictionary.randomUrl, function(o) {\n console.log(o)\n});"
},
{
"from": "gpt",
"value": "let... | javascript | chosen |
[
{
"from": "system",
"value": "Reset state when user logs out\n"
},
{
"from": "human",
"value": "import { reducer as formReducer } from 'redux-form';\nimport { combineReducers } from 'redux';\nimport { routerReducer } from 'react-router-redux';\n\nimport { \n\torganization,\n\tstarredBoard,\n\tno... | javascript | chosen |
[
{
"from": "system",
"value": "Edit slides by finding them from the collection\n"
},
{
"from": "human",
"value": "define([\n \"backbone\",\n \"jquery\",\n \"view/HomeView\",\n \"collection/Presentation\",\n \"view/PresentationView\",\n \"model/Slide\",\n \"view/SlideView\"\n]... | javascript | chosen |
[
{
"from": "system",
"value": "Modify export to allow importing selectively\n"
},
{
"from": "human",
"value": "import rms from './extractors/rms';\nimport energy from './extractors/energy';\nimport spectralSlope from './extractors/spectralSlope';\nimport spectralCentroid from './extractors/spectr... | javascript | chosen |
[
{
"from": "system",
"value": "Fix broken comment in slug function\n"
},
{
"from": "human",
"value": "var updatableSlug = true;\n/* jQuery because BS brings it in; trivial to remove */\nfunction sluggify(str) {\n if (!str) {\n return \"\";\n }\n /* we could check for the existenc... | javascript | chosen |
[
{
"from": "system",
"value": "Remove method that was vestigial from pre-1.0.0 release\n"
},
{
"from": "human",
"value": "var\n fs = require('fs'),\n _ = require('underscore'),\n createTemplates = require('./poet/templates'),\n createHelpers = require('./poet/helpers'),\n routes = require('... | javascript | chosen |
[
{
"from": "system",
"value": "Use sequence number instead of timestamp to avoid cache\n"
},
{
"from": "human",
"value": "var Pinger = {\n};\n\n// http://stackoverflow.com/a/573784\nPinger.getPing = function(target, callback) {\n var start;\n var client = Pinger.getClient(); // xmlhttprequest o... | javascript | chosen |
[
{
"from": "system",
"value": "Fix improper grab of the pusher controller in unwire\n"
},
{
"from": "human",
"value": "var global = (typeof window !== 'undefined') ? window : {},\n Ember = global.Ember;\n\nvar Bindings = Ember.Mixin.create({\n\n needs: 'pusher',\n\n init: function() {\n v... | javascript | chosen |
[
{
"from": "system",
"value": "Allow user scripts to execute in their directories.\n"
},
{
"from": "human",
"value": "const Promise = require('bluebird')\nconst { exec } = require('child_process')\n\nPromise.config({\n cancellation: true,\n})\n\nclass Process {\n static execute (script, options... | javascript | chosen |
[
{
"from": "system",
"value": "Add ConnectionError and RequestError to module.exports\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports.BulkLoad = require('./bulk-load');\nmodule.exports.Connection = require('./connection');\nmodule.exports.Request = require('./request');\nmodule... | javascript | chosen |
[
{
"from": "system",
"value": "Add google event tracking capability\n"
},
{
"from": "human",
"value": "import { GOOGLE_ANALYTICS_ID } from '../AppSettings';\nimport { GoogleAnalyticsTracker } from 'react-native-google-analytics-bridge';\n\nlet tracker = new GoogleAnalyticsTracker(GOOGLE_ANALYTICS... | javascript | chosen |
[
{
"from": "system",
"value": "Use Karma 0.14 style programmatic calling\n\nFixes https://github.com/olyckne/laravel-elixir-karma/issues/2\n"
},
{
"from": "human",
"value": "var gulp = require('gulp');\nvar elixir = require('laravel-elixir');\nvar karma = require('karma').server;\nvar _ = require... | javascript | chosen |
[
{
"from": "system",
"value": "Fix heroku using wrong port\n"
},
{
"from": "human",
"value": "/**\n * ENVIRONMENT VARIABLES\n * TOKEN_LIFE: Number of seconds before a token expires\n * APP_TOKEN: Facebook app token\n * APP_ID: Facebook app ID\n * ADMIN_ID: Client ID for admin program\n * ADMIN_SE... | javascript | chosen |
[
{
"from": "system",
"value": "Use express' response.json() method because it sets proper header automatically\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst express = require('express');\nconst moment = require('moment');\n\nconst app = express();\nconst port = process.argv[2] || 3000... | javascript | chosen |
[
{
"from": "system",
"value": "Update /signin link to /login\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react'\nimport { Link, IndexLink } from 'react-router'\n\nexport class Nav extends Component {\n constructor(props) {\n super(props)\n }\n\n render() {\n retu... | javascript | chosen |
[
{
"from": "system",
"value": "Support `root` as direct argument\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = function (deck/*, options*/) {\n\tvar options = Object(arguments[1]), root = options.root || '/'\n\t , update, activateSlide;\n\n\tactivateSlide = function (index... | javascript | chosen |
[
{
"from": "system",
"value": "Update configuration file for new implicit root path\n"
},
{
"from": "human",
"value": "var config = module.exports;\n\nconfig[\"Node tests\"] = {\n environment: \"node\",\n tests: [\"test/*.js\"]\n};\n"
},
{
"from": "gpt",
"value": "var config = m... | javascript | chosen |
[
{
"from": "system",
"value": "Return array of objs and using stream.\n"
},
{
"from": "human",
"value": "'use strict';\nvar HOSTS = process.platform === 'win32'\n ? 'C:/Windows/System32/drivers/etc/hosts'\n : '/etc/hosts'\nvar readFileSync = require('fs').readFileSync;\nmodule.exports = functio... | javascript | chosen |
[
{
"from": "system",
"value": "Remove Connect 3 deprecation warning\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar _ = require('underscore');\nvar config = require('./config');\nvar express = require('express');\nvar knox = require('knox');\n\nvar app = express();\n\n// Configure knox.\n... | javascript | chosen |
[
{
"from": "system",
"value": "Use correct error status code.\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst runner = require('toisu-middleware-runner');\nconst stacks = new WeakMap();\n\nclass Toisu {\n constructor() {\n stacks.set(this, []);\n this.handleError = Toisu.defaultH... | javascript | chosen |
[
{
"from": "system",
"value": "Make default level a warning\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nmodule.exports = {\n rules: {\n \"jquery-var-name\": require(\"./lib/rules/jquery-var-name\"),\n \"check-closure-globals\": require(\"./lib/rules/check-closure-global... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.