conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Check for existence before copying\n" }, { "from": "human", "value": "fs = require 'fs'\npath = require 'path'\nwalkdir = require 'walkdir'\n\nmodule.exports = (grunt) ->\n cp: (source, destination, {filter}={}) ->\n try\n walkdir.sync source, (sourcePath, ...
coffeescript
chosen
[ { "from": "system", "value": "Disable logging in test again (oops)\n" }, { "from": "human", "value": "Front = require('../lib/front/front')\nWebSocket = require('ws')\nWebSocketServer = require('ws').Server\n\nlogger.set_levels 'development'\ndescribe 'Front', ->\n beforeEach ->\n @front = n...
coffeescript
chosen
[ { "from": "system", "value": "Store archive edit session state in a telepath document\n\nThis allows an archive file to be opened during a collaboration\nsession.\n" }, { "from": "human", "value": "fsUtils = require 'fs-utils'\npath = require 'path'\n_ = require 'underscore'\narchive = require '...
coffeescript
chosen
[ { "from": "system", "value": "Use ActivityLogger in stash pop\n" }, { "from": "human", "value": "git = require '../git'\nnotifier = require '../notifier'\nOutputViewManager = require '../output-view-manager'\n\nmodule.exports = (repo) ->\n cwd = repo.getWorkingDirectory()\n git.cmd(['stash', '...
coffeescript
chosen
[ { "from": "system", "value": "Use \"instance\" as scope reference\n" }, { "from": "human", "value": "Parse = require 'parse'\n\nTemplate.survey_admin.onCreated ->\n @fetched = new ReactiveVar false\n surveyId = @data.id\n self = @\n\n query = new Parse.Query Survey\n query.get(surveyId).the...
coffeescript
chosen
[ { "from": "system", "value": "Allow hiding if operating as single location\n" }, { "from": "human", "value": "class Skr.Components.LocationChooser extends Lanes.React.Component\n\n propTypes:\n onModelSet: React.PropTypes.func\n name: React.PropTypes.string\n\n getDefau...
coffeescript
chosen
[ { "from": "system", "value": "Fix stupid bug with jQuery reference\n" }, { "from": "human", "value": "@Infeedl ||= {}\n\n@Infeedl.init = ->\n Infeedl.$(\"[data-infeedl-placement]\").each ->\n placement = new Infeedl.Placement($(this).attr(\"data-infeedl-placement\"), this)\n placement.fet...
coffeescript
chosen
[ { "from": "system", "value": "Update Grunt pages task. [ci skip]" }, { "from": "human", "value": "grunt = require 'grunt'\n\nmodule.exports =\n\n 'gh-pages': \n options:\n base: 'gh-pages'\n add: yes\n src: ['**']\n\n clean: [\n 'gh-pages/*'\n '!gh-pages/.gitignore'\n ...
coffeescript
chosen
[ { "from": "system", "value": "Add language-pip to Atom package list\n" }, { "from": "human", "value": "packages: [\n \"advanced-open-file\"\n \"atom-alignment\"\n \"atom-beautify\"\n \"atom-transpose\"\n \"color-picker\"\n \"docblockr\"\n \"editorconfig\"\n \"emmet\"\n \"expand-region\"...
coffeescript
chosen
[ { "from": "system", "value": "Include the auditor gui in the build\n" }, { "from": "human", "value": "module.exports = (grunt)->\n grunt.initConfig\n pkg: grunt.file.readJSON('package.json')\n\n jshint: \n options: \n jshintrc: '.jshintrc'\n\n all: [\n 'Standards/*...
coffeescript
chosen
[ { "from": "system", "value": ":memo: Mark ::get as private and tweak comments\n" }, { "from": "human", "value": "{Document} = require 'telepath'\n\n# Public: Manages the deserializers used for serialized state\nmodule.exports =\nclass DeserializerManager\n constructor: ->\n @deserializers = ...
coffeescript
chosen
[ { "from": "system", "value": "Change out Ember.run.later for Ember.run.schedule\n" }, { "from": "human", "value": "ETahi.PhaseHeaderView = Em.View.extend\n templateName: 'phase_header'\n classNames: ['column-header']\n classNameBindings: ['active']\n active: false\n\n focusIn: (e)->\n @s...
coffeescript
chosen
[ { "from": "system", "value": "Fix requirejs errors for googles map in QA\n" }, { "from": "human", "value": "require [\n \"jquery\"\n \"underscore\"\n \"backbone\"\n \"foundation\"\n \"foundation.topbar\"\n \"raven\"\n \"AppRouter\"\n \"signet\"\n], ($, _, Backbone, foundation, topbar, Ra...
coffeescript
chosen
[ { "from": "system", "value": "Fix bug where creating a dashboard didn't direct you to its url\n" }, { "from": "human", "value": "BaseView = require 'views/base_view'\nManager = require 'modules/manager'\n\nclass DashboardDialog extends BaseView\n className: 'dialog'\n tag: 'div'\n\n projects:...
coffeescript
chosen
[ { "from": "system", "value": "Move enumNames out of class" }, { "from": "human", "value": "class Enumeration\n #Registered enums\n @types:[]\n #Static function that creates an enum object value. Uniqueness guarantied by object reference.\n #This objects's unique own field is the Enumeration ...
coffeescript
chosen
[ { "from": "system", "value": "Remove filename debugging info from the subject viewer\n" }, { "from": "human", "value": "React = require 'react'\n\nmodule.exports = React.createClass\n displayName: 'SubjectViewer'\n \n mediaSrcs: {}\n \n getInitialState: ->\n text: 'Loading'\n \n compon...
coffeescript
chosen
[ { "from": "system", "value": "Add Object.values & Object.entries snippets\n" }, { "from": "human", "value": "\".source.js\":\n \"Object.assign\":\n prefix: \"assign\"\n body: \"Object.assign(${1:dest}, ${2:source})\"\n \"Object.assign +\":\n prefix: \"Object.assign\"\n body: \"Obje...
coffeescript
chosen
[ { "from": "system", "value": "Revert custom finder related logic.\n" }, { "from": "human", "value": "class FinderPane extends Pane\n\n constructor: (options = {}, data) ->\n\n super options, data\n\n @createFinderController()\n @bindListeners()\n\n createFinderController: ->\n find...
coffeescript
chosen
[ { "from": "system", "value": "Fix in app date display for meeting tiems\n" }, { "from": "human", "value": "angular.module('loomioApp').factory 'TimeService', (AppConfig) ->\n new class TimeService\n\n displayDate: (m, zone) =>\n if moment._f == 'YYYY-MM-DD'\n m.format(\"D MMMM#{@...
coffeescript
chosen
[ { "from": "system", "value": "Use the callback url to redirect the user\n" }, { "from": "human", "value": "EmailPasswordController = require './email-password-controller'\ndebug = require('debug')('meshblu-email-password-authenticator:sessions-controller')\n\nclass SessionController\n construct...
coffeescript
chosen
[ { "from": "system", "value": "Use our unlocalizeCurrencyFilter to parse unit value field\n\n- More tolerant (can handle `,` or `.` as decimal separator, remove thousands separator) to return a `number`\n" }, { "from": "human", "value": "angular.module(\"admin.products\").controller \"variantUnit...
coffeescript
chosen
[ { "from": "system", "value": "Remove .coffee extension from require path\n\nRefs atom/atom#4884\n" }, { "from": "human", "value": "BodyParser = require '../lib/snippet-body-parser.coffee'\n\ndescribe \"Snippet Body Parser\", ->\n it \"breaks a snippet body into lines, with each line containing ...
coffeescript
chosen
[ { "from": "system", "value": "Check existence of gulpfile in landing site directory\n" }, { "from": "human", "value": "fs = require 'fs'\ngulp = require 'gulp'\nshell = require 'gulp-shell'\n\nmodule.exports = (version) ->\n\n folders = (folder for folder in fs.readdirSync('./') when...
coffeescript
chosen
[ { "from": "system", "value": "Add command for opening todo list\n" }, { "from": "human", "value": "# Your init script\n#\n# Atom will evaluate this file each time a new window is opened. It is run\n# after packages are loaded/activated and after the previous editor state\n# has been restored.\n#...
coffeescript
chosen
[ { "from": "system", "value": "Drop mongodb database between tests\n" }, { "from": "human", "value": "app = require('../app')\ntest_server = null\nurl = require('url')\n\nbefore( (done) ->\n app.start 3001, (err, server) ->\n test_server = server\n done()\n)\n\nafter( (done) ->\n test_ser...
coffeescript
chosen
[ { "from": "system", "value": "Fix login problems on firefox\n" }, { "from": "human", "value": "checkOuterPages = (url) =>\n outerPages = [\"docs\", \"about\", \"privacy\", \"pricing\"]\n for page in outerPages\n if (url.match \"^/#{page}.*\")\n return \"/\"\n return url\n\n\nCI.github...
coffeescript
chosen
[ { "from": "system", "value": "Remove pushed/unpushed status for now.\n\n# Compose your commit message. Press `cmd-alt-c` to commit. Close to cancel.\n" }, { "from": "human", "value": "LocalBranch = require './local-branch'\n\n{git} = require '../../git'\n\nmodule.exports =\nclass CurrentBranch e...
coffeescript
chosen
[ { "from": "system", "value": "Fix wrong redirect after logging in\n" }, { "from": "human", "value": "express = require 'express'\npassport = require 'passport'\n\nrouter = express.Router()\n\nrouter.post '/login', passport.authenticate 'local',\n successRedirect: '/app'\n failureRedirect: '/'\...
coffeescript
chosen
[ { "from": "system", "value": "Set `target: _blank` on submit feedback\n\nBetter ux.\n" }, { "from": "human", "value": "React = require 'react'\nNav = React.createFactory require 'antwar-default-theme/Nav'\nPaths = require('antwar-core/PathsMixin')\nrequire 'antwar-default-theme/scss/main.scss'\n...
coffeescript
chosen
[ { "from": "system", "value": "Disable particles in mobile login\n" }, { "from": "human", "value": "Template.loginLayout.rendered = ->\n\t$('html').addClass(\"scroll\").removeClass \"noscroll\"\n\twindow.pJSDom = []\n\tparticlesJS.load 'particles-js', '/scripts/particles.json', ->" }, { "...
coffeescript
chosen
[ { "from": "system", "value": "Set image properties when inserting an image." }, { "from": "human", "value": "#= require cmsimple/panels/images/panel\nclass CMSimple.Panels.ImageLibrary.List extends Spine.Controller\n events:\n 'click .media-actions > .info' : 'toggleInfo'\n 'click .media-...
coffeescript
chosen
[ { "from": "system", "value": "Fix typo, tray => Tray\n" }, { "from": "human", "value": "# Import common modules.\nmodule.exports = require '../../../../common/api/lib/exports/electron'\n\nv8Util = process.atomBinding 'v8_util'\nv8Util.setHiddenValue module.exports, 'electronModule', true\n\nObje...
coffeescript
chosen
[ { "from": "system", "value": "Sort subject sets by borough and file id\n" }, { "from": "human", "value": "React = require 'react'\n\nmodule.exports = React.createClass\n displayName: 'ChooseSubjectSet'\n \n getInitialState: ->\n subject_sets: []\n \n componentWillMount: ->\n @props....
coffeescript
chosen
[ { "from": "system", "value": "Add specs for normal scope.\n" }, { "from": "human", "value": "describe 'PodsList', ->\n subject = null\n beforeEach (done) ->\n subject = new SeedsStore('test')\n expect(subject.clear()).eventually.notify(done)\n it 'counts 0', (done) ->\n expect(subjec...
coffeescript
chosen
[ { "from": "system", "value": "Fix Attachment not correctly cleaning up listener\n" }, { "from": "human", "value": "#\nTether = require 'tether/tether'\nassign = require 'object-assign'\nReact = require 'react'\n$ = React.createElement\n\nclass Attachment extends React.Component\n componentDidMo...
coffeescript
chosen
[ { "from": "system", "value": "Remove ref to status bar\n" }, { "from": "human", "value": "StatusBarView = require './status-bar-view'\nFileInfoView = require './file-info-view'\nCursorPositionView = require './cursor-position-view'\nGrammarView = require './grammar-view'\nGitView = require './gi...
coffeescript
chosen
[ { "from": "system", "value": "Remove Fetch from PushableCollection Create Event\n" }, { "from": "human", "value": "class Backbone.PushableCollection extends Backbone.Collection\n initialize: () ->\n window.FayeClient.subscribe \"/sync/#{@channel()}\", _.bind(@receive, @)\n\n receive: (messa...
coffeescript
chosen
[ { "from": "system", "value": "Add button interactive event proxying.\n" }, { "from": "human", "value": "###*\n# @overview Registers the custom button tag.\n#\n# @module stout-ui/button\n###\ndefaults = require 'lodash/defaults'\nButton = require './Button'\nButtonView = require './ButtonVi...
coffeescript
chosen
[ { "from": "system", "value": "Remove unneeded param defaults from activate methods\n" }, { "from": "human", "value": "module.exports =\n treeView: null\n\n activate: (@state={}) ->\n @createView() if @state.attached\n rootView.command 'tree-view:toggle', => @createView().toggle()\n ro...
coffeescript
chosen
[ { "from": "system", "value": "Add method for optionally-fatal deprecation warnings\n" }, { "from": "human", "value": "# NoFlo - Flow-Based Programming for JavaScript\n# (c) 2014-2015 TheGrid (Rituwall Inc.)\n# NoFlo may be freely distributed under the MIT license\n#\n# Platform detec...
coffeescript
chosen
[ { "from": "system", "value": "Add map of labels for statistical values\n\nCurrently, the only mapping is \"Distinct count\" --> \"Unique values\"\n" }, { "from": "human", "value": "define [\n 'jquery'\n 'underscore'\n 'backbone'\n 'marionette'\n '../base'\n '../charts'\n '.....
coffeescript
chosen
[ { "from": "system", "value": "Use relative path for leaflet-override\n" }, { "from": "human", "value": "#= require jquery/dist/jquery\n#= require jquery-deparam/jquery-deparam\n#= require jquery.transit/jquery.transit\n#= require slow-ajax\n#= require bootstrap/dist/js/bootstrap\n#= require high...
coffeescript
chosen
[ { "from": "system", "value": "Expand on hack for valid hash fields\n" }, { "from": "human", "value": "_ = require 'underscore'\nQ = require 'q'\nBackbone = require 'backbone'\n{ API_URL } = require('sharify').data\nRelations = require './mixins/relations/collector_profile.coffee'\n\nmodule.expor...
coffeescript
chosen
[ { "from": "system", "value": "Change parameters by which shows are selected\n" }, { "from": "human", "value": "_ = require 'underscore'\n{ Cities, FeaturedCities } = require 'places'\nPartnerShows = require '../../../../collections/partner_shows.coffee'\nRelatedShowsView = require './view.coffee...
coffeescript
chosen
[ { "from": "system", "value": "Change height and width calculations to just use Viewport Width and Height\n" }, { "from": "human", "value": "{div} = React.DOM\n\nmodule.exports = React.createClass\n\n displayName: 'Modal'\n\n watchForEscape: (e) ->\n if e.keyCode is 27\n @props.close?()...
coffeescript
chosen
[ { "from": "system", "value": "Make the indicator selector only show indicators with data\n" }, { "from": "human", "value": "window.Backbone ||= {}\nwindow.Backbone.Views ||= {}\n\nclass Backbone.Views.IndicatorSelectorView extends Backbone.Diorama.NestingView\n template: Handlebars.templates['i...
coffeescript
chosen
[ { "from": "system", "value": "Fix response loading twice on fill_out start\n" }, { "from": "human", "value": "{div} = React.DOM\n\n@FeedView = React.createClass\n displayName: 'FeedView'\n\n componentWillMount: ->\n Screensmart.store.dispatch Screensmart.Actions.updateResponse()\n\n render...
coffeescript
chosen
[ { "from": "system", "value": "Use Collapse component vs own logic\n" }, { "from": "human", "value": "class Lanes.Components.FieldSet extends Lanes.React.Component\n\n getDefaultProps: ->\n speed: 0.4\n\n propTypes:\n title: React.PropTypes.string.isRequired\n speed: Re...
coffeescript
chosen
[ { "from": "system", "value": ":bug: Fix broken plugin since highlight-selected update\n\nFixes #5\n" }, { "from": "human", "value": "module.exports = ->\n highlightSelectedPackage = atom.packages.getLoadedPackage('highlight-selected')\n\n highlightSelected = require (highlightSelectedPackage.p...
coffeescript
chosen
[ { "from": "system", "value": "Allow cmd and ctrl clicks to open links in new tabs\n" }, { "from": "human", "value": "_ = require 'underscore'\nBackbone = require 'backbone'\n\nrouter = new Backbone.Router\nhref = null\n\nmodule.exports = ($el) ->\n $el.on 'click', 'a[href]', onClick\n # Make s...
coffeescript
chosen
[ { "from": "system", "value": "Implement minimap creation observer method for v4\n" }, { "from": "human", "value": "{CompositeDisposable} = require 'event-kit'\n[Minimap, MinimapElement] = []\n\nmodule.exports =\nclass V4Main\n @includeInto: (base) ->\n for k,v of @prototype\n base::[k] ...
coffeescript
chosen
[ { "from": "system", "value": "Check if originalEvent is defined\n" }, { "from": "human", "value": "Template.displayIcon.userIconUrl = ->\n # TODO: We should specify default URL to the image of an avatar which is generated from name initials\n \"https://secure.gravatar.com/avatar/#{ Meteor.pers...
coffeescript
chosen
[ { "from": "system", "value": "Use new status bar tile API\n" }, { "from": "human", "value": "_ = require 'underscore-plus'\n{View} = require 'atom-space-pen-views'\n\nmodule.exports =\nclass IncompatiblePackagesStatusView extends View\n @content: ->\n @div class: 'incompatible-packages-statu...
coffeescript
chosen
[ { "from": "system", "value": "Delete length validation for password\n" }, { "from": "human", "value": "# modules\nSequelize = require 'sequelize'\ndb = require './db'\nTeam = require './team'\n\n\n# custom validation constraints\ncheckUnique = (value, next) ->\n User.find\n where: $or:...
coffeescript
chosen
[ { "from": "system", "value": "Set label height to Ti.UI.SIZE" }, { "from": "human", "value": "label = (fontSize, options = {}) ->\n\n options.font = _.extend {}, options.font or {},\n fontSize: fontSize\n\n _.extend {}, options,\n height: Ti.UI.SIZE\n width: Ti.UI.FILL\n color: '#3...
coffeescript
chosen
[ { "from": "system", "value": "Make tile path work in GH\n" }, { "from": "human", "value": "# handle background tiles\nbackgroundTile = undefined\ntileImg = new Image()\ntileImg.onload = ->\n backgroundTile = cq().context.createPattern(tileImg,'repeat')\ntileImg.src = '/img/tile.png'\ndrawBackgr...
coffeescript
chosen
[ { "from": "system", "value": "Add bootstrap modal and transition dependencies\n" }, { "from": "human", "value": "define (require) ->\n $ = require('jquery')\n BaseView = require('cs!helpers/backbone/views/base')\n template = require('hbs!./legacy-template')\n require('less!./legacy')\n\n re...
coffeescript
chosen
[ { "from": "system", "value": "NavigationMachineItem: Use `machine.getName()` instead of `machine.label`\n" }, { "from": "human", "value": "class NavigationMachineItem extends JView\n\n {Running, Stopped} = Machine.State\n\n stateClasses = ''\n stateClasses += \"#{state.toLowerCase()} \" for ...
coffeescript
chosen
[ { "from": "system", "value": "Change first names to slack handles\n" }, { "from": "human", "value": "module.exports = (robot) ->\n names = ['Dana', 'Freia', 'Jhishan', 'Kyle', 'Brenton', 'Terri', 'Abhi', 'Drew']\n robot.hear /Resume queen, who is next\\?/i, (res) ->\n res.send res.random na...
coffeescript
chosen
[ { "from": "system", "value": "Update ArgumentVotes when the argument changes\n" }, { "from": "human", "value": "class window.ArgumentVotes extends Backbone.Model\n defaults:\n believes: 0\n disbelieves: 0\n\n isNew: -> @_argument.isNew()\n\n initialize: (attributes, options) ->\n @_a...
coffeescript
chosen
[ { "from": "system", "value": "Enable popovers in content editor\n" }, { "from": "human", "value": "define [\n 'jquery'\n 'underscore'\n 'backbone'\n 'marionette'\n 'cs!views/workspace/content/aloha-edit'\n 'hbs!templates/workspace/content/content-edit'\n], ($, _, Backbone, Marionette, Aloh...
coffeescript
chosen
[ { "from": "system", "value": "Add comment to temporary bugfix.\n" }, { "from": "human", "value": "App.Followable =\n\n initialize: ->\n $('.followable-content a[data-toggle]').on 'click', (event) ->\n event.preventDefault()\n\n update: (followable_id, button) ->\n $(\"#\" + followab...
coffeescript
chosen
[ { "from": "system", "value": "Fix name of helper in error message\n" }, { "from": "human", "value": "isActive = (type, inverse = false) ->\n name = 'is'\n name = name + 'Not' if inverse\n name = name + _.capitalize type\n\n (view) ->\n unless view instanceof Spacebars.kw\n throw new ...
coffeescript
chosen
[ { "from": "system", "value": "Add hashbang option to pathFor\n" }, { "from": "human", "value": "# check for subscriptions to be ready\nsubsReady = (subs...) ->\n return FlowRouter.subsReady() if subs.length is 1\n subs = subs.slice(0, subs.length - 1)\n _.reduce subs, (memo, sub) ->\n memo...
coffeescript
chosen
[ { "from": "system", "value": "Clear errors when re-running a scenario.\n" }, { "from": "human", "value": "# reference \"_namespace.coffee\"\r\n# reference \"PartViewModel.coffee\"\r\n\r\n{ PartViewModel } = @witness.ui\r\n\r\n@witness.ui.ScenarioViewModel = class ScenarioViewModel\r\n\r\n\tconst...
coffeescript
chosen
[ { "from": "system", "value": "Use the atom-text-editor tag instead of the editor class.\n" }, { "from": "human", "value": "# Keybindings require three things to be fully defined: A selector that is\n# matched against the focused element, the keystroke and the command to\n# execute.\n#}\n# Below ...
coffeescript
chosen
[ { "from": "system", "value": "Change api_url to reflect Gist raw file URI change\n\nhttps://developer.github.com/changes/2014-02-21-gist-raw-file-url-change/" }, { "from": "human", "value": "# Description:\n# Generate code names for things\n#\n# Dependencies:\n# None\n#\n# Configuration:\n# ...
coffeescript
chosen
[ { "from": "system", "value": "Allow to mark interrest in doing subjects\n" }, { "from": "human", "value": "Template.CalendarItem.helpers\n\tstyle: ->\n\t\tuser = Meteor.user()\n\n\t\tstyles = []\n\n\t\titemStatus = user?.grade?[@gradeItem._id]\n\t\titemStatus ?= 'pending'\n\n\t\tswitch itemStatu...
coffeescript
chosen
[ { "from": "system", "value": "Use the value as parameter when the myName field does not exist" }, { "from": "human", "value": "unless EditableForm\n EditableForm = $.fn.editableform.Constructor\n EditableForm.prototype.saveWithUrlHook = (value) ->\n originalUrl = @options.url\n model ...
coffeescript
chosen
[ { "from": "system", "value": "Fix incorrect reporting of current subject\n" }, { "from": "human", "value": "class Subjects\n queue: []\n api: null\n query:\n sort: 'queued'\n page_size: \"30\"\n \n constructor: (@api, @project, @subject_set_id)->\n @query.workflow_id = @project?.li...
coffeescript
chosen
[ { "from": "system", "value": "Remove asynchronous working if transitions are disabled\n" }, { "from": "human", "value": "\nclass UIDemo.Views.TransitionView extends Backbone.View\n\n transitionRemoveClass: (className, $el = @$el) ->\n p = @_transitionPromise($el)\n @_delay(=> $el.removeCl...
coffeescript
chosen
[ { "from": "system", "value": "Set the value of the overlay on initialition\n" }, { "from": "human", "value": "define ['jquery'], ($) ->\n\n class SelectGroup\n\n constructor: (@parent = null, @callback = false) ->\n @selectParent = (if @parent != null then $(@parent) else $('.js-select-...
coffeescript
chosen
[ { "from": "system", "value": "app: Use reactor directly inside of action\n" }, { "from": "human", "value": "kd = require 'kd'\nactions = require './actiontypes'\nfetchAccount = require 'app/util/fetchAccount'\n\ndispatch = (args...) -> kd.singletons.reactor.dispatch args...\n\n\n#...
coffeescript
chosen
[ { "from": "system", "value": "Fix error with FindResultsView attachment and update on react editor\n\nWhen you’d split-open a file, the react editor wasn’t attached or \nrendered yet. So there was no under layer, and when you’d try to request\na display update, it would call functions on objects that weren’...
coffeescript
chosen
[ { "from": "system", "value": "Add git-blame to Atom package list\n" }, { "from": "human", "value": "packages: [\n \"advanced-open-file\"\n \"atom-alignment\"\n \"atom-beautify\"\n \"atom-transpose\"\n \"change-case\"\n \"color-picker\"\n \"docblockr\"\n \"editorconfig\"\n \"emmet\"\n \...
coffeescript
chosen
[ { "from": "system", "value": "ContextMenu: Add slugified title as class name to context menu items.\n" }, { "from": "human", "value": "KDView = require './../../core/view.coffee'\nJTreeItemView = require './../tree/treeitemview.coffee'\n\nmodule.exports = class JContextMenuItem extends JT...
coffeescript
chosen
[ { "from": "system", "value": "Fix ObjectID hex string validation\n" }, { "from": "human", "value": "\"use strict\"\n\nObjectID = require('mongodb').ObjectID\n\nexports.param = (req, res, next, id) ->\n return res.json 400, error: 'Invalid ObjectID' if not /[a-f0-9]{24}/.test id\n req.id = Obje...
coffeescript
chosen
[ { "from": "system", "value": "Remove specific CSS classes for slides and slide-pack\n" }, { "from": "human", "value": "hl = require 'highlight.js'\nmousetrap = require 'mousetrap'\n$ = require 'zeptojs'\n\nprocessor = require './slide-pack-processor'\nui = require './slide-pack-ui'\n\nexecuteHoo...
coffeescript
chosen
[ { "from": "system", "value": "Use WritableTrackingBuffer to simplify the creation of AllHeaders.\n" }, { "from": "human", "value": "# s2.2.5.3\n\n# For now, only the \"Transaction Descriptor\" header (s2.2.5.3.2) is supported.\n\nTYPE =\n QUERY_NOTIFICATIONS: 1\n TXN_DESCRIPTOR: 2\n TRACE_ACT...
coffeescript
chosen
[ { "from": "system", "value": "Document Type's public API a little bit.\n" }, { "from": "human", "value": "{ArgumentError, NotImplementedError} = require './errors'\n\n#\n# 'Abstract' class for Finitio types\n#\nclass Type\n\n constructor: (@name)->\n if @name? and typeof(@name) isnt \"string...
coffeescript
chosen
[ { "from": "system", "value": "Use config to retrieve contents directory\n" }, { "from": "human", "value": "path = require 'path'\n\nmodule.exports = (grunt) ->\n {spawn} = require('./task-helpers')(grunt)\n\n grunt.registerTask 'test', 'Run the specs', ->\n done = @async()\n commands = [...
coffeescript
chosen
[ { "from": "system", "value": "Remove useless empty admin JS require\n" }, { "from": "human", "value": "#= require jquery\n#= require jquery_ujs\n#= require bootstrap-sprockets\n#= require_tree ./admin\n" }, { "from": "gpt", "value": "#= require jquery\n#= require jquery_ujs\n#= requi...
coffeescript
chosen
[ { "from": "system", "value": "Use a JSON column for metadata\n" }, { "from": "human", "value": "Settings = require \"settings-sharelatex\"\nlogger = require \"logger-sharelatex\"\n_ = require \"underscore\"\n\nif !Settings.analytics?.postgres?\n\tmodule.exports =\n\t\trecordEvent: (user_id, even...
coffeescript
chosen
[ { "from": "system", "value": "Make some CoffeeScript examples more interesting\n" }, { "from": "human", "value": "circle =\n radius: 3\n center:\n x: 5\n y: 4\n color: 'green'\n thickness: 2\n lineStyle: 'dashed'\n" }, { "from": "gpt", "value": "circle =\n radius: 3\n ce...
coffeescript
chosen
[ { "from": "system", "value": "Make BufferedNodeProcess adapt to changes of atom-shell v0.4.4.\n" }, { "from": "human", "value": "BufferedProcess = require 'buffered-process'\npath = require 'path'\n\n# Private: Like BufferedProcess, but accepts a node script instead of an\n# executable, on Unix ...
coffeescript
chosen
[ { "from": "system", "value": "Gulp: Fix globs for spec tasks, make sure spec_setup always comes first\n" }, { "from": "human", "value": "mocha = require 'gulp-mocha'\ngutil = require 'gulp-util'\nwebpack = require 'webpack-stream'\nrunSequence = require 'run-sequence'\nkarma = require 'gulp-karm...
coffeescript
chosen
[ { "from": "system", "value": "Use provided middleware in resources by default\n" }, { "from": "human", "value": "ExpressHttpResource = require 'bloops/adapters/express_resource'\nMongooseAdapter = require 'bloops/adapters/mongoose_adapter'\nmodels = require('./db').models\nfilters = require 'blo...
coffeescript
chosen
[ { "from": "system", "value": "Add comment for later menu entries\n" }, { "from": "human", "value": "require 'semantic-ui-css/components/icon.css'\nrequire 'semantic-ui-css/components/menu.css'\nrequire 'semantic-ui-css/components/sidebar.css'\nrequire '../../css/menu.css'\n\napi = require '../ba...
coffeescript
chosen
[ { "from": "system", "value": "Change from simple helper to block to allow track render\n" }, { "from": "human", "value": "if Package.templating?\n\tTemplate = Package.templating.Template\n\tBlaze = Package.blaze.Blaze\n\n\tBlaze.toHTMLWithDataNonReactive = (content, data) ->\n\t\tmakeCursorReact...
coffeescript
chosen
[ { "from": "system", "value": "Rename filename to snake case\n" }, { "from": "human", "value": "Ripper = require './ripper'\nNotificationView = require './notification-view'\n\n{ packages: packageManager } = atom\n\nmodule.exports =\n activate: ->\n return if 'refactor' in packageManager.getA...
coffeescript
chosen
[ { "from": "system", "value": "Add an alignment on columns in demo table\n" }, { "from": "human", "value": "\nmodule.exports =\n\n activate: (state) ->\n atom.workspaceView.command 'table-edit:demo', ->\n Table = require './table'\n TableView = require './table-view'\n\n table ...
coffeescript
chosen
[ { "from": "system", "value": "Add the appropriate line class.\n" }, { "from": "human", "value": "{View, $} = require 'atom'\n\nmodule.exports =\nclass SideView extends View\n @content: (side) ->\n @div class: \"side #{side.klass()} ui-site-#{side.site()}\", =>\n @div class: 'controls', ...
coffeescript
chosen
[ { "from": "system", "value": "Set unsubmitted for error case of editlinks.\n" }, { "from": "human", "value": "'use strict'\n\napp.directive 'volumeEditLinksForm', [\n 'pageService',\n (page) ->\n restrict: 'E',\n templateUrl: 'volume/editLinks.html',\n link: ($scope) ->\n volume ...
coffeescript
chosen
[ { "from": "system", "value": "Add the section name when creating a new issue\n" }, { "from": "human", "value": "React = require 'react'\nNav = React.createFactory require 'antwar-default-theme/Nav'\nPaths = require('antwar-core/PathsMixin')\nrequire 'antwar-default-theme/scss/main.scss'\n\nrequi...
coffeescript
chosen
[ { "from": "system", "value": "Remove useless env config, fix livereload settings\n" }, { "from": "human", "value": "convict = require 'convict'\n\nconfig = convict {\n env:\n doc: 'The application environment.'\n default: 'development'\n env: 'NODE_ENV'\n verbose:\n doc: 'speak to ...
coffeescript
chosen
[ { "from": "system", "value": ":art: Merge updatePosition function into Initialize\n" }, { "from": "human", "value": "# Source: https://github.com/lukehoban/atom-ide-flow/blob/master/lib/tooltip-view.coffee\n{$, View} = require 'atom'\n\nmodule.exports = (Main)->\n class TooltipView extends View...
coffeescript
chosen
[ { "from": "system", "value": "Add description for command line options.\n" }, { "from": "human", "value": "Validator = require('../main').Validator\nfs = require 'fs'\nargv = require('optimist')\n .usage('Usage: $0 --projectKey key --clientId id --clientSecret secret --csv file')\n .demand(['p...
coffeescript
chosen
[ { "from": "system", "value": "Make sure code is url decoded before encoding it to avoid double encoding\n" }, { "from": "human", "value": "define [\n \"jquery\"\n \"backbone\"\n \"app\"\n \"lib/extension\"\n \"lib/fuzzy-match\"\n], (\n $\n Backbone\n App\n Extension\n FuzzyMatch\n) ->\...
coffeescript
chosen
[ { "from": "system", "value": "Use new model setter in draggable" }, { "from": "human", "value": "Mixin = require 'mixto'\n\nmodule.exports =\nclass Draggable extends Mixin\n # Allows for user dragging on the screen\n # * `startEvent` (optional) event from a mousedown event\n enableDragging: (...
coffeescript
chosen
[ { "from": "system", "value": "Add clarifying comments to model.\n" }, { "from": "human", "value": "a = DS.attr\nETahi.Paper = DS.Model.extend\n assignees: DS.hasMany('user')\n editors: DS.hasMany('user')\n reviewers: DS.hasMany('user')\n editor: Ember.computed.alias('editors.firstObject')\n ...
coffeescript
chosen