conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Use boolean synonyms off and yes to make model human readable.\n" }, { "from": "human", "value": "module.exports =\n # Turn off migrations.\n migrate: 'safe'\n\n # Turn off auto fields.\n autoCreatedAt: false\n autoUpdatedAt: false\n autoPK: false\n\n # Valid...
coffeescript
chosen
[ { "from": "system", "value": "Update example with help text\n" }, { "from": "human", "value": "Listnr = @Listnr\n\ncreateEl = (tag) ->\n document.createElement(tag)\n\ndiv = createEl('div')\ndiv.innerHTML = \"\"\"\n <dl>\n <dt>Context:</dt>\n <dd id=\"context\"></dd>\n <dt>Action:</dt...
coffeescript
chosen
[ { "from": "system", "value": "Fix `injectHints` might return undefined markers\n\nThe `inner` function of `injectHints` now returns an empty array instead\nof undefined if no markers could be produced, since all results of the\n`inner` function are recursively concatenated. VimFx seems to have worked\nwell ...
coffeescript
chosen
[ { "from": "system", "value": "Make split view class optional in layout builder.\n" }, { "from": "human", "value": "class WorkspaceLayoutBuilder extends KDSplitComboView\n\n init: ->\n @splitViews = {}\n {direction, sizes, views, cssClass, splitName} = @getOption 'layoutOptions'\n\n @ba...
coffeescript
chosen
[ { "from": "system", "value": "Apply line styles on display-updated.\n\n... but only after we've received a marker change event.\n" }, { "from": "human", "value": "{View, $} = require 'atom'\n\nmodule.exports =\nclass SideView extends View\n @content: (side) ->\n @div class: \"side #{side.kla...
coffeescript
chosen
[ { "from": "system", "value": "Use the sarcoma test fixture.\n" }, { "from": "human", "value": "_ = require 'lodash'\n\nexpect = require('./helpers/expect')()\n\nPage = require('./helpers/page')()\n\nclass ImageDetailPage extends Page\n displayPanel: ->\n this.select('qi-series-image')\n\ndes...
coffeescript
chosen
[ { "from": "system", "value": "Add hash to view all link to jump user down to gallery section\n" }, { "from": "human", "value": "{ timespanInWords } = require '../../components/util/date_helpers.coffee'\n\nmodule.exports =\n viewAllUrl: (module) ->\n if module.key is 'related_artists'\n ...
coffeescript
chosen
[ { "from": "system", "value": "Fix target and add class when block has fetched\n" }, { "from": "human", "value": "Backbone = require 'backbone'\nBlock = require '../../models/block.coffee'\nConnectView = require '../connect/client/connect_view.coffee'\nanalytics = require '../../lib/analytics.cof...
coffeescript
chosen
[ { "from": "system", "value": "Use a default text title\n" }, { "from": "human", "value": "jQuery ->\n\n updateToc = =>\n\n $(\".toc\").find(\"li\").each ->\n if $(@).find(\"a\")[0].href == window.location.href\n $(@).addClass(\"active\")\n else\n $(@).remove...
coffeescript
chosen
[ { "from": "system", "value": "Add trigger event to parent view on show\n" }, { "from": "human", "value": "define (require) ->\n BaseView = require('cs!helpers/backbone/views/base')\n template = require('hbs!helpers/backbone/views/attached/tooltip/tooltip-template')\n require('less!helpers/bac...
coffeescript
chosen
[ { "from": "system", "value": "Add response time global setting option to file\n" }, { "from": "human", "value": "define (require) ->\n $ = require('jquery')\n require('mockjax')\n\n # GET\n\n $.mockjax (settings) ->\n # settings.url == '/contents/<uuid>'\n service = settings.url.match(...
coffeescript
chosen
[ { "from": "system", "value": "Fix usage of SMTPTesting through CLI\n" }, { "from": "human", "value": "smtp = require 'simplesmtp'\n\nmodule.exports = SMTPTesting = {}\n\nSMTPTesting.mailStore = []\nSMTPTesting.lastConnection = {}\nqueueID = 0\n\n# to be overidden\nSMTPTesting.onSecondMessage = (...
coffeescript
chosen
[ { "from": "system", "value": "Rename 'get' function to 'fetch'\nfor consistency\n" }, { "from": "human", "value": "http = require '../../lib/http'\nschedule = require '../../data/schedule'\n\nexports.register = (server, baseRoute) ->\n http.get server, \"#{baseRoute}/schedule\", get\n\nget = ->...
coffeescript
chosen
[ { "from": "system", "value": "Use haskell package as actual package\n" }, { "from": "human", "value": "AtomStackIdeView = require './stack-ide-atom-view'\n{CompositeDisposable} = require 'atom'\n\nhaskell = require('./haskell/generated/haskell')\np = haskell.getPackage()\nconsole.log p\n\nmodule...
coffeescript
chosen
[ { "from": "system", "value": "Add submenu to context menu + Rename menu items\n" }, { "from": "human", "value": "# See https://atom.io/docs/latest/hacking-atom-package-word-count#menus for more details\n# TODO: Do we really want these in the context menu? Might be too much clutter.\n'context-men...
coffeescript
chosen
[ { "from": "system", "value": "Fix Computed Prices When Price is Unknown" }, { "from": "human", "value": "App = require '../app'\n\nattr = DS.attr\n\nApp.Book = DS.Model.extend\n isbn: attr 'string'\n title: attr 'string'\n author: attr 'string'\n prices: attr 'raw'\n amazon: attr 'raw'\n\n ...
coffeescript
chosen
[ { "from": "system", "value": "Support adding collaborator via email\n" }, { "from": "human", "value": "#\n# Collection for a channel's collaborators\n#\n\nBase = require \"./base.coffee\"\nsd = require(\"sharify\").data\nUser = require \"../models/user.coffee\"\nmediator = require '../lib/mediat...
coffeescript
chosen
[ { "from": "system", "value": "Fix up things for kevin" }, { "from": "human", "value": "_ = require 'underscore-plus'\nspacePen = require 'space-pen'\nConfigObserver = require './config-observer'\n{Subscriber} = require 'emissary'\n\n_.extend spacePen.View.prototype, ConfigObserver\nSubscriber.in...
coffeescript
chosen
[ { "from": "system", "value": "Remove change-room x, we are not using it\n" }, { "from": "human", "value": "{div, span, header, i} = React.DOM\n{form, input, label} = React.DOM\n{ul, li} = React.DOM\n\nuser = React.createClass\n render: ->\n li className: 'user',\n div className: 'user-n...
coffeescript
chosen
[ { "from": "system", "value": "[atom] Hide ignore names by default\n" }, { "from": "human", "value": "\"*\":\n core:\n autoHideMenuBar: true\n disabledPackages: [\n \"vim-mode\"\n ]\n editor:\n fontSize: 10\n invisibles: {}\n scrollPastEnd: true\n showIndentGuide: true...
coffeescript
chosen
[ { "from": "system", "value": "Update join state in RoomUserState\n" }, { "from": "human", "value": "App.RoomUserStateItemController = Em.ObjectController.extend\n needs: [\"application\"]\n currentUser: Ember.computed.alias(\"controllers.application.currentUser\")\n\n actions:\n join: ->\n...
coffeescript
chosen
[ { "from": "system", "value": "Disable `save` on preview pane\n\nFixes #30\n" }, { "from": "human", "value": "{TextEditor} = require 'atom'\nutil = require './util'\npluginManager = require './plugin-manager'\n\nmodule.exports =\nclass CoffeeCompileEditor extends TextEditor\n constructor: ({@sou...
coffeescript
chosen
[ { "from": "system", "value": "Move opener registration into a nextTick.\n\nRegistering the openers is expensive for some reason" }, { "from": "human", "value": "{CompositeDisposable} = require 'atom'\nHistoryView = null\nChangesView = null\n\nHISTORY_URI = 'atom://git-experiment/view-history'\nC...
coffeescript
chosen
[ { "from": "system", "value": "Add label to jitsi integration success\n" }, { "from": "human", "value": "ready = ->\n\n# Jitsi Meet integration\n\n if $('body').hasClass('c-discourse a-embed') > 0\n\n $('#launch-jitsi').click ->\n room = 'Fablabs.io-' + Math.random().toString(36).substr(...
coffeescript
chosen
[ { "from": "system", "value": ":bug: Fix missing minimap version check in plugin activation\n" }, { "from": "human", "value": "MinimapFindAndReplaceBinding = require './minimap-find-and-replace-binding'\n\nmodule.exports =\n binding: null\n activate: (state) ->\n findPackage = atom.packages....
coffeescript
chosen
[ { "from": "system", "value": "Add options: max line length, ignore error codes\n\nAdded option to specify maximum line length and ignore specified error codes" }, { "from": "human", "value": "linterPath = atom.packages.getLoadedPackage(\"linter\").path\n\nLinter = require \"#{linterPath}/lib/lin...
coffeescript
chosen
[ { "from": "system", "value": "Support dashes in the github username\n" }, { "from": "human", "value": "# Github Credentials allows you to map your user against your GitHub user.\n# This is specifically in order to work with apps that have GitHub Oauth users.\n#\n# who do you know - List all the ...
coffeescript
chosen
[ { "from": "system", "value": "Fix deprecated ac+ blacklist option\n" }, { "from": "human", "value": "BufferController = require './buffer-controller'\n{Emitter} = require 'atom'\n\nmodule.exports =\nclass AutocompleteProvider\n selector: '.source.haskell'\n blacklist: '.source.haskell .comment...
coffeescript
chosen
[ { "from": "system", "value": "Fix replacing spaces in app names\n\nThis previously would translate `email alert api` into `email-alert\napi` not `email-alert-api`.\n" }, { "from": "human", "value": "# This script teaches Hubot to answer questions like \"Who owns Collections Publisher?\"\n# and \...
coffeescript
chosen
[ { "from": "system", "value": "Remove droppable attribute and override already defined method about this\n" }, { "from": "human", "value": "kd = require 'kd'\nKDTabHandleView = kd.TabHandleView\n\n\nmodule.exports = class IDETabHandleView extends KDTabHandleView\n\n constructor: (op...
coffeescript
chosen
[ { "from": "system", "value": "Fix options not working from Atom UI and config file\n" }, { "from": "human", "value": "\"use strict\"\n\nBeautifier = require('./beautifier')\nprettier = require(\"prettier\")\n\nmodule.exports = class Prettier extends Beautifier\n name: \"Prettier\"\n link: \"ht...
coffeescript
chosen
[ { "from": "system", "value": ":bug: Fix a duplicate variable issue\n" }, { "from": "human", "value": "Path = require 'path'\n{CompositeDisposable, Emitter} = require 'atom'\n\n{LinterTrace, LinterMessage, LinterError, LinterWarning} = require './messages'\nEditorLinter = require './editor-linter...
coffeescript
chosen
[ { "from": "system", "value": "Fix for position buttons panel\n" }, { "from": "human", "value": "angular.module('loomioApp').directive 'positionButtonsPanel', ->\n scope: {proposal: '='}\n restrict: 'E'\n templateUrl: 'generated/components/thread_page/position_buttons_panel/position_buttons_pa...
coffeescript
chosen
[ { "from": "system", "value": "Fix toggling hooks on profile page\n" }, { "from": "human", "value": "Travis.AccountController = Ember.ObjectController.extend\n allHooks: []\n needs: ['currentUser']\n userBinding: 'controllers.currentUser'\n\n init: ->\n @_super.apply this, arguments\n\n ...
coffeescript
chosen
[ { "from": "system", "value": "Allow language-coffee-script without a license for now" }, { "from": "human", "value": "\nmodule.exports = (grunt) ->\n grunt.registerTask 'check-licenses', 'Report the licenses of all dependencies', ->\n legalEagle = require 'legal-eagle'\n {size, keys} = re...
coffeescript
chosen
[ { "from": "system", "value": "Add API key to the Organization model\n" }, { "from": "human", "value": "mongoose = require 'mongoose'\ntimestamps = require 'mongoose-timestamps'\nSchema = mongoose.Schema\ndb = mongoose.createConnection \"mongodb://localhost:27017/badges-#{process.env.NODE_ENV}\"\...
coffeescript
chosen
[ { "from": "system", "value": "Use text instead of html\n\nSafer, etc\n" }, { "from": "human", "value": "$ = jQuery\n\n\nexport default class Notice\n constructor: ->\n $ @initialize\n\n\n hide: =>\n $('#notice-container').hide()\n\n\n initialize: =>\n msg = Cookies.get 'notice'\n\n ...
coffeescript
chosen
[ { "from": "system", "value": "Use the explicit setup step\n" }, { "from": "human", "value": "StepView = require './step.coffee'\nForm = require '../../form/index.coffee'\nFeedback = require '../../../models/feedback.coffee'\nRepresentatives = require '../../../collections/representatives.coffee'...
coffeescript
chosen
[ { "from": "system", "value": "Use React editor in Atom\n" }, { "from": "human", "value": "'core':\n 'hideGitIgnoredFiles': true\n 'ignoredNames': [\n '.DS_Store'\n '.git'\n 'vendor'\n ]\n 'themes': [\n 'atom-dark-ui'\n 'solarized-dark-syntax'\n ]\n 'disabledPackages': []\n ...
coffeescript
chosen
[ { "from": "system", "value": "Set the type inside the directive.\n" }, { "from": "human", "value": "'use strict'\n\napp.directive 'pdfViewer', [\n () ->\n restrict: 'E'\n scope:\n asset: '=asset'\n link: ($scope, $elem) ->\n pdfElement = $($elem)[0]\n objectTag = docume...
coffeescript
chosen
[ { "from": "system", "value": "Remove unused \"native\" toolbar element attribute\n" }, { "from": "human", "value": "{cloneFragment, triggerEvent} = Trix\n\nTrix.registerElement \"trix-toolbar\",\n defaultCSS: \"\"\"\n %t {\n white-space: collapse;\n }\n\n %t .dialog {\n displ...
coffeescript
chosen
[ { "from": "system", "value": "Use an insanely complicated regex to test for a semantic version\n" }, { "from": "human", "value": "should = require 'should'\nImpromptu = require '../src/impromptu'\n\n\ndescribe 'Impromptu', ->\n it 'should exist', ->\n should.exist Impromptu\n\n it 'should u...
coffeescript
chosen
[ { "from": "system", "value": "Check rate limit and warn user if about to be exceeded\n" }, { "from": "human", "value": "noflo = require 'noflo'\n\nexports.getComponent = ->\n c = new noflo.Component\n c.description = 'Get user token from action'\n c.icon = 'key'\n c.inPorts.add 'in',\n da...
coffeescript
chosen
[ { "from": "system", "value": "Change imported name from \"math\" to \"bokeh_math\" to make it more obvious this is not related to the core JS \"Math\" facility.\n" }, { "from": "human", "value": "_ = require \"underscore\"\nTransform = require \"./transform\"\np = require \"../../core/properties...
coffeescript
chosen
[ { "from": "system", "value": "Add default page legth to 25 for datatable for readability\n" }, { "from": "human", "value": "$(document).on \"page:change\", ->\n $(\".data-table\").each ->\n table = $(@)\n\n return if $.fn.dataTable.isDataTable(table)\n\n options =\n responsive: tr...
coffeescript
chosen
[ { "from": "system", "value": "Work on RequireJS Jasmine test.\n" }, { "from": "human", "value": "describe \"RequireJS\", ->\n beforeEach ->\n @addMatchers requirejsTobeUndefined: ->\n typeof requirejs is \"undefined\"\n\n\n it \"check that the RequireJS object is present in the global ...
coffeescript
chosen
[ { "from": "system", "value": "Add uploaded marker to map\n" }, { "from": "human", "value": "do ->\n\n\tmapOptions =\n\t\tcenter: new (google.maps.LatLng)(43.8321591, 4.3428536)\n\t\tmapTypeId: google.maps.MapTypeId.ROADMAP\n\t\tstreetViewControl: false\n\t\tscrollwheel: false\n\t\tnavigationCont...
coffeescript
chosen
[ { "from": "system", "value": "Clear selection every time you change of folder.\n" }, { "from": "human", "value": "angular.module('fileManager').\nfactory('Selection', ()->\n return class Selection\n @_files: {}\n @number: 0\n\n @add: (file)->\n if not @hasFile(file)\n @_fil...
coffeescript
chosen
[ { "from": "system", "value": "Add spec for copying keybinding\n" }, { "from": "human", "value": "path = require 'path'\nKeybindingPanel = require '../lib/keybinding-panel'\n\ndescribe \"KeybindingPanel\", ->\n panel = null\n\n describe \"loads and displays core key bindings\", ->\n beforeEa...
coffeescript
chosen
[ { "from": "system", "value": "Add location and player classes\n" }, { "from": "human", "value": "jQuery(document).ready ->\n class photographyGame\n constructor: (@debug, @map) ->\n\n init: () ->\n return\n" }, { "from": "gpt", "value": "jQuery(document).ready ->\n class pho...
coffeescript
chosen
[ { "from": "system", "value": "Check if package can be upgraded using the latest version\n" }, { "from": "human", "value": "_ = require 'underscore-plus'\n{View} = require 'atom'\n\n# Menu item view for an installed package\nmodule.exports =\nclass PackageMenuView extends View\n @content: ->\n ...
coffeescript
chosen
[ { "from": "system", "value": "Fix test related to relations.\n" }, { "from": "human", "value": "require './setup'\n\nSong = null\nAlbum = null\nspy = null\n\ndescribe 'has one change', ->\n beforeEach ->\n Song = Ento()\n .use(Ento.relations)\n .attr('id')\n .attr('title')\n\n...
coffeescript
chosen
[ { "from": "system", "value": "Change semantics of node() a little to allow for string path or multiple arguments\n" }, { "from": "human", "value": "module.exports = class Organization\n constructor: (org, @api) ->\n @orgName = if typeof org is \"object\" then org.name else org\n\n node: (pa...
coffeescript
chosen
[ { "from": "system", "value": "Tweak to Winston output handler\n" }, { "from": "human", "value": "winston = require 'winston'\nutil = require 'util'\n\nwinston\n\t.remove winston.transports.Console\n\t.add winston.transports.File,\n\t\tlevel: 'silly'\n\t\tfilename: 'output.log'\n\t\tjson: no\n\ne...
coffeescript
chosen
[ { "from": "system", "value": "Use mousedown instead of click\n" }, { "from": "human", "value": "Base = require 'base'\n\nclass ListItem extends Base.View\n\n template: require '../../templates/list'\n\n elements:\n '.name': 'name'\n '.count': 'count'\n\n events:\n 'click': 'click'\n...
coffeescript
chosen
[ { "from": "system", "value": "Use router Link to prevent full page reload\n" }, { "from": "human", "value": "React = require 'react'\nBS = require 'react-bootstrap'\n_ = require 'underscore'\n\n{History, Link} = require 'react-router'\n{TransitionActions, TransitionStore} = require '../../flux/t...
coffeescript
chosen
[ { "from": "system", "value": "Support events on nest temp and humidity" }, { "from": "human", "value": "\nNestNode = require('./NestNode')\n\nmodule.exports = class NestThermostatNode extends NestNode\n aspects:\n \"temperature-sensor\": {}\n \"humidity-sensor\": {}\n \"temperature-set...
coffeescript
chosen
[ { "from": "system", "value": "Add .md extension to generated license\n" }, { "from": "human", "value": "fs = require 'fs'\npath = require 'path'\n\nmodule.exports = (grunt) ->\n grunt.registerTask 'generate-license', 'Generate the license, including the licenses of all dependencies', (mode) ->\...
coffeescript
chosen
[ { "from": "system", "value": "Add figcaptions to image attachments\n" }, { "from": "human", "value": "#= require trix/views/attachment_view\n#= require trix/models/image_attachment\n\n{defer, makeElement, measureElement} = Trix\n\nclass Trix.ImageAttachmentView extends Trix.AttachmentView\n get...
coffeescript
chosen
[ { "from": "system", "value": "Clean the custom exception module.\n" }, { "from": "human", "value": "#global $, _\n((NS) ->\n \"use strict\"\n\n # Filename: helpers/error_helper.js */\n NS = NS or {}\n isInBrowser = typeof module is 'undefined' and typeof window isnt 'undefined'\n # Exceptio...
coffeescript
chosen
[ { "from": "system", "value": "Change $.andSelf() to $.addBack(), which is now preferred.\n" }, { "from": "human", "value": "###\nA text region that can be clicked to edit its contents. \n###\n\nclass window.EditableText extends Editable\n\n inherited:\n editClass: \"TextBox\"\n\n # True if ...
coffeescript
chosen
[ { "from": "system", "value": "Work on RequireJS Jasmine test.\n" }, { "from": "human", "value": "describe \"RequireJS\", ->\n it \"check that the RequireJS object is present in the global namespace\", ->\n expect(RequireJS).toEqual jasmine.any(Object)\n expect(window.RequireJS)....
coffeescript
chosen
[ { "from": "system", "value": "Include location.origin in URL for share links\n" }, { "from": "human", "value": "define (require) ->\n _ = require('underscore')\n Backbone = require('backbone')\n router = require('cs!router')\n BaseView = require('cs!helpers/backbone/views/base')\n #MailPopo...
coffeescript
chosen
[ { "from": "system", "value": "Set heartbeat pulse to 90 seconds" }, { "from": "human", "value": "ETahi.HeartbeatService = Em.Object.extend\n interval: 10 * 1000\n intervalId: null\n resource: null\n url: null\n\n init: ->\n resource = @get('resource')\n throw new Error(\"need to speci...
coffeescript
chosen
[ { "from": "system", "value": "Remove unused \"options\" object from Calendar JS\n" }, { "from": "human", "value": "class @Calendar\n options =\n month: \"short\"\n day: \"numeric\"\n year: \"numeric\"\n\n constructor: (timestamps, starting_year, starting_month, calendar_activities_pat...
coffeescript
chosen
[ { "from": "system", "value": "Set a defaultLabel if it exists\n" }, { "from": "human", "value": "class Skr.Components.CustomerFinder extends Lanes.React.Component\n\n propTypes:\n model: Lanes.PropTypes.Model.isRequired\n commands: React.PropTypes.object\n autoFocu...
coffeescript
chosen
[ { "from": "system", "value": "Disable animations on new game\n" }, { "from": "human", "value": "class window.BoardView extends Backbone.View\n\n el: $('.board__tiles')\n\n initialize: ->\n @listenTo @collection, 'reset', @render\n @collection.view = @\n @collection.shuffle()...
coffeescript
chosen
[ { "from": "system", "value": "Fix running callback when global.global is deleted\n\nClose #2366.\n" }, { "from": "human", "value": "module.exports =\nclass CallbacksRegistry\n constructor: ->\n @emptyFunc = -> throw new Error \"Browser trying to call a non-exist callback\n in renderer, ...
coffeescript
chosen
[ { "from": "system", "value": "Add facebook annotation to submitted classifications\n" }, { "from": "human", "value": "window.zooniverse ?= {}\n\nEventEmitter = window.zooniverse?.EventEmitter or require 'zooniverse/lib/event-emitter'\n$ = window.jQuery\n\nclass Api extends EventEmitter\n @curre...
coffeescript
chosen
[ { "from": "system", "value": "Integrations: Fix typo to show configured tabs by router.\n" }, { "from": "human", "value": "kd = require 'kd'\n\nAdminIntegrationsListView = require './adminintegrationslistview'\nAdminConfiguredIntegrationsListView = require './adminconfigured...
coffeescript
chosen
[ { "from": "system", "value": "Make `Config.findConfig` to be a static.\n" }, { "from": "human", "value": "_ = require('underscore')\nfs = require('fs')\n\nclass Config\n constructor: () ->\n filePath = @findConfig()\n data = @parse(filePath)\n @validate(data)\n return Object.freeze(...
coffeescript
chosen
[ { "from": "system", "value": "Add link to GNU Groff mirror in project listing\n" }, { "from": "human", "value": "[\n\t{\n\t\ttitle: \"@Atom Theme\"\n\t\tpaths: [\n\t\t\t\"/Users/johngardner/Labs/Atom-PhoenixTheme\"\n\t\t]\n\t\tdevMode: true\n\t}\n\t{\n\t\ttitle: \".files\"\n\t\tpaths: [\n\t\t\t\...
coffeescript
chosen
[ { "from": "system", "value": "Fix Typo in Choice EDSL\n" }, { "from": "human", "value": "angular.module 'qbn.edsl', ['qbn.quality', 'qbn.storylet', 'qbn.choice']\n .factory 'qbnEdsl', (qualities, storylets, frontalChoices, choiceFactory) ->\n api =\n quality: (id, name, description, arg...
coffeescript
chosen
[ { "from": "system", "value": "Switch that dropdown icon when we toggle things.\n" }, { "from": "human", "value": "# Toggle the administration system.\n($ document).keypress (e) ->\n ($ '.administration').toggleClass 'visible' if (e.keyCode || e.which) == 96\n\n# \"Hero\" image fade-in.\nwindow....
coffeescript
chosen
[ { "from": "system", "value": "Set DNT setting on middleware\n" }, { "from": "human", "value": "#\n# Inject common project-wide [view locals](http://expressjs.com/api.html#app.locals).\n#\n\n# uuid = require 'node-uuid'\n{ parse, format } = require 'url'\n_ = require 'underscore'\n{ NODE_ENV } = ...
coffeescript
chosen
[ { "from": "system", "value": "Comment makes less sense now\n" }, { "from": "human", "value": "fs = require 'fs'\npath = require 'path'\nchalk = require 'chalk'\nrequest = require 'request'\nrestapi = require './restapi'\nvalidator = require './validator'\nbundle = require './bundle'\n\nmodule.ex...
coffeescript
chosen
[ { "from": "system", "value": "Fix handling of multiple GA tracking numbers\n" }, { "from": "human", "value": "define (require) ->\n Backbone = require('backbone')\n settings = require('settings')\n\n # Class to handle loading analytics scripts and wrapping\n # handlers around them so that mo...
coffeescript
chosen
[ { "from": "system", "value": "Fix improperly named snippet prefix\n" }, { "from": "human", "value": "# Paper Input components snippets\n\n\".text.html\":\n \"paper-input-container\":\n \"prefix\": \"paper-input\"\n \"body\": \"\"\"\n <paper-input-container id=\"$1\">\n <label>${2:...
coffeescript
chosen
[ { "from": "system", "value": "Move prompt config file to subdirectory\n\nWe want to allow prompts to use modules, but we shouldn't make your whole home directory the parent for our node_modules directory.\n\nUses ~/.impromptu and renames the file to prompt.(js|coffee), which is now more descriptive.\n" },...
coffeescript
chosen
[ { "from": "system", "value": "Include resource expansion in middleware route def processing\n" }, { "from": "human", "value": "Router = require 'routes'\n_ = require 'lodash'\n\nnoService = require './noService'\nresolve = require './resolve'\nmakeRouter = require './makeRouter'\n\n\n# Given a c...
coffeescript
chosen
[ { "from": "system", "value": "Use $ to match end of string\n\nIt seems like some JS RE engines don't support \\z\n" }, { "from": "human", "value": "module.exports =\n processResponse: (res) ->\n # Check to see if the contentype is \"something/json\" or\n # \"something/somethingelse+json\"...
coffeescript
chosen
[ { "from": "system", "value": "Use spaces instead of tabs for coffeescript indent\n\nAs dictated by coffeelint, and the coffeescript style guide at\nhttps://github.com/polarmobile/coffeescript-style-guide\n" }, { "from": "human", "value": "# Place all the behaviors and hooks related to the matchi...
coffeescript
chosen
[ { "from": "system", "value": "Revert \"Clean dropdown binding code\"\n\nThis reverts commit fda52379e8674e44445ad7f0c246f88ca036dd6d.\nCode is broken\n" }, { "from": "human", "value": "define ['jquery', 'semantic', 'utils', 'charts'], ($, semantic, utils, charts) ->\n\n currentCity = utils.getC...
coffeescript
chosen
[ { "from": "system", "value": "Use path, since required it\n" }, { "from": "human", "value": "# DocPad Configuration File\n# http://docpad.org/docs/config\n\npath = require 'path'\n\n#@poweredByDocPad = false\n\n@templateData =\n site:\n title: \"My Website\"\n\n getPreparedTitle: ->\n if...
coffeescript
chosen
[ { "from": "system", "value": "Refactor inserting help text into stack template editor\n" }, { "from": "human", "value": "BaseStackEditorView = require './basestackeditorview'\n\n\nmodule.exports = class StackTemplateEditorView extends BaseStackEditorView\n\n\n constructor: (options = {}, data) ...
coffeescript
chosen
[ { "from": "system", "value": "Destroy guest when the embedder is gone\n" }, { "from": "human", "value": "ipc = require 'ipc'\nwebContents = require 'web-contents'\nwebViewManager = null # Doesn't exist in early initialization.\n\nnextInstanceId = 0\nguestInstances = {}\n\n# Generate guestInstan...
coffeescript
chosen
[ { "from": "system", "value": "Fix typo in visualisation download url\n" }, { "from": "human", "value": "window.Backbone ||= {}\nwindow.Backbone.Views ||= {}\n\nclass Backbone.Views.VisualisationView extends Backbone.Diorama.NestingView\n template: Handlebars.templates['visualisation.hbs']\n\n ...
coffeescript
chosen
[ { "from": "system", "value": "Send only on finish event\n" }, { "from": "human", "value": "noflo = require 'noflo'\nanimated = require 'animated-gif-detector'\nfs = require 'fs'\n# @runtime noflo-nodejs\n# @name DetectAnimatedGif\n\nexports.getComponent = ->\n c = new noflo.Component\n\n c.ico...
coffeescript
chosen
[ { "from": "system", "value": "Fix feed removal - get user id by calling meteors user method\n" }, { "from": "human", "value": "Feeds = require '/imports/collections/feeds'\n{ regexEscape } = require '/imports/utils'\n\nMeteor.methods\n addFeed: (feed) ->\n url = feed.url\n user = Meteor.u...
coffeescript
chosen
[ { "from": "system", "value": "Allow for limitless nesting of layouts\n" }, { "from": "human", "value": "###\n# \n###\nSpViewBuilder = (ContentBlockService, builder) ->\n\tbuilder.build = ($routeParams) ->\n\t\tblocks = []\n\t\tcompile = () ->\n\t\t\tblocks.reverse()\n\t\t\ttemplate = blocks[0].b...
coffeescript
chosen
[ { "from": "system", "value": "Fix unit tests to work with latest coffeescript\n\nJust change octal `\\000` to decimal `\\0`.\n" }, { "from": "human", "value": "#==============================================================================\n# lib/runner.js module\n#==============================...
coffeescript
chosen
[ { "from": "system", "value": "Use deferred to ensure render order for chart\n" }, { "from": "human", "value": "class Workbench.Views.DatastreamShowView extends Backbone.View\n template: JST[\"workbench/workbench/templates/datastream\"]\n\n tagName: \"li\"\n className: \"datastream\"\n\n init...
coffeescript
chosen
[ { "from": "system", "value": "Update test using set content-type\n" }, { "from": "human", "value": "{assert} = require 'chai'\n{Uploader} = require '../../src/uploader'\n\ndescribe 'Small file upload @integration test', ->\n source = undefined\n uploader = undefined\n\n before (done) ->\n ...
coffeescript
chosen
[ { "from": "system", "value": "Add missing ? to conditional\n" }, { "from": "human", "value": "window.Backbone ||= {}\nwindow.Backbone.Views ||= {}\n\nclass Backbone.Views.SectionView extends Backbone.Diorama.NestingView\n template: Handlebars.templates['section.hbs']\n tagName: 'section'\n cl...
coffeescript
chosen
[ { "from": "system", "value": "Fix for rendering server errors in new Form mixin\n" }, { "from": "human", "value": "_ = require 'underscore'\n\nmodule.exports =\n render: ->\n # Prepare any submit buttons for Ladda\n @$btn = @$('.ladda-button').ladda()\n\n # Automatically focus the firs...
coffeescript
chosen
[ { "from": "system", "value": "Allow overriding get/set from props\n" }, { "from": "human", "value": "class Skr.Components.PrintFormChooser extends Lanes.React.Component\n\n propTypes:\n label: React.PropTypes.string\n model: Lanes.PropTypes.Model.isRequired\n\n mixins: [\n ...
coffeescript
chosen
[ { "from": "system", "value": "Make sure to execute the next filter.\n" }, { "from": "human", "value": "app = require('../config/app').app\n\nio = require('socket.io').listen(app)\nRepositorySchema = require('../models/repository').RepositorySchema\n\nio.sockets.on 'connection', (...
coffeescript
chosen
[ { "from": "system", "value": "Fix url normalization for Windows\n\nWhen bundle-up is called from Windows, it uses the file path to generate\nthe compiled assets url, resulting in things like\n\"/\\generated\\bundle\\asdfg.css\".\n\nThis little patch fixes that.\n" }, { "from": "human", "value": ...
coffeescript
chosen
[ { "from": "system", "value": "Add title to the chart\n" }, { "from": "human", "value": "$ ->\n\tdata = [\n\t\t\tname: 'Original'\n\t\t\tparticipants: 100\n\t\t\tconversions: 45\n\t\t\tcolor: '#00aa00'\n\t\t,\n\t\t\tname: 'Variation'\n\t\t\tparticipants: 100\n\t\t\tconversions: 50\n\t\t\tcolor: '...
coffeescript
chosen
[ { "from": "system", "value": "Fix for new layout builder in Panel.\n" }, { "from": "human", "value": "class IDE.Panel extends KDView\n\n constructor: (options = {}, data) ->\n\n options.cssClass = KD.utils.curry 'panel', options.cssClass\n\n super options, data\n\n @panesContainer = []...
coffeescript
chosen