conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Use query string to select game\n" }, { "from": "human", "value": "#\n# main.coffee\n#\n# Role: start the app\n#\n# Responsibility:\n# * load top-level modules\n# * initalize game based on query string\n# * render and append to body of HTML\n# * run tests if local\n...
coffeescript
chosen
[ { "from": "system", "value": "Remove access for pingdom for normal sys info call\n" }, { "from": "human", "value": "\"use strict\"\n\nos = require 'os'\n\nexports.info = (req, res, next) ->\n return res.status(403).end() if req.usr not in ['DNT', 'Pingdom']\n\n res.json 200,\n app:\n u...
coffeescript
chosen
[ { "from": "system", "value": "Add make-runner package to Atom\n" }, { "from": "human", "value": "\"*\":\n editor:\n showIndentGuide: true\n fontFamily: \"Inconsolata\"\n invisibles: {}\n scrollPastEnd: true\n softWrap: true\n softWrapAtPreferredLineLength: true\n preferredL...
coffeescript
chosen
[ { "from": "system", "value": "Move created record to the top of the stack\n" }, { "from": "human", "value": "Base = require './base.coffee'\nBackbone = require 'backbone'\nBackbone.LocalStorage = require 'backbone.localstorage'\nBlock = require '../models/block.coffee'\n\nmodule.exports = class ...
coffeescript
chosen
[ { "from": "system", "value": "Check that legIndex isn't empty.\n" }, { "from": "human", "value": "define ['backbone', 'utils', 'backboneAnalytics'], (Backbone, Utils) ->\n Backbone.Router.extend\n\n initialize: () ->\n @route '', 'homeView'\n @route /([^\\/]+)\\/([^\\/]+)\\/([^\\/]...
coffeescript
chosen
[ { "from": "system", "value": "Tweak test command for Windows\n" }, { "from": "human", "value": "module.exports = (grunt) ->\n grunt.initConfig\n pkg: grunt.file.readJSON('package.json')\n\n coffee:\n glob_to_multiple:\n expand: true\n cwd: 'src'\n src: ['*.coffee...
coffeescript
chosen
[ { "from": "system", "value": "Fix conflicto con alt + cursor\n" }, { "from": "human", "value": "# Hay que bindear tanto cuando se carga la página como cuando turbolinks la\n# pide (el page:change)\nbindearTodo = ->\n # mejora el estilo default de los file uploaders\n $(\"form.carta :file\").fi...
coffeescript
chosen
[ { "from": "system", "value": "Make the stepped animation finish closer together\n" }, { "from": "human", "value": "# Place all the behaviors and hooks related to the matching controller here.\n# All this logic will automatically be available in application.js.\n# You can use CoffeeScript in this...
coffeescript
chosen
[ { "from": "system", "value": "Declare options for --help usage.\n" }, { "from": "human", "value": "fs = require 'fs'\npath = require 'path'\nyeoman = require 'yeoman-generator'\nsemver = require 'semver'\n\nmodule.exports = class SlideGenerator extends yeoman.generators.NamedBase\n\n files: -...
coffeescript
chosen
[ { "from": "system", "value": "Fix deprecated selectors in keymap\n" }, { "from": "human", "value": "'.platform-darwin .editor':\n 'ctrl-shift-u': 'encoding-selector:show'\n\n'.platform-win32 .editor':\n 'ctrl-shift-u': 'encoding-selector:show'\n\n'.platform-linux .editor':\n 'ctrl-u': 'encodi...
coffeescript
chosen
[ { "from": "system", "value": "Add Atom ruby-test preferred spec framework\n" }, { "from": "human", "value": "\"*\":\n \"atom-ctags\": {}\n \"autocomplete-plus\":\n enableAutoActivation: false\n core:\n audioBeep: false\n disabledPackages: [\n \"exception-reporting\"\n ]\n ...
coffeescript
chosen
[ { "from": "system", "value": "Fix spec file to enable --force-exclusion option in RuboCop\n" }, { "from": "human", "value": "Rubocop = require '../../lib/linter/rubocop'\n\ndescribe 'Rubocop', ->\n rubocop = null\n\n beforeEach ->\n rubocop = new Rubocop('/path/to/target.rb')\n\n describe ...
coffeescript
chosen
[ { "from": "system", "value": "Check if pretender is available\n" }, { "from": "human", "value": "{fork} = require('child_process')\nprerenderUrl = 'http://127.0.0.1:' + (process.env.PORT or 3000)\n\nmodule.exports = (app) ->\n # Start up prerender server\n child = fork('server/prerender/server...
coffeescript
chosen
[ { "from": "system", "value": "Fix bug in fetch-mock that breaks custom Promise usage\n" }, { "from": "human", "value": "_ = require('lodash')\nPromise = require('bluebird')\n\nIS_BROWSER = window?\n\nif (IS_BROWSER)\n\t# The browser mock assumes global fetch prototypes exist\n\trealFetchModule =...
coffeescript
chosen
[ { "from": "system", "value": "Use the undocumented cookies api\n" }, { "from": "human", "value": "passport = require 'passport'\ndebug = require('debug')('meshblu-google-authenticator:routes')\nurl = require 'url'\n\nclass Router\n constructor: (@app) ->\n\n register: =>\n @app.get '/', (r...
coffeescript
chosen
[ { "from": "system", "value": "Use the new CoveringView API in MergeConflict.\n" }, { "from": "human", "value": "MergeConflictsView = require './merge-conflicts-view'\nSideView = require './side-view'\nNavigationView = require './navigation-view'\nConflict = require './conflict'\n\nmodule.exports...
coffeescript
chosen
[ { "from": "system", "value": "Add disable select_users when public is false\n" }, { "from": "human", "value": "$ ->\n $('.reminder_active').on 'change', ->\n $('.reminder_days_before').prop \"disabled\", !@.checked\n\n select2_options =\n theme: 'bootstrap'\n placeholder: 'Selecione o...
coffeescript
chosen
[ { "from": "system", "value": "Delete white spaces at end of file\n" }, { "from": "human", "value": "kd = require 'kd'\nKDCustomHTMLView = kd.CustomHTMLView\nKodingSwitch = require 'app/commonviews/kodingswitch'\nCustomLinkView = require 'app/customlinkview'\nmodule.exports = class IDEChatHeadWat...
coffeescript
chosen
[ { "from": "system", "value": "Adjust minutes and seconds counters to have a zero on the left when they are less\nthan 10.\n" }, { "from": "human", "value": "'use strict'\n\n@start = (limit) ->\n window.startDate = new Date().getTime()\n window.elapsedSeconds = 0\n window.seconds = 0\n window...
coffeescript
chosen
[ { "from": "system", "value": "Fix \"How did you hear about The Queen's Awards?\" conditional JS\n" }, { "from": "human", "value": "jQuery ->\n ($ '#account-next-step').on 'click', (e) ->\n do e.preventDefault\n do ($ '#account-form').submit\n\n if ($ '#user_qae_info_source_other').length...
coffeescript
chosen
[ { "from": "system", "value": "Use constructor instead of init\n" }, { "from": "human", "value": "class window.DP.Realtime\n init: ->\n if typeof Pusher == 'function'\n @pusher = new Pusher(DP.PUSHER_KEY)\n @channel = @pusher.subscribe DP.Round.url\n @channel.bind('new:charge',...
coffeescript
chosen
[ { "from": "system", "value": "Save sequence if location.search exists\n\nブラウザで直接アドレス(URL)を指定した場合も、\n次からはその画面を開けるようにするために、location.search を見て検索条件を保持するようにした\n" }, { "from": "human", "value": "$ ->\n saveSequence = (sequence) ->\n if sequence?\n localStorage.setItem('sequence', sequence)\n...
coffeescript
chosen
[ { "from": "system", "value": "Fix for executing PHP on Windows" }, { "from": "human", "value": "child_process = require 'child_process'\n\nmodule.exports =\n\tactivate: (state) ->\n\t\tatom.commands.add 'atom-workspace', 'wp-phptidy:run': => @run()\n\t\n\trun: ->\n\t\teditor = atom.workspace.get...
coffeescript
chosen
[ { "from": "system", "value": "Increase contrast of mine agains background\n" }, { "from": "human", "value": "Crafty.c 'Mine',\n init: ->\n @requires 'Color, Enemy'\n\n mine: (attr = {}) ->\n @attr _.defaults(attr,\n w: 25, h: 25, health: 200)\n @origin 'center'\n @color '#5555...
coffeescript
chosen
[ { "from": "system", "value": "Fix bug - yellows last move not displayed when he wins\n" }, { "from": "human", "value": "window.Game = class Game\n constructor: (grid, moves, status, winner) ->\n console.log 'Game ctor'\n @gameBoard = new GameBoard($('#canvas'), $('#canvasOverlay'), {\n ...
coffeescript
chosen
[ { "from": "system", "value": "Change darts-ui size to fit screen\n" }, { "from": "human", "value": "'use strict'\n\nclass Game\n\n constructor: ->\n peer = new Peer 'server', {host: 'localhost', port: 9999}\n conn = peer.connect 'device'\n\n conn.on 'open', =>\n ...
coffeescript
chosen
[ { "from": "system", "value": "Initialize can be implemented instead of implementing the constructor on a layer. Meaning super isn't required.\n" }, { "from": "human", "value": "window.Echotron ||= {}\nEchotron.Echoes ||= {}\nEchotron.Echoes.foreground ||= []\nEchotron.Echoes.midground ||= []\nE...
coffeescript
chosen
[ { "from": "system", "value": "Add command to automatically install extensions.\n" }, { "from": "human", "value": "program = require 'commander'\n\nprogram\n .command('new [name]')\n .description('create a new app and/or extension')\n .usage('[name] [options]')\n .option('-t, --template [name...
coffeescript
chosen
[ { "from": "system", "value": "Add 'Are there any illustrations?' question\n" }, { "from": "human", "value": "Rectangle = require './drawing-tools/rectangle'\nDetails = require './tasks/details'\n\nmodule.exports =\n id: 'bhl'\n background: 'background.jpg'\n\n producer: 'Missouri Botanical Ga...
coffeescript
chosen
[ { "from": "system", "value": "Fix the console logging from invalid json\n" }, { "from": "human", "value": "module.exports.listen = (port) ->\n createApp().listen port\n\ncreateApp = () ->\n express = require 'express'\n bodyParser = require 'body-parser'\n errors = require './errors'\n\n al...
coffeescript
chosen
[ { "from": "system", "value": "Change JSX default beautifier back to Pretty Diff" }, { "from": "human", "value": "module.exports = {\n\n name: \"JSX\"\n namespace: \"jsx\"\n fallback: ['js']\n\n ###\n Supported Grammars\n ###\n grammars: [\n \"JSX\"\n \"JavaScript (JSX)\"\n \"Babe...
coffeescript
chosen
[ { "from": "system", "value": "Prepend newly enabled themes, not append\n" }, { "from": "human", "value": "AtomPackage = require './atom-package'\nPackage = require './package'\n\n### Internal: Loads and resolves packages. ###\n\nmodule.exports =\nclass ThemePackage extends AtomPackage\n\n getTy...
coffeescript
chosen
[ { "from": "system", "value": "Add an empty line to separate methods\n" }, { "from": "human", "value": "React = require 'react'\n{PureRenderMixin} = require('react/addons').addons\ncx = require 'classname'\nstyleMixin = require 'mixins/style-mixin'\n\nmodule....
coffeescript
chosen
[ { "from": "system", "value": "Enforce order of build tasks.\n\nFixes issue with race condition on build.\n" }, { "from": "human", "value": "gulp = require 'gulp'\n\ncoffee = require 'gulp-coffee'\nconcat = require 'gulp-concat'\ngutil = require 'gulp-util'\nuglify = require 'gulp-uglify'\nwrap =...
coffeescript
chosen
[ { "from": "system", "value": "Add snippet for inserting a vanilla code-block\n" }, { "from": "human", "value": "'.text.restructuredtext':\n 'image':\n 'prefix': 'image'\n 'body': '.. image:: ${1:path}\\n$0'\n 'link':\n 'prefix': 'link'\n 'body': '\\\\`${1:Title} <${2:http://link}>\...
coffeescript
chosen
[ { "from": "system", "value": "Make graphs <-> series mapping use naturalOrder too\n" }, { "from": "human", "value": "class PG.Legend\n\n defaults:\n className: \"legend\"\n\n constructor: (container, @graphs, options) ->\n @container = $(container)\n @options = $.extend @defaults, opt...
coffeescript
chosen
[ { "from": "system", "value": "Make the easing smoother at the end\n" }, { "from": "human", "value": "# Place all the behaviors and hooks related to the matching controller here.\n# All this logic will automatically be available in application.js.\n# You can use CoffeeScript in this file: http://...
coffeescript
chosen
[ { "from": "system", "value": "Implement global selection in relations table from New Chapter\n\nCloses #136\n" }, { "from": "human", "value": "window.App ||= {}\n\nApp.Visualization = require './visualization.js'\nApp.Story = require './story.js'\nApp.Trix = require 'script!trix...
coffeescript
chosen
[ { "from": "system", "value": "Support for merging multiple properties into one\n" }, { "from": "human", "value": "noflo = require \"noflo\"\n\nclass DuplicateProperty extends noflo.Component\n constructor: ->\n @properties = {}\n\n @inPorts =\n property: new noflo.Arr...
coffeescript
chosen
[ { "from": "system", "value": "Throw an error if sending to an unattached port\n" }, { "from": "human", "value": "events = require \"events\"\n\nclass Port extends events.EventEmitter\n constructor: (name) ->\n @name = name\n @socket = null\n @from = null\n\n attach: (s...
coffeescript
chosen
[ { "from": "system", "value": "Add to window when in the browser, listen for blur\n" }, { "from": "human", "value": "$.fn.edit = ->\n form = new Phalange( el: @ )\n @\n\nclass Phalange extends Backbone.View\n initialize: ->\n @text = @$el.text()\n\n events:\n \"click\": \"append\"\n ...
coffeescript
chosen
[ { "from": "system", "value": "Use AceView which is bundled editor of Koding for EditorPane.\n" }, { "from": "human", "value": "class EditorPane extends Pane\n\n constructor: (options = {}, data) ->\n\n options.cssClass = KD.utils.curry \"editor-pane\", options.cssClass\n\n super options, ...
coffeescript
chosen
[ { "from": "system", "value": "Fix for photo grid overlap\n" }, { "from": "human", "value": "$(document).ready ->\n # Photo grid\n photoGrid = $(\".photo-grid\")\n photoGrid.on \"reload:grid\", ->\n opts = wookmarkOptions(calculateGridWidth())\n photoGrid.find(\".photo, .user-block\").wo...
coffeescript
chosen
[ { "from": "system", "value": "Use instance method instead static method.\n" }, { "from": "human", "value": "CSV = require('csv')\nQ = require('q')\n\nargv = require('optimist')\n .usage('Usage: $0 --types product-types.csv --attributes product-types-attributes.csv')\n .demand(['types', 'attrib...
coffeescript
chosen
[ { "from": "system", "value": "Call https api if we are on https\n" }, { "from": "human", "value": "import fetch from 'isomorphic-fetch';\n\nport = (process.env.OPENSHIFT_NODEJS_PORT || process.env.PORT || '3000')\nip = (process.env.OPENSHIFT_NODEJS_IP || '127.0.0.1')\nexport API_URL = (if (typeo...
coffeescript
chosen
[ { "from": "system", "value": "Bring in code to load google fonts\n" }, { "from": "human", "value": "$ ->\n console.log \"Document ready.\"\n startRenderer()\n startNetworking()\n startInput()\n" }, { "from": "gpt", "value": "# Export Google WebFont Config\nwindow.WebFontC...
coffeescript
chosen
[ { "from": "system", "value": "Add link to home for 404 page.\n" }, { "from": "human", "value": "goog.provide 'app.react.pages.NotFound'\n\nclass app.react.pages.NotFound\n\n ###*\n @constructor\n ###\n constructor: ->\n {div,h1,p} = React.DOM\n\n @create = React.createClass\n\n ...
coffeescript
chosen
[ { "from": "system", "value": "Add handler to invoke feedback modal\n" }, { "from": "human", "value": "openMultiPageModal = require '../../../components/multi_page_modal/index.coffee'\nSpecialistView = require '../../../components/contact/general_specialist.coffee'\n\nmodule.exports.init = ->\n ...
coffeescript
chosen
[ { "from": "system", "value": "Adjust initialization for this being the matched element's ElementWrapper\n" }, { "from": "human", "value": "# Copyright 2012 The Apache Software Foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except i...
coffeescript
chosen
[ { "from": "system", "value": "Update Validators to pass Instances instead of references\n" }, { "from": "human", "value": "ValidationMixin =\n getInitialState: ->\n validationErrors: []\n hasErrors: false\n\n componentDidMount: ->\n if @props.validators\n @loadValidators()\n\n l...
coffeescript
chosen
[ { "from": "system", "value": "Handle constructor.name being undefined in ViewBinding." }, { "from": "human", "value": "#= require ./abstract_binding\n\nclass Batman.DOM.ViewBinding extends Batman.DOM.AbstractBinding\n skipChildren: true\n onlyObserve: Batman.BindingDefinitionOnlyObserve.Data\n...
coffeescript
chosen
[ { "from": "system", "value": "Update test instance AMI identifier\n" }, { "from": "human", "value": "module.exports =\n current: 'ami-bf235ad5'\n\n # Ordered by creation date\n list: [\n 'ami-5dd50436'\n 'ami-bf235ad5'\n ]\n" }, { "from": "gpt", "value": "module.exports =...
coffeescript
chosen
[ { "from": "system", "value": "Grunt: Fix options passed to microflo-emscripten\n" }, { "from": "human", "value": "\nmicroflo = (target) ->\n build = [\n \"make -f ./node_modules/microflo-emscripten/Makefile\"\n target\n \"BUILD_DIR=build\"\n \"MICROFLO=./node_modul...
coffeescript
chosen
[ { "from": "system", "value": "Test duplicate prevention when copying\n" }, { "from": "human", "value": "describe \"Lanes.Models.Collection\", ->\n\n\n it \"it triggers promise on loading\", (done) ->\n Model = Lanes.Test.defineModel\n props: { id: 'integer', title: 'string' ...
coffeescript
chosen
[ { "from": "system", "value": "Put grammar selector on the right side by default\n\nThis will make it play nicer with showing more information after the\ncharacter position on the left side such as the character count.\n\nRefs atom/status-bar#31\n" }, { "from": "human", "value": "module.exports =...
coffeescript
chosen
[ { "from": "system", "value": "Store initial machine turn on state in AppStorage\n" }, { "from": "human", "value": "kd = require 'kd'\n\nnick = require 'app/util/nick'\nTracker = require 'app/util/tracker'\n\n\nmodule.exports = (machine) ->\n\n return unless analytics\n return unless typ...
coffeescript
chosen
[ { "from": "system", "value": "Use Q nbind to make this cleaner\n" }, { "from": "human", "value": "Q = require 'q'\n\n# Provides a set of methods for voting data CRUD operations\nclass API\n constructor: (@db) ->\n throw \"must provide db connection\" unless @db\n\n createUser: (name) ->\n ...
coffeescript
chosen
[ { "from": "system", "value": "Use disposable returned from atom.commands.add\n" }, { "from": "human", "value": "{toggleQuotes} = require 'toggle-quotes'\n{CompositeDisposable} = require 'atom'\n\nmodule.exports =\n config:\n quoteCharacters:\n type: 'string'\n default: '\"\\''\n\n ...
coffeescript
chosen
[ { "from": "system", "value": "Fix problems with initial tooltip code\n" }, { "from": "human", "value": "# tool tips\n\nd3panels.tooltip_create = (selection, options) ->\n selection.append(\"div\")\n .attr(\"class\", \"d3panels-tooltip\")\n .style(\"opacity\", 0)\n\n\nd...
coffeescript
chosen
[ { "from": "system", "value": "Remove whitespace and unnecessary parens\n" }, { "from": "human", "value": "avatarResponder = require('./avatar_responder')\nCampfire.Transcript.messageTemplates = require('./message_templates')\n\nwindow.Chicisimo =\n Responders: []\n\nCampfire.USER_ACTIONS = ['en...
coffeescript
chosen
[ { "from": "system", "value": "Remove id \"card-element\" as well\n" }, { "from": "human", "value": "angular.module('admin.payments').directive \"stripeElements\", ($injector, AdminStripeElements) ->\n restrict: 'E'\n template: \"<label for='card-element'>\\\n <div id='card-element'...
coffeescript
chosen
[ { "from": "system", "value": "Add support for new inline code format\n" }, { "from": "human", "value": "'name': 'Weave.jl markdown'\nscopeName: 'source.weave.md'\n'fileTypes': [\n 'jmd'\n 'jmdw'\n 'mdw'\n]\npatterns: [\n {\n 'include' : 'source.weave.noweb'\n }\n {\n 'begin':...
coffeescript
chosen
[ { "from": "system", "value": "Add list of 'batteries included' for demo page\n" }, { "from": "human", "value": "Link = require('react-router').Link\n\nmodule.exports = React.createClass\n displayName: 'HelloWorld'\n render: ->\n <div>\n <h1>Hello world!</h1>\n <p>You're looking at...
coffeescript
chosen
[ { "from": "system", "value": "Update document search usage in taxon concept's page\n" }, { "from": "human", "value": "Species.TaxonConceptDocumentsRoute = Ember.Route.extend\n renderTemplate: ->\n @getDocuments()\n @render('taxon_concept/documents')\n\n getDocuments: ->\n model = this...
coffeescript
chosen
[ { "from": "system", "value": "Use master map tile selection for sensor map\n" }, { "from": "human", "value": "class Workbench.Views.SensorMapView extends Backbone.Marionette.ItemView\n template: false\n\n initialize: ->\n @zoom = 13\n\n onDestroy: ->\n @map.remove() if @map\n\n onShow:...
coffeescript
chosen
[ { "from": "system", "value": "Fix an issue that '<' and '>' were not shown correctly\n" }, { "from": "human", "value": "module.exports =\nclass BroadcastTarget\n editor: null\n listener: null\n isMarkdownPreview: false\n\n constructor: ->\n @editor = atom.workspace.activePaneItem\n\n @...
coffeescript
chosen
[ { "from": "system", "value": "Add selectors for spell checking.\n" }, { "from": "human", "value": "'exception-reporting':\n 'userId': 'ee24cf00-f793-9081-be2a-2cdae5536b7f'\n'release-notes':\n 'viewedVersion': '0.64.0'\n'welcome':\n 'showOnStartup': false\n'metrics':\n 'userId': '51eeb6113c1...
coffeescript
chosen
[ { "from": "system", "value": "Disable 'exceptino-reporting' so userId GUID isn’t checked in\n" }, { "from": "human", "value": "\"*\":\n core:\n telemetryConsent: \"limited\"\n themes: [\n \"one-light-ui\"\n \"one-light-syntax\"\n ]\n editor:\n fontFamily: \"'SF Mono', Men...
coffeescript
chosen
[ { "from": "system", "value": "Change camel case event names.\n" }, { "from": "human", "value": "globals = require 'globals'\n\nmodule.exports =\n\n getOperation : (current, selected) ->\n\n arr = [\n @planTitle.FREE\n @planTitle.HOBBYIST\n @planTitle.DEVELOPER\n @planTitl...
coffeescript
chosen
[ { "from": "system", "value": "Tweak a few Atom settings\n" }, { "from": "human", "value": "\"*\":\n \"exception-reporting\":\n userId: \"30e6f2d0-42d3-ab77-4984-dde4c431f019\"\n welcome:\n showOnStartup: false\n core: {}\n editor:\n invisibles: {}\n fontFamily: \"Hack\"\n autosa...
coffeescript
chosen
[ { "from": "system", "value": "Add basename to history for subdirectory deploys\n" }, { "from": "human", "value": "React = require 'react'\nReactDOM = {render} = require 'react-dom'\n{Router, Route, Link} = require 'react-router'\ncreateBrowserHistory = require 'history/lib/createBrowserHistory'\...
coffeescript
chosen
[ { "from": "system", "value": "Clear mini editor base select list cancelled()\n\nClearing the mini editor when closing is something\nall sub-classes were already doing so it makes sense\nto pull it up to the base class as the default\ncancelled() implementation that can still be overridden\nif needed.\n" }...
coffeescript
chosen
[ { "from": "system", "value": "Fix running specs on Windows.\n" }, { "from": "human", "value": "module.exports = (grunt) ->\n grunt.initConfig\n pkg: grunt.file.readJSON('package.json')\n\n coffee:\n glob_to_multiple:\n expand: true\n cwd: 'src'\n src: ['*.coffee'...
coffeescript
chosen
[ { "from": "system", "value": "Enable the fair setup and pass in the fair to the layered search view\n" }, { "from": "human", "value": "_ = require 'underscore'\nsd = require('sharify').data\nBackbone = require 'backbone'\n\nArtworks = require '../../../collections/artw...
coffeescript
chosen
[ { "from": "system", "value": ":new: Add basic methods to PanelView\n" }, { "from": "human", "value": "class PanelView extends HTMLElement\n constructor: ->\nmodule.exports = PanelView" }, { "from": "gpt", "value": "class PanelView extends HTMLElement\n constructor: ->\n registerMo...
coffeescript
chosen
[ { "from": "system", "value": "Format search query to display authorID with author's full name\n" }, { "from": "human", "value": "define (require) ->\n Backbone = require('backbone')\n settings = require('cs!settings')\n\n SEARCH_URI = \"#{location.protocol}//#{settings.cnxarchive.host}:#{sett...
coffeescript
chosen
[ { "from": "system", "value": "Add a fallback for Safari copy-to-clipboard\n\nAlso, hide the tooltip in a less stupid way.\n\nCloses #3547\n" }, { "from": "human", "value": "#= require clipboard\n\n$ ->\n clipboard = new Clipboard '.js-clipboard-trigger',\n text: (trigger) ->\n $target =...
coffeescript
chosen
[ { "from": "system", "value": "Add editor settings for adjusting indent/outdent\n" }, { "from": "human", "value": "\".source.viml\":\n\teditor:\n\t\tcommentStart: '\" '\n" }, { "from": "gpt", "value": "\".source.viml\":\n\teditor:\n\t\tcommentStart: '\" '\n\t\tincreaseIndentPattern: \...
coffeescript
chosen
[ { "from": "system", "value": "Set default vebosity to 3\n" }, { "from": "human", "value": "$ ->\n \n $(\"#slider\").slider\n value: 1\n min: 1\n max: 3\n slide: (event, ui) ->\n num = ui.value+1\n verbosity = while num -= 1 then 'v'\n $(\"#job_verbosity\").val verbos...
coffeescript
chosen
[ { "from": "system", "value": "Hide useful and personal supplies when there's no hash in the url.\n" }, { "from": "human", "value": "$( ->\n\n $('a.pdf-languages-trigger').click ->\n $(this).toggleClass 'active'\n $('.download-languages').toggleClass 'active'\n\n\tcategories = [\n\t\t{ hre...
coffeescript
chosen
[ { "from": "system", "value": "Fix secure store get keys\n" }, { "from": "human", "value": "# Secure version of the ledger.storage.ChromeStore. This store uses AES encryption for storing keys and data\nclass @ledger.storage.SecureStore extends ledger.storage.ChromeStore\n\n # @param [String] nam...
coffeescript
chosen
[ { "from": "system", "value": "Check for port change during link processing\n" }, { "from": "human", "value": "class Link\n constructor: (@page, @$link) ->\n\n allows_process: (event) ->\n !(this._cross_origin_link(event.currentTarget) ||\n this._non_standard_click(event))\n\n process:...
coffeescript
chosen
[ { "from": "system", "value": "Update migration 7 to interate over all messages with urls\n" }, { "from": "human", "value": "Meteor.startup ->\n\tMigrations.add\n\t\tversion: 7\n\t\tup: ->\n\n\t\t\tconsole.log 'Populate urls in messages'\n\t\t\tquery = ChatMessage.find({ 'urls.0': { $exists: true...
coffeescript
chosen
[ { "from": "system", "value": "Add menu and Win32/Linux keybindings\n" }, { "from": "human", "value": "'atom-workspace':\n 'cmd-shift-c': 'git:toggle-git-panel'\n\n'.git-StagingView':\n 'left': 'git:focus-diff-view'\n\n'.git-CommitView-editor atom-text-editor:not([mini])':\n 'cmd-enter': 'git:...
coffeescript
chosen
[ { "from": "system", "value": "Fix pan tool on retina\n" }, { "from": "human", "value": "{Tool} = require './base'\n{createShape} = require '../core/shapes'\n\n\nmodule.exports = class Pan extends Tool\n\n name: 'Pan'\n iconName: 'pan'\n usesSimpleAPI: false\n\n didBecomeActive: (lc) ->\n ...
coffeescript
chosen
[ { "from": "system", "value": "Remove superflous additions to Jony's regex per @tombell.\n" }, { "from": "human", "value": "# Description:\n# To create something that's… that's genuinely new,\n# you have to… to start again.\n#\n# Dependencies:\n# None\n#\n# Configuration:\n# None\n#\n# Co...
coffeescript
chosen
[ { "from": "system", "value": "Set metrics to zero for now\n" }, { "from": "human", "value": "Page = require 'controllers/page'\nApi = require 'zooniverse/lib/api'\n\nclass HomePage extends Page\n el: $('.home')\n className: 'home'\n template: require 'views/home'\n \n elements:\n '.part...
coffeescript
chosen
[ { "from": "system", "value": "Send name and version as user agent.\n" }, { "from": "human", "value": "Import = require '../lib/import'\nCONS = require '../lib/constants'\nfs = require 'fs'\nargv = require('optimist')\n .usage('Usage: $0 --projectKey key --clientId id --clientSecret secret --csv...
coffeescript
chosen
[ { "from": "system", "value": "Remove explicit variable declaration as its done by cs anyhow.\n" }, { "from": "human", "value": "FS = require 'fs'\nQ = require 'q'\n\n###\nClass for generating JSON product type representations from CSV files.\n###\nclass ProductTypeGenerator\n \n _options = {}\...
coffeescript
chosen
[ { "from": "system", "value": ":bug: Remove call to deprecated method\n" }, { "from": "human", "value": "MinimapSelectionView = require './minimap-selection-view'\n\nmodule.exports =\n\n active: false\n views: {}\n\n activate: (state) ->\n try\n atom.packages.activatePackage('minimap')...
coffeescript
chosen
[ { "from": "system", "value": "Rename normal users to logged-in users, loading now ...\n" }, { "from": "human", "value": "data =\n metrics:\n anon:\n colour: 'orange', number: 'loading...', title: 'Anonymous Visitors'\n ,\n normal:\n colour: 'blue', number: 'loading...', title...
coffeescript
chosen
[ { "from": "system", "value": "Add comment heading to document ready\n" }, { "from": "human", "value": "# *************************************\n#\n# Application\n# -> Manifest\n#\n# *************************************\n\n# -------------------------------------\n# Namespace\n# -----------...
coffeescript
chosen
[ { "from": "system", "value": "Set messages to correct phrases\n" }, { "from": "human", "value": "React = require 'react'\nBS = require 'react-bootstrap'\n\nMESSAGES = {\n student: [\n <p key='s1'>Tutor shows your weakest topics so you can practice to improve.</p>\n <p key='s2'>Try to ...
coffeescript
chosen
[ { "from": "system", "value": "Adjust selection when inserting gallery block breaks\n" }, { "from": "human", "value": "Trix.galleryFilter = (snapshot) ->\n filter = new Filter snapshot\n filter.perform()\n filter.getSnapshot()\n\nclass Filter\n constructor: (snapshot) ->\n {@document, @sel...
coffeescript
chosen
[ { "from": "system", "value": "Switch to using in so coffeescript can optimize\n" }, { "from": "human", "value": "#= require ./abstract_binding\n\nclass Batman.DOM.RouteBinding extends Batman.DOM.AbstractBinding\n onAnchorTag: false\n onlyObserve: Batman.BindingDefinitionOnlyObserve.Data\n\n @...
coffeescript
chosen
[ { "from": "system", "value": "Reset mask height on close\n\nOtherwise it will never shrink after opening long content\n" }, { "from": "human", "value": "class @Overlay\n constructor: (contentSelector, options) ->\n @contentSelector = contentSelector\n @options = options || {}\n default...
coffeescript
chosen
[ { "from": "system", "value": "Change default local for JS I18n.\n" }, { "from": "human", "value": "#= require env\n#= require jquery\n#= require jquery/jquery-migrate\n#= require jquery/jquery.cookies.js\n#= require i18n.js\n#= require bootstrap\n#= require bootstrap-select\n#= require custom-bo...
coffeescript
chosen
[ { "from": "system", "value": "Set finite timeout for framestream\n" }, { "from": "human", "value": "express = require('express')\n\nmodule.exports = ->\n router = express.Router()\n router.get '/framestream', (req, res) ->\n req.socket.setTimeout Infinity\n\n messageCount = 1\n subscr...
coffeescript
chosen
[ { "from": "system", "value": "Set left as number without px suffix\n" }, { "from": "human", "value": "{View} = require 'space-pen'\n$ = require 'jquery'\n_ = require 'underscore'\n\nmodule.exports =\nclass WrapGuideView extends View\n @activate: ->\n rootView.eachEditor (editor) =>\n @a...
coffeescript
chosen
[ { "from": "system", "value": "Add rename and delete menu items\n" }, { "from": "human", "value": "'context-menu':\n '.tree-view':\n 'Add file': 'tree-view:add'\n" }, { "from": "gpt", "value": "'context-menu':\n '.tree-view':\n 'Add File': 'tree-view:add'\n 'Rename': 'tree-...
coffeescript
chosen