conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Fix a broken if-else-if statement\n" }, { "from": "human", "value": "define [\n\t\"base\"\n], (App) ->\n\tApp.controller \"HistoryV2DiffController\", ($scope, ide, event_tracking) ->\n\t\t$scope.restoreState =\n\t\t\tinflight: false\n\t\t\terror: false\n\n\t\t$scope...
coffeescript
chosen
[ { "from": "system", "value": "Use evalAsync instead of timeout\n" }, { "from": "human", "value": "define [\n\t\"base\"\n], (App) ->\n\tApp.directive \"reviewPanelSorted\", ($timeout) ->\n\t\treturn {\n\t\t\tlink: (scope, element, attrs) ->\n\t\t\t\tlayout = () ->\n\t\t\t\t\tentries = []\n\t\t\t...
coffeescript
chosen
[ { "from": "system", "value": "Remove property calls for default ones\n" }, { "from": "human", "value": "ETahi.AdminJournalUserController = Ember.ObjectController.extend\n resetPasswordSuccess: (->\n false\n ).property()\n\n resetPasswordFailure: (->\n false\n ).property()\n\n modalId:...
coffeescript
chosen
[ { "from": "system", "value": "Improve display of no data values\n" }, { "from": "human", "value": "class Workbench.Views.DatastreamLatestView extends Backbone.View\n template: JST[\"workbench/workbench/templates/latest\"]\n\n initialize: ->\n\n # Animate out, update content, animate back in\n...
coffeescript
chosen
[ { "from": "system", "value": "Add tests for object clone().\n" }, { "from": "human", "value": "uri = require('../lib/util/uri-helpers')\n\nxdescribe 'resolveURL()', ->\n it 'should replace the last segment', ->\n expect(uri.resolveURL('a', 'b')).toBe 'b'\n expect(uri.resolveURL('x/y', 'z'...
coffeescript
chosen
[ { "from": "system", "value": "Add es6 promise polyfill to the spec setup\n" }, { "from": "human", "value": "if typeof window isnt 'undefined'\n root = window\nelse\n root = global\n\nif !root._spec_setup\n root.sinon = require 'sinon'\n root.mockery = require 'mockery'\n root.chai =...
coffeescript
chosen
[ { "from": "system", "value": "Simplify resize and make it work outside of doc\n" }, { "from": "human", "value": "Bacon = require(\"baconjs\")\n\n# Observe mouse move and provide callback functions to react accordingly\n#\n# @param mouseDownEvent: {Event} Initial event that should be called prior...
coffeescript
chosen
[ { "from": "system", "value": "Add support for mac and linux with wine\n" }, { "from": "human", "value": "path = require 'path'\n{spawn} = require 'child_process'\n\npairSettings = ['version-string']\nsingleSettings = ['file-version', 'product-version', 'icon']\n\nmodule.exports = (exe, options, ...
coffeescript
chosen
[ { "from": "system", "value": "Use readonly transactions for read operations.\n" }, { "from": "human", "value": "class @PodsStore\n update: (new_records) ->\n @writeObjects(new_records)\n all: ->\n records = []\n promise = new Promise (resolve, reject) =>\n @database (db) ->\n ...
coffeescript
chosen
[ { "from": "system", "value": "Update the shared queries collection when a new query is created\n" }, { "from": "human", "value": "###\nThe 'main' script for bootstrapping the default Cilantro client. Projects can\nuse this directly or emulate the functionality in their own script.\n###\n\nrequir...
coffeescript
chosen
[ { "from": "system", "value": "Make sure REPL sockets are cleaned up no matter how the server shuts down\n" }, { "from": "human", "value": "\nnconf = require 'nconf'\nnet = require 'net'\npkgman = require 'pkgman'\nrepl = require 'repl'\n\nexports.$initialized = ->\n\n\treplServer = null\n\n\t# F...
coffeescript
chosen
[ { "from": "system", "value": "Fix loading of Rich Text page in Test Controls\n" }, { "from": "human", "value": "define [\n\t\"base\"\n\t\"ace/ace\"\n], (App) ->\n\tApp.controller \"TestControlsController\", ($scope) ->\n\n\t\t$scope.openProjectLinkedFileModal = () ->\n\t\t\twindow.openProjectLin...
coffeescript
chosen
[ { "from": "system", "value": "Fix a typo in last commit\n" }, { "from": "human", "value": "class DirectionalSound extends Wage.MeshSound\n constructor: (name, mesh, @angles, options) ->\n super name, mesh, options\n\n _init: (options) ->\n @panner.coneInnerAngle = angles.inne...
coffeescript
chosen
[ { "from": "system", "value": "Add some debug logging for socket connections" }, { "from": "human", "value": "\nBackbone = require('backbone')\n[Control, Controls] = require('./Control.coffee')\nRouter = require('./Router.coffee')\nAppView = require('./AppView.coffee')\n\nmodule.exports = class A...
coffeescript
chosen
[ { "from": "system", "value": "Hide subchannels when showing all factlinks in topic\n" }, { "from": "human", "value": "class window.ChannelView extends Backbone.Marionette.Layout\n template: 'channels/channel'\n\n regions:\n factList: '.js-region-fact-list'\n subChannelsRegion: '.js-regio...
coffeescript
chosen
[ { "from": "system", "value": "Add a mocha workaround for diffs.\n" }, { "from": "human", "value": "require 'coffee-script/register'\nrequire './setup'\n\n{eachGroup} = require('../lib/specs_iterator')\n\neachGroup (group) ->\n run = if group.pending then xdescribe else describe\n\n run group.n...
coffeescript
chosen
[ { "from": "system", "value": "Make sure that there's only one form for each type of records.\n" }, { "from": "human", "value": "RECORDS = {}\n\ninit_records = (name) ->\n ($ \".current_xml\").append RECORDS[name] = ($ \"<#{name}>\")\n\ninit_records \"clients\"\ninit_records \"groups\"\n\n@open_...
coffeescript
chosen
[ { "from": "system", "value": "Add unit test for /objekttyper listing\n" }, { "from": "human", "value": "\"use strict\"\n\nrequest = require 'supertest'\nassert = require 'assert'\nexports.app = app = require './../coffee/server.coffee'\nexports.data = data = require('./util/data-gen.coffee')(100...
coffeescript
chosen
[ { "from": "system", "value": "Fix what was supposed to be a temp path\n" }, { "from": "human", "value": "supervisor = require 'supervisor'\n\n\nmain = () ->\n supervisor.run [\n '--quiet'\n '--exec', 'node'\n '--no-restart-on', 'exit'\n '--extensions', 'coffee,js,json,yml'\n '/Us...
coffeescript
chosen
[ { "from": "system", "value": "Add atom prefix to rootView reference\n" }, { "from": "human", "value": "StyleguideView = null\nstyleguideUri = 'atom://styleguide'\n\ncreateStyleguideView = (state) ->\n StyleguideView ?= require './styleguide-view'\n new StyleguideView(state)\n\ndeserializer =\n...
coffeescript
chosen
[ { "from": "system", "value": "Revert \"use helper to preserve cell widths\" because the other rows' cells' widths are not preserved.\n\nThis reverts commit 4e610c8302be12f686e8fe1262b4f9e1e04b0cad.\n" }, { "from": "human", "value": "# Place all the behaviors and hooks related to the matching con...
coffeescript
chosen
[ { "from": "system", "value": "FIX: Fix bug preventing portfolios from being deleted\n" }, { "from": "human", "value": "angular.module('doubtfire.projects.project-portfolio-wizard.portfolio-review-step', [])\n\n#\n# Step for students to view their portfolio and optionally delete it\n#\n.directive...
coffeescript
chosen
[ { "from": "system", "value": "Fix unknown props on TutorialButton\n" }, { "from": "human", "value": "React = require 'react'\nTutorial = require '../lib/tutorial'\n\nmodule.exports = React.createClass\n getDefaultProps: ->\n workflow: null\n project: null\n user: null\n\n getInitialSt...
coffeescript
chosen
[ { "from": "system", "value": "Improve Names of Choice EDSL Parameters\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, ...
coffeescript
chosen
[ { "from": "system", "value": "Remove extra \"/\" in Scenario url_path\n" }, { "from": "human", "value": "class @Scenario extends Backbone.Model\n api_session_id: =>\n key = App.settings.get('api_session_id')\n return if key? then key else null\n\n api_attributes: =>\n s = App.settings...
coffeescript
chosen
[ { "from": "system", "value": "Add hotkey for \"reply with selected text\" to Issueable\n" }, { "from": "human", "value": "#= require shortcuts_navigation\n\nclass @ShortcutsIssueable extends ShortcutsNavigation\n constructor: (isMergeRequest) ->\n super()\n Mousetrap.bind('a', ->\n $...
coffeescript
chosen
[ { "from": "system", "value": "Disable for now, lets keep conversations with users own name.\n" }, { "from": "human", "value": "class ChatConversationListItemTitle extends JView\n\n constructor:(options = {}, data)->\n options.cssClass = 'chat-item'\n data = [nick for nick in data when nic...
coffeescript
chosen
[ { "from": "system", "value": "Support setting currency with a number\n" }, { "from": "human", "value": "class Skr.Components.Currency extends Lanes.React.Component\n\n getDefaultProps: ->\n amount: _.bigDecimal('0.0')\n symbol: '$'\n\n propTypes:\n amount: React.PropTy...
coffeescript
chosen
[ { "from": "system", "value": "Increase the delay for sending buffer updates to analysis server\n\n300MS + 250MS = 550MS, with a maximum 1s wait time.\n" }, { "from": "human", "value": "Utils = require './utils'\n{CompositeDisposable} = require 'atom'\n\nmodule.exports =\nclass BufferUpdateCompon...
coffeescript
chosen
[ { "from": "system", "value": "Add a classname attribute and refactor progress bar\n" }, { "from": "human", "value": "###\n@todo Add a circular progress variant\n###\n\nrequire './style'\n\nmodule.exports = React.createClass\n\n # -- Properties\n propTypes:\n buffer : React.PropTypes....
coffeescript
chosen
[ { "from": "system", "value": "Enable using regex as filter.\n" }, { "from": "human", "value": "minimatch = require 'minimatch'\n\nmodule.exports =\n class Filters\n @firstElementFilter: (value, i) ->\n i == 0\n\n @fieldMatchFilter: (filter, value) ->\n for k, v of filter\n ...
coffeescript
chosen
[ { "from": "system", "value": "Enable display on the RPi\n" }, { "from": "human", "value": "\nconfig = require './config'\napi = require './api'\ncapture = require './capture'\ndisplay = require './display'\n\n# Set the interval for the operations\ninterval = 1000\n\nbusy = false\ndevice_url = nu...
coffeescript
chosen
[ { "from": "system", "value": "Fix stdin probing on Linux\n\nFixes #54\n\nSince linux doesn't throw EAGAIN when stdin is not ready,\nwe can instead probe to see if stdin is a not a tty (has a pipe).\nWhen there is nothing on stdin and no files are given, print the\nusage instructions.\n" }, { "from":...
coffeescript
chosen
[ { "from": "system", "value": "Use More Sensible Default for Choice Reqs\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...
coffeescript
chosen
[ { "from": "system", "value": "Set spec type after all specs in the category are required\n" }, { "from": "human", "value": "require 'window'\n\nmeasure 'spec suite require time', ->\n fsUtils = require 'fs-utils'\n path = require 'path'\n require 'spec-helper'\n\n requireSpecs = (directoryPa...
coffeescript
chosen
[ { "from": "system", "value": "Improve weapon position player clone\n" }, { "from": "human", "value": "Crafty.c 'PlayerClone',\n init: ->\n @requires 'Enemy, playerShip'\n\n playerClone: (attr = {}) ->\n @attr _.defaults(attr, h: 45, w: 71, health: 900)\n @origin 'center'\n @flipX()...
coffeescript
chosen
[ { "from": "system", "value": "Support SEC_EDGAR_URL env var in getAddress()\n" }, { "from": "human", "value": "{DOMParser} = require 'xmldom'\nxpath = require 'xpath'\nrequest = require 'request'\n\nmodule.exports =\n getAddress: (company, callback) ->\n url = \"http://www.sec.gov/cgi-bin/br...
coffeescript
chosen
[ { "from": "system", "value": "Fix default values for tablength and line length\n" }, { "from": "human", "value": "'.source.rust':\n 'editor':\n 'commentStart': '// '\n 'increaseIndentPattern': '(?x)\n ^ .* \\\\{ [^}\"\\']* $\n |^ .* \\\\( [^\\\\)\"\\']* $\n |^ \\\\s* \\\\{...
coffeescript
chosen
[ { "from": "system", "value": "Add freeOnly to static mock\n" }, { "from": "human", "value": "props = \n permissions: []\n anonymous: true\n preferredLanguage: 'en'\n \nexports.serverConfig =\n codeNinja: false\n static: true\n\nexports.features = \n playViewsOnly: false\n\nexports.me =\n ...
coffeescript
chosen
[ { "from": "system", "value": "Make Emmet work in .php and .phtml files too" }, { "from": "human", "value": "# language-specific Tab triggers\n# you can add more triggers by changing `grammar` attribute values\n'atom-text-editor[data-grammar=\"text html basic\"]:not([mini]), atom-text-editor[data...
coffeescript
chosen
[ { "from": "system", "value": "Add brackets to increase code legibility\n" }, { "from": "human", "value": "child_process = require \"child_process\"\n\nmodule.exports =\n run: (path, args) ->\n # TODO: Add support killing the process.\n proc = child_process.exec(path + \" \" + args.join \"...
coffeescript
chosen
[ { "from": "system", "value": "Make map input placeholder message useful\n" }, { "from": "human", "value": "Darkswarm.directive 'mapSearch', ($timeout)->\n # Install a basic search field in a map\n restrict: 'E'\n require: '^googleMap'\n replace: true\n template: '<input id=\"pac-input\"></i...
coffeescript
chosen
[ { "from": "system", "value": "Remove call to deleted function\n" }, { "from": "human", "value": "app = require 'app'\nChildProcess = require 'child_process'\nfs = require 'fs'\npath = require 'path'\n\nupdateDotExe = path.resolve(path.dirname(process.execPath), '..', 'Update.exe')\nexeName = pat...
coffeescript
chosen
[ { "from": "system", "value": "Load performance store and use options for learning guide\n" }, { "from": "human", "value": "React = require 'react'\n\nLearningGuide = require '../flux/learning-guide'\nLoadableItem = require './loadable-item'\nTeacher = require './learning-guide/teacher'\nStudent ...
coffeescript
chosen
[ { "from": "system", "value": "AcceptedInvitationsView: Use noItemFoundText instead of noItemFoundWidget\n" }, { "from": "human", "value": "kd = require 'kd'\nKDCustomHTMLView = kd.CustomHTMLView\nPendingInvitationsView = require './pendinginvitationsview'\n\n\nmodule.ex...
coffeescript
chosen
[ { "from": "system", "value": "Use simple hash as magic ZOG cookie\n" }, { "from": "human", "value": "###\nRunning copy of myself in background\n###\n\n# Magic cookie\nmagic =\n \"<#{PACKAGE.version}>\"\n\nfind = (cmd)->\n require('./zogi')[cmd]\n\n# Run background process\nmodule.exports =\nex...
coffeescript
chosen
[ { "from": "system", "value": "Check for a volumes object.\n" }, { "from": "human", "value": "define ['angular', 'lodash', 'timeSeries', 'volume'], (ng, _) ->\n imageSequence = ng.module('qiprofile.imagesequence',\n ['qiprofile.timeseries', 'qiprofile.volume'])\n \n ...
coffeescript
chosen
[ { "from": "system", "value": "Add backwards compatibility to semantic URLs for events\nAssume that if title_id is invalid then it is a deprecated event_id URL\n" }, { "from": "human", "value": "parse_pararms = (querystring) ->\n params = {}\n querystring = querystring.split('&')\n for qs in q...
coffeescript
chosen
[ { "from": "system", "value": "KlientEventManager: Add unsubscribe and return promise.\n" }, { "from": "human", "value": "kd = require 'kd'\n\n###*\n * The KlientEventManager is a wrapper over Klient events (from\n * `client.Subscribe`) that have repeating callbacks. It serves to\n * provide a cl...
coffeescript
chosen
[ { "from": "system", "value": "Remove proxy_to_reflection middleware to test serving Force directly\n" }, { "from": "human", "value": "_ = require 'underscore'\n{ APP_URL, REFERRER, MEDIUM, SESSION_ID } = require('sharify').data\nBackbone = require 'backbone'\nCookies = require '../../../../compo...
coffeescript
chosen
[ { "from": "system", "value": "Allow null for app.ValidationError prop.\n" }, { "from": "human", "value": "goog.provide 'app.ValidationError'\n\nclass app.ValidationError\n\n ###*\n @param {string} prop\n @param {string} message\n @constructor\n ###\n constructor: (@prop, @message) ->...
coffeescript
chosen
[ { "from": "system", "value": "Remove useless (and missing) require\n" }, { "from": "human", "value": "#\nReact = require 'react'\nassign = require 'object-assign'\n\nexcludeMethods =\n componentDidMount: true,\n componentWillUnmount: true,\n componentDidUpdate: true,\n included: true\n\nclas...
coffeescript
chosen
[ { "from": "system", "value": "Fix for analytics hooks specs\n" }, { "from": "human", "value": "#\n# A simple meditor specifically for providing custom analytics hooks in app code,\n# leaving the tracking code inside /analytics.\n#\n\n_ = require 'underscore'\nBackbone = require 'backbone'\nmodul...
coffeescript
chosen
[ { "from": "system", "value": "Fix tabs script to work with new AdminLTE template\n" }, { "from": "human", "value": "show_tab = ->\n if location.hash.match(/^#tab-/)\n $(\".nav-tabs a[href=##{location.hash.replace('#tab-', '')}]\").tab('show')\n\nshow_default_tab = ->\n if $('.nav-tabs').len...
coffeescript
chosen
[ { "from": "system", "value": "Support for aliases that are folders of packages\n\nIt is possible to require a file that is path of a package that is installed via npm like\r\nrequire(\"jade/lib/filters\")\r\nthis patch should make that possible." }, { "from": "human", "value": "path = require 'p...
coffeescript
chosen
[ { "from": "system", "value": "Fix unknown props on MiniCourseButton\n" }, { "from": "human", "value": "React = require 'react'\nMiniCourse = require '../lib/mini-course'\n\nmodule.exports = React.createClass\n displayName: 'MiniCourseButton'\n \n getDefaultProps: ->\n user: null\n proje...
coffeescript
chosen
[ { "from": "system", "value": "Fix for empty resonses from API\n\nDoes not throw an error if response from TrafficSituation\ndoes not include ResponseData attribute\n" }, { "from": "human", "value": "\nBase = require './Base'\n\nclass TrafficSituation extends Base\n constructor: (config) ->\n ...
coffeescript
chosen
[ { "from": "system", "value": "Add `:` support for 1.9 syntax\n\nFixes adrianlee44/atom-aligner#16\n" }, { "from": "human", "value": "module.exports =\n selector: ['.source.ruby', '.source.ruby.rails']\n id: 'aligner-ruby' # package name\n config:\n '=>-alignment':\n title: 'Padding fo...
coffeescript
chosen
[ { "from": "system", "value": "FIX: Correct error in inbox when null task\n\nAn error was being raised as a result of the task being null\nwhen accessing the grade and quality star data.\n" }, { "from": "human", "value": "angular.module('doubtfire.projects.states.dashboard.directives.task-dashboa...
coffeescript
chosen
[ { "from": "system", "value": "Fix non-exiting on clean win32 error, improve efficiency\n" }, { "from": "human", "value": "{ attemptShell, isBinaryExecutable } = require './utils'\nlogger = require './logger'\nstyler = require './styler'\n_ = require 'lodash'\n\n@clean = ({ recursive = no, deep =...
coffeescript
chosen
[ { "from": "system", "value": "Store routing table hash in model\n" }, { "from": "human", "value": "surveyor = require './lib/surveyor.coffee'\nwebsocket = require './lib/websocket.coffee'\nwebserver = require './lib/webserver.coffee'\nwebserver.listen 4001\nutil = require './lib/util.coffee'\n\n...
coffeescript
chosen
[ { "from": "system", "value": "Call function returned from _.template\n" }, { "from": "human", "value": "fs = require 'fs'\npath = require 'path'\ntemp = require 'temp'\n_ = require 'underscore'\n\ntemp.track()\n\nmodule.exports = (grunt) ->\n grunt.registerTask 'create-windows-installer', 'Crea...
coffeescript
chosen
[ { "from": "system", "value": "Add language-sca to atom package list\n" }, { "from": "human", "value": "packages: [\n \"advanced-open-file\"\n \"atom-alignment\"\n \"auto-update-packages\"\n \"docblockr\"\n \"editorconfig\"\n \"emmet\"\n \"expand-region\"\n \"language-apache\"\n \"langua...
coffeescript
chosen
[ { "from": "system", "value": "Add callback to get all\n" }, { "from": "human", "value": "DB = require './db'\nProject = require './project'\n\nmodule.exports =\nclass Projects\n properties:\n _id: null\n title: null\n icon: null\n paths: []\n settings: {}\n group: null\n de...
coffeescript
chosen
[ { "from": "system", "value": "Fix key handling so it registers its handler\n" }, { "from": "human", "value": "_ = require 'lodash'\ndirection = require 'rl-directions'\n\nbindings = require '../key-bindings.json'\n\neventBus = require './event-bus'\n\nmodule.exports = exports = ->\n\teventBus.on...
coffeescript
chosen
[ { "from": "system", "value": "Add tests for the user factory\n" }, { "from": "human", "value": "describe 'User factory', ->\n scope = undefined\n __User__ = undefined\n httpBackend = undefined\n\n beforeEach ->\n module 'trackaKeepa'\n inject ($httpBackend, User, $rootScope) ->\n ...
coffeescript
chosen
[ { "from": "system", "value": "Clean up hideMarker on removal\n" }, { "from": "human", "value": "Crafty.c 'Enemy',\n init: ->\n @requires '2D, Canvas, Collision, Choreography, ViewportFixed'\n\n enemy: ->\n Crafty.trigger('EnemySpawned', this)\n @onHit 'Bullet', (e) ->\n return if...
coffeescript
chosen
[ { "from": "system", "value": "Normalize all the line endings\n" }, { "from": "human", "value": "# I realize polluting body with .code-links-{ctrl,alt} is not ideal, but I don't\n# see a better solution. I couldn't extract which key is being pressed in the\n# event handler to match against the co...
coffeescript
chosen
[ { "from": "system", "value": ":arrow_up: Update minimal minimap version to 4.x\n" }, { "from": "human", "value": "MinimapSelectionView = require './minimap-selection-view'\n\nmodule.exports =\n\n active: false\n views: {}\n\n activate: (state) ->\n try\n atom.packages.activatePackage(...
coffeescript
chosen
[ { "from": "system", "value": "Add generic highlighting for RUNOFF control-lines\n" }, { "from": "human", "value": "name: \"RUNOFF\"\nscopeName: \"text.runoff\"\nfileTypes: [\n\t\"rnb\"\n\t\"rnc\"\n\t\"rnd\"\n\t\"rne\"\n\t\"rnh\"\n\t\"rnl\"\n\t\"rnm\"\n\t\"rno\"\n\t\"rnp\"\n\t\"rns\"\n\t\"rnt\"\n...
coffeescript
chosen
[ { "from": "system", "value": "Add show prop (needed for updated RB)\n" }, { "from": "human", "value": "React = require 'react'\nBS = require 'react-bootstrap'\n_ = require 'underscore'\n\n{ExerciseStore} = require 'stores/exercise'\n\n\nPublishedModal = React.createClass\n getInitialState: -> {...
coffeescript
chosen
[ { "from": "system", "value": "Use cozydb plugin for americano\n" }, { "from": "human", "value": "americano = require 'americano'\nfs = require 'fs'\npath = require 'path'\n\nclientPath = path.resolve(__dirname, '..', 'client', 'public')\nuseBuildView = fs.existsSync path.resolve(__...
coffeescript
chosen
[ { "from": "system", "value": "Use coffee feature to pass the context\n" }, { "from": "human", "value": "class Calculator\n presetNames: ['full', 'half', 'noSalad']\n weekdays: ['mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun']\n\n weekTotalFor: (preset, target) ->\n total = 0\n\n week = ...
coffeescript
chosen
[ { "from": "system", "value": "Set type to log for console.log forwarding\n" }, { "from": "human", "value": "eval(\"window = {};\")\neval(\"attachEvent = function(){};\")\neval(\"console = {};\")\nconsole.warn = ->\n self.postMessage\n type: 'warn'\n details: arguments\nconsole.log = ->\n ...
coffeescript
chosen
[ { "from": "system", "value": "Move module require to top\n" }, { "from": "human", "value": "_ = require 'underscore-plus'\noptimist = require 'optimist'\nrequest = require 'request'\n\nView = require './view'\nconfig = require './config'\ntree = require './tree'\n\nmodule.exports =\nclass Docs e...
coffeescript
chosen
[ { "from": "system", "value": "Add the 'Reveal in Tree View' context menu to the file tab.\n" }, { "from": "human", "value": "'menu': [\n {\n 'label': 'View'\n 'submenu': [\n { 'label': 'Toggle Tree View', 'command': 'tree-view:toggle' }\n { 'label': 'Toggle Tree Side', 'command'...
coffeescript
chosen
[ { "from": "system", "value": "Set user as away when app goes to background and online when back to foreground\n" }, { "from": "human", "value": "if Meteor.isCordova\n\tdocument.addEventListener 'pause', ->\n\t\tMeteor.disconnect()\n\n\tdocument.addEventListener 'resume', ->\n\t\tMeteor.reconnect...
coffeescript
chosen
[ { "from": "system", "value": "Support OSX for Chrome extension build\n" }, { "from": "human", "value": "module.exports = ->\n @loadNpmTasks 'grunt-shell'\n\n # Find Chrome binary here...\n\n @config 'shell',\n 'chrome-extension':\n command: 'google-chrome ' + [\n '--pack-extens...
coffeescript
chosen
[ { "from": "system", "value": "Simplify by using coffeescript syntax.\n" }, { "from": "human", "value": "Backbone.Factlink ||= {}\n\nclass Backbone.Factlink.CrossFadeRegion extends Backbone.Marionette.Region\n\n defaultFadeTime = 560\n\n initialize: -> @on 'close', -> @$el?.stop()\n\n crossFad...
coffeescript
chosen
[ { "from": "system", "value": "Fix language loading from cordova\n" }, { "from": "human", "value": "# Adding CORS headers so we can use CDNs for static content\n\nWebApp.rawConnectHandlers.use (req, res, next) ->\n\tres.setHeader(\"Access-Control-Allow-Origin\", \"*\")\n\tres.setHeader(\"X-Rocket...
coffeescript
chosen
[ { "from": "system", "value": "Make sure tests are always run without any preexisting tokens from the environment\n" }, { "from": "human", "value": "_ = require('lodash')\n\nIS_BROWSER = window?\n\n{ fetchMock, mockedFetch } = require('resin-fetch-mock')\n\ndataDirectoryPath = null\nif not IS_BRO...
coffeescript
chosen
[ { "from": "system", "value": "Add optional prefix to globals\n" }, { "from": "human", "value": "###\nInject some [pseudo-]local variables\n###\nfs = require 'fs'\npath = require 'path'\nini = require '../package'\n\nfor f of ini.devDependencies when /^[$\\w]+$/.test f\n exports[f] = f\n\nfor li...
coffeescript
chosen
[ { "from": "system", "value": "Update deprecated selectors in keymap\n" }, { "from": "human", "value": "'.platform-darwin .editor':\n 'cmd-:': 'spell-check:correct-misspelling'\n\n'.platform-darwin .corrections .editor':\n 'cmd-:': 'core:cancel'\n\n'.platform-win32 .editor':\n 'ctrl-:': 'spell...
coffeescript
chosen
[ { "from": "system", "value": "Create helper to buffer process lines\n" }, { "from": "human", "value": "Point = require 'point'\nChildProcess = nodeRequire 'child_process'\n$ = require 'jquery'\n\nmodule.exports =\nclass TagGenerator\n constructor: (@path) ->\n\n parseTagLine: (line) ->\n se...
coffeescript
chosen
[ { "from": "system", "value": "Implement <p> tags in activity summaries\n" }, { "from": "human", "value": "ACTIVITIES =\n TW:\n action: 'lähetti Tweetin'\n icon: 'twitter'\n FB:\n action: 'teki Facebook-päivityksen'\n icon: 'facebook'\n ST:\n action: 'k...
coffeescript
chosen
[ { "from": "system", "value": "Use spacepen's outlet to append to the output div\n" }, { "from": "human", "value": "{ScrollView, BufferedProcess} = require 'atom'\n\n# Runs a portion of a script through an interpreter and displays it line by line\n\nmodule.exports =\nclass ScriptView extends Scro...
coffeescript
chosen
[ { "from": "system", "value": "Add q param to allowed url parts.\n" }, { "from": "human", "value": "# For more information see: http://emberjs.com/guides/routing/\n\n@Wheelmap.Router.map ()->\n @resource 'index', path: '/', queryParams: ['lat', 'lon', 'zoom', 'node_id', 'status']\n\n# index rout...
coffeescript
chosen
[ { "from": "system", "value": "Use steroids.nativeBridge.nativeCall instead of supers nativecall\n" }, { "from": "human", "value": "class Screen extends NativeObject\n freeze: (options={}, callbacks={})->\n @nativeCall\n method: \"freeze\"\n parameters: options\n successCallbac...
coffeescript
chosen
[ { "from": "system", "value": "Rename internal Base58 class to Base58Builder\n" }, { "from": "human", "value": "class Base58\n constructor: ->\n @alphabet = \"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ\"\n @base = @alphabet.length\n\n encode: (num) ->\n throw new Error(...
coffeescript
chosen
[ { "from": "system", "value": "Use atom.getActivePackages() API for package names\n" }, { "from": "human", "value": "_ = require 'underscore'\n\nmodule.exports =\n class Collector\n constructor: ->\n @sessionId = new Date().getTime()\n\n # Private\n getPath: ->\n global.projec...
coffeescript
chosen
[ { "from": "system", "value": "Verify that vtexjs.checkout.orderForm object is created\n" }, { "from": "human", "value": "expect = chai.expect\nmocha.setup 'bdd'\n\ndescribe 'VTEX JS Checkout Module', ->\n\n before ->\n $.mockjax\n url: mock.API_URL\n responseText: mock.orderform.em...
coffeescript
chosen
[ { "from": "system", "value": "Initialize moment to english or swedish\n\nFixes #104\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 ...
coffeescript
chosen
[ { "from": "system", "value": "Implement exit codes != 0\n\nFor more details: https://groups.google.com/forum/#!topic/nodejs/zF7GEoPccqw\n" }, { "from": "human", "value": "coffee = require 'gulp-coffee'\ngulp = require 'gulp'\ngutil = require 'gulp-util'\nmocha = require 'gulp-mocha'\nrimraf = re...
coffeescript
chosen
[ { "from": "system", "value": "Use absolute root path for opts.config.root\n" }, { "from": "human", "value": "# Load all requirements.\ngulp = require 'gulp'\nGulpTaskLoader = require 'gulp-task-loader'\nrequire 'require-yaml'\n\n# Load configuration.\nconfig = require './config.yml'\n\n# Configu...
coffeescript
chosen
[ { "from": "system", "value": "Send pending find mistakes metric to graphite\n" }, { "from": "human", "value": "import {mongoCallbacksCount} from '../mongo/MongooseCallbackManager'\nimport {GROUPS} from '../../client/lib/informaticsGroups'\nimport {START_SUBMITS_DATE} from '../api/dashboard'\nimp...
coffeescript
chosen
[ { "from": "system", "value": "Rename the `caller` command `to-caller`.\n" }, { "from": "human", "value": "EnterDialog = require './enter-dialog'\n{Stacktrace} = require './stacktrace'\n{StacktraceView} = require './stacktrace-view'\n{NavigationView} = require './navigation-view'\neditorDecorator...
coffeescript
chosen
[ { "from": "system", "value": "Add failing test to verify Travis works.\n" }, { "from": "human", "value": "# spec/javascripts/foobar_spec.js.coffee\ndescribe \"foobar\", ->\n it 'works', -> expect(1 + 1).toEqual(2);\n" }, { "from": "gpt", "value": "# spec/javascripts/foobar_spec.js.c...
coffeescript
chosen
[ { "from": "system", "value": "Remove items from the CKEDITOR toolbar\n\n[Finishes #61435398]\n" }, { "from": "human", "value": "window.Tahi ||= {}\n\nclass Tahi.RichEditableElement\n constructor: (@element) ->\n @instance = CKEDITOR.inline @element,\n extraPlugins: 'sharedspace'\n ...
coffeescript
chosen
[ { "from": "system", "value": "Call updateColorPreview in Labels constructor\n" }, { "from": "human", "value": "class Labels\n constructor: ->\n form = $('.label-form')\n @setupLabelForm(form)\n @cleanBinding()\n @addBinding()\n @updateColorPreview\n\n addBinding: ->\n $(docum...
coffeescript
chosen
[ { "from": "system", "value": "Support preview toggle when focus is on editor" }, { "from": "human", "value": "'.workspace':\n 'ctrl-M': 'markdown-preview:toggle'\n\n'.platform-darwin .markdown-preview':\n 'cmd-+': 'markdown-preview:zoom-in'\n 'cmd-=': 'markdown-preview:zoom-in'\n 'cmd--': 'm...
coffeescript
chosen