conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Set XML for attribute nodes.\n" }, { "from": "human", "value": "@ignore = []\n\n@record_is_ignored = (name) ->\n ($.inArray name, ignore) isnt -1\n\nrender_field = ->\n if field.attr\n v = xml.attr name\n else\n x = xml.children field.name\n v = x.text()...
coffeescript
chosen
[ { "from": "system", "value": "Fix a crash when cmd+shift+m failed to load files\n" }, { "from": "human", "value": "{SelectListView} = require 'atom-space-pen-views'\n\npath = require 'path'\nfs = require 'fs'\n\nmodule.exports =\nclass PodFilePane extends SelectListView\n initialize: ->\n supe...
coffeescript
chosen
[ { "from": "system", "value": "Move URL to first line\n\n" }, { "from": "human", "value": "#\n# Wrap .js into .bat\n# http://www.dostips.com/forum/viewtopic.php?p=37780#p37780\n#\nfs = require \"fs\"\niconv = require \"iconv-lite\"\nini = require '../package'\n\nmodule.exports =\nme = (options)->...
coffeescript
chosen
[ { "from": "system", "value": "Add params to other methods\n" }, { "from": "human", "value": "uuid = require 'node-uuid'\nWebSocket = require 'ws'\n\nclass DeviceManagerSocketClient\n constructor: (@options={}) ->\n @messageCallbacks = {}\n\n connect: (callback=->) =>\n @connection =...
coffeescript
chosen
[ { "from": "system", "value": "Add JavaScript Redirect for 401 (Unauth)\n\nAdd a JavaScript catch for if the user receives a 401 response when\nattempting to click an AJAX-enabled link (i.e. signed out, not\nauthorized to edit, etc).\n" }, { "from": "human", "value": "jQuery ->\n $(\".best_in_pl...
coffeescript
chosen
[ { "from": "system", "value": "Remove unused student prop from mixin\n" }, { "from": "human", "value": "React = require 'react'\nRouter = require 'react-router'\nLateIcon = require '../late-icon'\nTaskHelper = require '../../helpers/task'\n\nmodule.exports = {\n\n propTypes:\n courseId: React...
coffeescript
chosen
[ { "from": "system", "value": "Move class to the outer `div`\n" }, { "from": "human", "value": "{View} = require 'atom'\n\n# Status bar view for the indentation indicator.\nmodule.exports =\nclass IndentationIndicatorView extends View\n @content: ->\n @div class: 'inline-block', =>\n @sp...
coffeescript
chosen
[ { "from": "system", "value": "Rename variable to pattern to shadow config key path\n" }, { "from": "human", "value": "{View} = require 'space-pen'\n$ = require 'jquery'\n_ = require 'underscore'\n\nmodule.exports =\nclass WrapGuide extends View\n @activate: (rootView, state) ->\n rootView.ea...
coffeescript
chosen
[ { "from": "system", "value": "Deal with Redis connection possibly being slow\n" }, { "from": "human", "value": "noflo = require 'noflo'\n{QueueComponent} = require './QueueComponent'\n\nclass SendMessage extends QueueComponent\n constructor: ->\n do @basePortSetup\n mq = null\n\n group...
coffeescript
chosen
[ { "from": "system", "value": "Hide Send Feedback from status bar\n" }, { "from": "human", "value": "path = require 'path'\nfs = require 'fs-extra'\nrequest = require 'request'\nDecompress = require 'decompress'\ninjectPackage = null\nworkDir = null\n\ninstallPackage = (owner, name, version, call...
coffeescript
chosen
[ { "from": "system", "value": "StatusBarMenu: Move separator from defaults to editor menu items.\n" }, { "from": "human", "value": "class IDE.StatusBarMenu extends KDContextMenu\n\n constructor: (options = {}) ->\n\n menuItems = @getMenuItems options.paneType\n {delegate} = ...
coffeescript
chosen
[ { "from": "system", "value": "Set image path for leaflet map js\n\nFix bug with map icon images not being found.\n" }, { "from": "human", "value": "\n$(document).ready( ->\n root = exports ? this\n mapDiv = $(\"#map\")\n if mapDiv?\n lat = mapDiv.data(\"lat\")\n lon = mapDiv.data(\"lon\...
coffeescript
chosen
[ { "from": "system", "value": "Clean up collections manager react-select\n\n- Closes #2040\n" }, { "from": "human", "value": "React = require 'react'\nSelect = require 'react-select'\napiClient = require '../api/client'\ndebounce = require 'debounce'\n\nmodule.exports = React.createClass\n displ...
coffeescript
chosen
[ { "from": "system", "value": "Update Google Analytics tracking script.\n" }, { "from": "human", "value": "###\nTypekit\n###\n\ntry\n Typekit.load()\n\n###\nGoogle Analytics\n###\n\nGOOGLE_ANALYTICS =\n account: 'UA-12933299-1'\n domain: 'stdout.be'\n\n_gaq = _gaq or []\n_gaq.push ['_set...
coffeescript
chosen
[ { "from": "system", "value": "Fix issue with translateY calculation when going next.\n" }, { "from": "human", "value": "class Presentation\n constructor: ->\n @$presentation = $('.presentation')\n @$current = $('section').first()\n @y = 0\n\n @$presentation.css('tra...
coffeescript
chosen
[ { "from": "system", "value": "Add 'slug_title' as idAttribute to Topic\n\nThis will prevent duplicate Topics in collections when added\n" }, { "from": "human", "value": "class window.Topic extends Backbone.Model\n newChannelForUser: (user) ->\n new Channel\n title: this.get 'title'\n ...
coffeescript
chosen
[ { "from": "system", "value": "Call callback in event handlers with event\n" }, { "from": "human", "value": "class Game.State extends Game.TwoWay\n constructor: () ->\n @objects = {}\n @eventCounters = {}\n @eventHandlers = {}\n super\n onEvent: (e) ->\n # Add timestamped instanc...
coffeescript
chosen
[ { "from": "system", "value": "Add ignoreAllRequests() to ajax spec helpers\n\nJust delegates to the fake server\n" }, { "from": "human", "value": "# =require modules\n\nTIMEOUT = 500 # ms - Used to be 300, but FF was too slow\nextendClass 'specs.jasmine.AjaxHelpers', (self)->\n ajaxServer = nul...
coffeescript
chosen
[ { "from": "system", "value": "Change the default compiler for the lazy demo\n" }, { "from": "human", "value": "'use strict'\n\n{\n\tsetupEditors\n\tsetupSamples\n\tsetupCompilers\n\tsetupRunButton\n\tsaveProgram\n\tloadProgram\n} = window.viz\n\n\ngrid = null\n\n\nrun = (editors, compiler) ->\n\...
coffeescript
chosen
[ { "from": "system", "value": "Add gone with the wind\n" }, { "from": "human", "value": "# Movie quotes\n#\n# It'll happen\n#\n\nmodule.exports = (robot) ->\n robot.hear /.*one (in|out of) a million*/, (msg) ->\n msg.send \"so you're telling me there's a chance: http://www.youtube.com/watch?v...
coffeescript
chosen
[ { "from": "system", "value": "Set encoding after reboot, and misc fixes" }, { "from": "human", "value": "gbk_paths = [\n]\n\ngbk_exclude_path = [\n]\n\natom.workspace.onDidOpen (event) ->\n editor = event.item\n path = event.uri\n gbk_paths.forEach (regex) ->\n if regex.test(path)\n g...
coffeescript
chosen
[ { "from": "system", "value": "Check an error when we fail to find an appropriate file by default (WNdb doesn't contain exceptions)\n" }, { "from": "human", "value": "should = require('chai').should()\n\nWordnet = require('../lib/wordnet')\n\ndescribe 'wordnet', () ->\n\n wordnet = undefined\n\n...
coffeescript
chosen
[ { "from": "system", "value": "Add TODO regarding quieting progress bar\n" }, { "from": "human", "value": "async = require('async')\nfs = require('fs')\nwidgets = require('../widgets/widgets')\nserver = require('../../server/server')\nProgressBar = require('progress')\n\nexports.remove = (name, c...
coffeescript
chosen
[ { "from": "system", "value": "Reduce polling period on front-end\n" }, { "from": "human", "value": "class LogFeed\n POLL_PERIOD: 500\n\n constructor: ->\n @currentLine = -1\n @lines = $('#lines')\n\n getLines: =>\n $.get(window.location.href + '/changes.json',\n {currentLine: @c...
coffeescript
chosen
[ { "from": "system", "value": "Add disable a html preview shortcut\n" }, { "from": "human", "value": "# Your keymap\n#\n# Atom keymaps work similarly to stylesheets. Just as stylesheets use selectors\n# to apply styles to elements, Atom keymaps use selectors to associate\n# keystrokes with events...
coffeescript
chosen
[ { "from": "system", "value": "Use the lineTextOffset in match results\n" }, { "from": "human", "value": "{View, Range} = require 'atom'\n\nmodule.exports =\nclass SearchResultView extends View\n @content: (previewList, filePath, match) ->\n range = Range.fromObject(match.range)\n prefix =...
coffeescript
chosen
[ { "from": "system", "value": "Check for empty post results in bootstrap" }, { "from": "human", "value": "async = require(\"async\")\nmongoose = require(\"mongoose\")\nObjectId = mongoose.Types.ObjectId\nUser = mongoose.model(\"User\")\nPost = mongoose.model(\"Post\")\nMessage = mongoose.model(\"...
coffeescript
chosen
[ { "from": "system", "value": "Remove stray Google Auth JavaScript code.\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: h...
coffeescript
chosen
[ { "from": "system", "value": "Add IE a bit more time\n" }, { "from": "human", "value": "describe 'NoFlo UI initialization', ->\n win = null\n doc = null\n db = null\n before (done) ->\n @timeout 20000\n iframe = document.getElementById 'app'\n iframe.src = '../app.html'\n iframe....
coffeescript
chosen
[ { "from": "system", "value": "Make poll search case insensitive\n" }, { "from": "human", "value": "angular.module('loomioApp').controller 'PreviousPollsPageController', ($scope, $rootScope, $routeParams, Records, AbilityService, TranslationService, LoadingService) ->\n $rootScope.$broadcast('cu...
coffeescript
chosen
[ { "from": "system", "value": "Fix permalink url for /g replacing of space\n" }, { "from": "human", "value": "Schema = mongoose.Schema\nObjectId = Schema.ObjectId\n\nComment = new Schema {\n body : String,\n author_id : ObjectId,\n date : Date\n}\n\nFile = new Schema {\n path : Str...
coffeescript
chosen
[ { "from": "system", "value": "Clear layout set in button group component as it seems not to be needed anymore.\n" }, { "from": "human", "value": "###\nButton Group.\n\nIn its simple form, each item in the button group is a Bootstrap.Button component,\nIn case this is a Radio, each item is render...
coffeescript
chosen
[ { "from": "system", "value": "Fix require to new path\n" }, { "from": "human", "value": "#= require lib/format_as_short_number\n\ndescribe 'window.format_as_short_number', ->\n\n tests = [\n [`undefined`, \"?\"]\n [null, \"?\"]\n\n [0, \"0\"]\n [3, \"3\"]\n [3.52555, ...
coffeescript
chosen
[ { "from": "system", "value": "Add JS toggle to show cards fields when has previously\n" }, { "from": "human", "value": "window.NeighborlyBalancedCreditcard = Backbone.View.extend\n el: '.neighborly-balanced-creditcard-form'\n\n initialize: ->\n _.bindAll(this, 'validate', 'submit')\n $(d...
coffeescript
chosen
[ { "from": "system", "value": "Add marker to satellite image\n" }, { "from": "human", "value": "{Model} = require 'spine'\n\nclass Subject extends Model\n @configure 'Subject', 'zooniverseId', 'location', 'coords', 'metadata'\n\n @toClassify = []\n\n select: ->\n @trigger 'select'\n\n sate...
coffeescript
chosen
[ { "from": "system", "value": "Revert the timeout change in the docker runner\n\nRevert the timeout change in the docker runner as the conversion from seconds to milliseconds as well as the default timeout are already handled in the Request parser.\n" }, { "from": "human", "value": "spawn = requi...
coffeescript
chosen
[ { "from": "system", "value": "Create button for creating challenges from feed\n" }, { "from": "human", "value": "window.ReactFeedSelection = React.createClass\n displayName: 'ReactFeedSelection'\n mixins: [UpdateOnSignInOrOutMixin]\n\n getInitialState: ->\n feedChoice: 'global'\n feeds:...
coffeescript
chosen
[ { "from": "system", "value": "Use parseFloat() instead of Number() in numeric range control\n" }, { "from": "human", "value": "define [\n './range'\n], (range) ->\n\n # A control for entering an inclusive or exclusive numeric range\n class NumberControl extends range.RangeControl\n ...
coffeescript
chosen
[ { "from": "system", "value": "Use face an pop for model animation\n" }, { "from": "human", "value": "#= require_self\n#= require_tree .\n\nwindow.Neighborly =\n configs:\n turbolinks: true\n pjax: false\n\n modules: -> []\n\n initPage: ->\n that = this\n unless window.Turbolinks i...
coffeescript
chosen
[ { "from": "system", "value": "Replace player clones in tunnel\n" }, { "from": "human", "value": "Game = @Game\nGame.Scripts ||= {}\n\nclass Game.Scripts.TrainAssaulter extends Game.EntityScript\n spawn: (options) ->\n dir = options.from ? 'top'\n switch dir\n when 'top'\n star...
coffeescript
chosen
[ { "from": "system", "value": "Update preferred line length to 100\n" }, { "from": "human", "value": "\"*\":\n editor:\n invisibles: {}\n showInvisibles: true\n fontFamily: \"Source Code Pro\"\n core:\n ignoredNames: [\n \".bundle\"\n \".git\"\n \"log\"\n \"repos...
coffeescript
chosen
[ { "from": "system", "value": "Fix to work Remove/Add Fields under turbolinks\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 fi...
coffeescript
chosen
[ { "from": "system", "value": "Fix getting port from env\n" }, { "from": "human", "value": "express = require 'express'\napp = express()\n\n# Serve static files\napp.use express.static(__dirname + '/public')\n\n# Set cache manifext content-type\napp.use (req, res, next)->\n if req.originalUrl ==...
coffeescript
chosen
[ { "from": "system", "value": "Fix rendering failure in RDDs-output\n" }, { "from": "human", "value": "H2O.RDDsOutput = (_, _rDDs) ->\n _rDDViews = signal []\n\n createRDDView = (rDD) ->\n id: rDD.id\n name: rDD.name\n partitions: rDD.partitions\n\n _rDDViews map _rDDs, createRDDView\...
coffeescript
chosen
[ { "from": "system", "value": "Fix bug introduced by coffee migration" }, { "from": "human", "value": "\nfs = require 'fs'\npath = require 'path'\n\nmodule.exports = (settings) ->\n # Validation\n throw new Error 'No shell provided' if not settings.shell\n shell = settings.shell\n # P...
coffeescript
chosen
[ { "from": "system", "value": "Remove class instead of animation\n" }, { "from": "human", "value": "Cookies = require 'cookies-js'\n\nmodule.exports = ->\n $el = $('.lo-cta')\n\n unless Cookies.get('lo-cta')\n $el.addClass 'lo-cta--visible'\n\n $el.on 'click', '.lo-cta__close', (e) ->\n ...
coffeescript
chosen
[ { "from": "system", "value": "Add new convention method for performing channel actions\n" }, { "from": "human", "value": "class @Cable.Channel\n constructor: (params = {}) ->\n @channelName ?= @underscore @constructor.name\n\n params['channel'] = @channelName\n @channelIdentifier = JSO...
coffeescript
chosen
[ { "from": "system", "value": "Delete password in an afterEach function\n" }, { "from": "human", "value": "keytar = require '../lib/keytar'\n\ndescribe \"keytar\", ->\n service = 'keytar tests'\n account = 'buster'\n password = 'secret'\n\n beforeEach ->\n keytar.deletePassword(service, ac...
coffeescript
chosen
[ { "from": "system", "value": "Write a test. It passed!\n" }, { "from": "human", "value": "# Use chai assertation library\nexpect = chai.expect\n\nbefore ->\n @client = new Postie.Client('http://example.org/background.html')\n\ndescribe 'ready', ->\n it 'should create an iframe', ->\n @clien...
coffeescript
chosen
[ { "from": "system", "value": "Update api to match cnx-archive\n" }, { "from": "human", "value": "# Representation of individual nodes in a book's tree (table of contents).\n# A Node can represent both a tree (subcollection), or leaf (page).\n# Page Nodes also are used to cache a page's content o...
coffeescript
chosen
[ { "from": "system", "value": "Use to inject mock service\n" }, { "from": "human", "value": "'use strict'\n\ndescribe 'Controller: ContactCtrl', ->\n\n # load the controller's module\n beforeEach module 'expressoApp'\n\n ContactCtrl = {}\n\n scope = {}\n\n # Initialize the controller and a ...
coffeescript
chosen
[ { "from": "system", "value": "Use a different serverAddress so it works over apache proxied connection\n" }, { "from": "human", "value": "define [\n\t'models/server'\n\t'vendor/underscore'\n\t'vendor/jquery'\n\t], ( Server ) -> \n\t\n\t# Application base class\n\t#\n\n\tclass App\n\n\t\tid: null...
coffeescript
chosen
[ { "from": "system", "value": "Move require inside method to fix hot module reloading\n\nhelpers/notifications.coffee is required from the main index file so it\ncan call Notifications.start()\n\nThis was in turn requiring Router outside the HMR <Application> scope, so any file\nthat also used Router would f...
coffeescript
chosen
[ { "from": "system", "value": "Fix 'create new' in private group list opening 'create channel' flex\n" }, { "from": "human", "value": "Template.listPrivateGroupsFlex.helpers\n\tgroups: ->\n return ChatSubscription.find { t: { $in: ['p']}, f: { $ne: true } }, { sort: 't': 1, 'name': 1 }\n\nTemp...
coffeescript
chosen
[ { "from": "system", "value": "EDSC-122: Address duplicate definition from merge and load order issue\n" }, { "from": "human", "value": "#= require models/data/query\n#= require models/data/project\n#= require models/data/user\n#= require models/ui/temporal\n#= require models/ui/project_list\n\nd...
coffeescript
chosen
[ { "from": "system", "value": "Fix accidentally created closure inside of a loop\n\nI accidentally created a closure inside a loop with the result, that the\ncallback was only executed with the last iteration value. I have fixed\nthat by creating a function which then again creates the callback\nfunction bas...
coffeescript
chosen
[ { "from": "system", "value": "Return new scopes array for each line tokenized\n\nDownstream consumers may tweak the tokens returned and it shouldn't\naffect future lines tokenized which would happen if the same array\nwas pushed each time.\n" }, { "from": "human", "value": "{Emitter} = require '...
coffeescript
chosen
[ { "from": "system", "value": "Use the document for the listener target for turbolinks\n" }, { "from": "human", "value": "#= require glimpse/vendor/jquery.tipsy\n\nupdatePerformanceBar = ->\n glimpseResults = $('#glimpse-results')\n $('#glimpse [data-defer-to]').each ->\n deferKey = $(this)....
coffeescript
chosen
[ { "from": "system", "value": "Fix bug that unrelated builds are updated\n" }, { "from": "human", "value": "$ ->\n $('.jobs_controller.index_action').each ->\n new Altria.ServerEvent()\n .on 'build.started build.finished', (attributes) ->\n $.ajax \"/jobs/#{attributes.job_id}\", s...
coffeescript
chosen
[ { "from": "system", "value": "Make Router context not a hash\n" }, { "from": "human", "value": "#= require app\n\nApp.Router = Ember.Router.extend\n enableLogging: true\n location: 'hash'\n\n root: Ember.Route.extend\n index: Ember.Route.extend\n route: '/'\n redirectsTo: 'whatwo...
coffeescript
chosen
[ { "from": "system", "value": "Update opinionaters when model changes\n" }, { "from": "human", "value": "class window.OpinionatersEvidence extends Backbone.Model\n\n opinionaters: ->\n @_opinionaters ?= new Users @get('users')\n" }, { "from": "gpt", "value": "class window.Opiniona...
coffeescript
chosen
[ { "from": "system", "value": "Add ctrl+h -> ctrl+f to atom keybindings\n" }, { "from": "human", "value": "'.platform-win32, .platform-linux':\n 'alt-\\\\': 'unset!' # tree-view:toggle-focus default\n 'ctrl-|': 'unset!' # tree-view:reveal-active-file default\n 'ctrl-0': 'tree-view:reveal-activ...
coffeescript
chosen
[ { "from": "system", "value": "Add check for maximum data length of 900 characters\n" }, { "from": "human", "value": "# Description:\n# Generate QR codes as PNG with size 128x128 pixels\n# Using service from [QR Code Generator](http://goqr.me/api/doc/create-qr-code/)\n#\n# Dependencies:\n# ...
coffeescript
chosen
[ { "from": "system", "value": "Make Internal Hubot disabled by default\n" }, { "from": "human", "value": "RocketChat.settings.addGroup 'InternalHubot'\nRocketChat.settings.add 'InternalHubot_Enabled', true, { type: 'boolean', group: 'InternalHubot', i18nLabel: 'Enabled' }\nRocketChat.settings.add...
coffeescript
chosen
[ { "from": "system", "value": "Implement methods to handle indexes in Models\n" }, { "from": "human", "value": "RocketChat.models._Base = class\n\tfind: ->\n\t\treturn @model.find.apply @model, arguments\n\n\tfindOne: ->\n\t\treturn @model.findOne.apply @model, arguments\n\n\tinsert: ->\n\t\tretu...
coffeescript
chosen
[ { "from": "system", "value": "Save cell edits if user clicks outside of the cell.\n" }, { "from": "human", "value": "$ ->\n enableEditables()\n\nenableEditables = ->\n $('span.editable').editable (value, settings) ->\n $span = $(this)\n data = {_method: 'PUT'}\n data[$span.data('attri...
coffeescript
chosen
[ { "from": "system", "value": "Refactor router properties currentView, currentPath to view, path\n" }, { "from": "human", "value": "class Router extends Backbone.Router\n @go = (path) -> -> @routeDirectly path, arguments\n\n #- Routing functions\n\n routeToServer: ->\n window.location.reloa...
coffeescript
chosen
[ { "from": "system", "value": "Print msg to stderr in case of problem.\n" }, { "from": "human", "value": "Config = require '../config'\nargv = require('optimist')\n .usage('Usage: $0 --projectKey key --clientId id --clientSecret secret')\n .demand(['projectKey','clientId', 'clientSecret'])\n ....
coffeescript
chosen
[ { "from": "system", "value": "Add record querying to FixtureAdapter." }, { "from": "human", "value": "Syrup.ApplicationAdapter = DS.FixtureAdapter\n" }, { "from": "gpt", "value": "Syrup.ApplicationAdapter = DS.FixtureAdapter.extend\n queryFixtures: (records, query, type)->\n ...
coffeescript
chosen
[ { "from": "system", "value": "Use correct property name for Facebook OG tags." }, { "from": "human", "value": "React = require 'react'\n\nmodule.exports = (tags) ->\n _tags = []\n for name, content of tags\n if content\n _tags.push <meta name=name content=content key=name...
coffeescript
chosen
[ { "from": "system", "value": "Add a blank option when selecting the location option\n" }, { "from": "human", "value": "jQuery ->\n $('form').on 'click', '.add_fields', (event) ->\n time = new Date().getTime()\n regexp = new RegExp($(this).data('id'), 'g')\n $(this).before($(this).data(...
coffeescript
chosen
[ { "from": "system", "value": "Create game with proper from param\n" }, { "from": "human", "value": "twilio = require 'twilio'\nreset = '+16466816260'\n\nmodule.exports = (app) ->\n Game = app.get 'game'\n\n hook = twilio.webhook\n validate: false\n\n app.get '/twilio/voice', hook, (req, re...
coffeescript
chosen
[ { "from": "system", "value": "Remove themes and disable telemetry\n" }, { "from": "human", "value": "\"*\":\n \"atom-autocomplete-php\": {}\n \"atom-beautify\":\n css:\n beautify_on_save: true\n end_with_newline: true\n indent_size: 2\n no_lead_zero: true\n general:\n...
coffeescript
chosen
[ { "from": "system", "value": "Create computed properties checking storage of text\n" }, { "from": "human", "value": "`import DS from 'ember-data'`\n\nBlogyPost = DS.Model.extend {\n published: DS.attr()\n draft: DS.attr()\n ilustration: DS.attr()\n title: DS.attr()\n locale: DS.attr()\n sl...
coffeescript
chosen
[ { "from": "system", "value": "Call exit on process global\n" }, { "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} = require 'underscore-plus'\n...
coffeescript
chosen
[ { "from": "system", "value": "Fix view reize based on keyboard\n" }, { "from": "human", "value": "if Meteor.isCordova\n\twindow.addEventListener 'deviceready', ->\n\t\tcordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);\n\t\tcordova.plugins.Keyboard.disableScroll(true);\n\n\twindow.addEvent...
coffeescript
chosen
[ { "from": "system", "value": "[LOCALE] Throw error on line not found\n" }, { "from": "human", "value": "class @Locale\n\n constructor: ->\n\n # @param dialoguesFilename [String] path of the JSON file containing all the localized dialogue lines\n loadDialogueLines: (dialoguesFilename) =>\n ...
coffeescript
chosen
[ { "from": "system", "value": "Fix path to my more typical username - aross\n" }, { "from": "human", "value": "\"*\":\n core:\n disabledPackages: [\n \"background-tips\"\n \"exception-reporting\"\n \"metrics\"\n ]\n followSymlinks: false\n hideGitIgnoredFiles: true\n ...
coffeescript
chosen
[ { "from": "system", "value": "Return early when popped stack is empty\n" }, { "from": "human", "value": "SymbolsView = require './symbols-view'\n\nmodule.exports =\nclass GoBackView extends SymbolsView\n toggle: =>\n return if @stack.length is 0\n\n top = @stack.pop()\n atom.workspaceV...
coffeescript
chosen
[ { "from": "system", "value": "Make sure application_serializer is always required first\n" }, { "from": "human", "value": "#= require ./element_animations\n#= require ./store\n#= require ./event_stream_actions\n#= require_tree ./mixins\n#= require_tree ./models\n#\n#= require ./controllers/task_...
coffeescript
chosen
[ { "from": "system", "value": "Refactor with destructuring and expand InStateMenu.\n\nA bit cleaner than storing a reference to the game instance.\n\nAdds a pauseHandler, which defaults to pausing the whole game (including\nmenu interactions)." }, { "from": "human", "value": "define [\n 'phaser'...
coffeescript
chosen
[ { "from": "system", "value": "Remove console logging to not spam output\n" }, { "from": "human", "value": "if not Meteor.server\r\n console.log(\"spacejamio:cli - Meteor.server is not defined, creating noop implementations for all meteor ddp methods\")\r\n _.each(['publish', 'methods', 'call',...
coffeescript
chosen
[ { "from": "system", "value": "Use trim of jquery (trim does not exist in IE8)" }, { "from": "human", "value": "#= require partystreusel/base\n\nclass Readmore extends Partystreusel.Base\n @className = 'Readmore'\n\n constructor: (el) ->\n super\n\n @contentDiv = $('<div/>')\n .appen...
coffeescript
chosen
[ { "from": "system", "value": "Fix typo in route name\n" }, { "from": "human", "value": "angular.module('app.modules.tabs', [\n 'app.modules.tabs.items'\n 'app.modules.tabs.review'\n 'app.modules.tabs.menus'\n 'app.modules.tabs.settings'\n # 'app.components.tabs.share'\n # 'app.components.t...
coffeescript
chosen
[ { "from": "system", "value": "Use default empty function per @markijbema's comment\n" }, { "from": "human", "value": "class Factlink.Prepare\n\n constructor: ->\n @$el = $(Factlink.templates.create)\n @$el.appendTo Factlink.el\n @$el.hide()\n\n @$el.bind \"mouseup\", (e) -> e.stopPr...
coffeescript
chosen
[ { "from": "system", "value": "Change default value of toFixed|toExponential|toPrecision methods\n" }, { "from": "human", "value": "Handlebars.registerHelper 'toFixed', (number, digits) ->\n number.toFixed if Utils.isUndefined(digits) then digits\n\nHandlebars.registerHelper 'toPrecision', (nu...
coffeescript
chosen
[ { "from": "system", "value": "Remove unnecessary context information in CoffeeLint's message\n" }, { "from": "human", "value": "{Range, Point} = require 'atom'\nCheckstyleBase = require './checkstyle-base'\nViolation = require '../violation'\n\nmodule.exports =\nclass CoffeeLint extends Checksty...
coffeescript
chosen
[ { "from": "system", "value": "Add context section so well-formed test\n" }, { "from": "human", "value": "should = require 'should'\n{wd40, browser, base_url, login_url, home_url, prepIntegration} = require './helper'\n\ndescribe 'Free Trial', ->\n prepIntegration()\n\n before (done) ->\n wd...
coffeescript
chosen
[ { "from": "system", "value": "Migrate projects from single doing column to array of doing columns\n" }, { "from": "human", "value": "angular.module 'Scrumble.common'\n.config ($stateProvider) ->\n $stateProvider\n .state 'tab',\n abstract: true\n templateUrl: 'common/states/base.html'\n ...
coffeescript
chosen
[ { "from": "system", "value": "Clear data from cache on error\n\nThis is similar to what is done for the $http service.\n" }, { "from": "human", "value": "angular.module('ad3').provider 'd3Service', () ->\n defaults = @defaults = {}\n\n @$get = ['$cacheFactory', '$rootScope', ($cacheFactory, $r...
coffeescript
chosen
[ { "from": "system", "value": "Configure moment().calender() to be used as an alternative to moment().from()" }, { "from": "human", "value": "window.env = require 'env'\nwindow.utils = require 'utils'\nwindow.constants = require 'constants'\nwindow.app = require 'application'\n\n# Make all string...
coffeescript
chosen
[ { "from": "system", "value": "Use `git pull` instead of fetch + merge.\n" }, { "from": "human", "value": "git = require '../git'\nOutputView = require './output-view'\nBranchListView = require './branch-list-view'\n\nmodule.exports =\n # Extension of BranchListView\n # Takes the name of the re...
coffeescript
chosen
[ { "from": "system", "value": "Add before sharing callback for facebook\n" }, { "from": "human", "value": "class @SharingTags.BaseShare\n\n url: null\n title: null\n description: null\n\n constructor: ({@url, @title, @description})->\n @_assert_vars 'url'\n\n _open_popup: (api_url, params...
coffeescript
chosen
[ { "from": "system", "value": "Stop blinking after each test\n" }, { "from": "human", "value": "noflo = require 'noflo'\nchai = require 'chai' unless chai\nStateToColor = require '../components/StateToColor.coffee'\nfs = require 'fs'\npath = require 'path'\n\ndescribe 'StateToColor component', ->...
coffeescript
chosen
[ { "from": "system", "value": "Transform specs to something useful\n" }, { "from": "human", "value": "MarkdownPreviewView = require 'markdown-preview/lib/markdown-preview-view'\n$ = require 'jquery'\n{$$$} = require 'space-pen'\n\ndescribe \"MarkdownPreviewView\", ->\n [buffer, preview] = []\n\n...
coffeescript
chosen
[ { "from": "system", "value": "Add subscription handleEvent when buffer.onDidSave\n" }, { "from": "human", "value": "{BufferedProcess, CompositeDisposable} = require 'atom'\npath = require 'path'\n\nmodule.exports =\nclass RubocopAutoCorrect\n constructor: ->\n @subscriptions = new CompositeD...
coffeescript
chosen
[ { "from": "system", "value": "Add test for removing a specific responder\n" }, { "from": "human", "value": "module \"PubSub\"\n\nrequire [\"core/pubsub\"], (pubsub) ->\n\n test \"export aliases\", ->\n\n ok pubsub.on is pubsub.respondTo, \"on and respondTo\"\n ok pubsub.off is pubsub.stop...
coffeescript
chosen
[ { "from": "system", "value": "Add atom ctags for Ruby.\n" }, { "from": "human", "value": "\"*\":\n editor:\n fontFamily: \"Menlo\"\n showIndentGuide: true\n tabLength: 2\n invisibles: {}\n preferredLineLength: 120\n softWrap: true\n fontSize: 14\n core:\n ignoredNames: ...
coffeescript
chosen
[ { "from": "system", "value": "Add tooltip to dev mode view\n" }, { "from": "human", "value": "{View} = require 'atom'\n\nmodule.exports =\nclass DevModeView extends View\n @content: ->\n @span class: 'inline-block icon icon-color-mode text-error'\n" }, { "from": "gpt", "value": "...
coffeescript
chosen
[ { "from": "system", "value": "fix(api-error): Fix retrieval of `error` field, used for endpoint updates\n" }, { "from": "human", "value": "# This file contains custom Nylas error classes.\n#\n# In general I think these should be created as sparingly as possible.\n# Only add one if you really can...
coffeescript
chosen