conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "human", "value": "Implement helper method for XML escaping\n" }, { "from": "gpt", "value": "escapeXMLCharacter = (c) ->\n\t'&' + { '&': 'amp', '<': 'lt', '>': 'gt', \"'\": 'apos', '\"': 'quot'}[c] + ';'\n\nescapeXML = (s) ->\n s.replace(/([&<>'\"])/g, escapeXMLCharacter)\n\nmodule.ex...
coffeescript
chosen
[ { "from": "human", "value": "Use `show me issues for <user/repo>` to list open issues (Github)\n\nYou need to set the following variables:\n HUBOT_GITHUB_TOKEN = <oauth token>\n HUBOT_GITHUB_USER = <user name>\n\nHUBOT_GITHUB_USER is optional, but if you set it, you can ask `show\nme issues for hubot` i...
coffeescript
chosen
[ { "from": "human", "value": "Add custom html view tests\n" }, { "from": "gpt", "value": "should = require 'should'\nKDCustomHTMLView = require '../../lib/core/customhtmlview'\n\n\ndescribe 'KDCustomHTMLView', ->\n it 'exists', ->\n KDCustomHTMLView.should.exist\n\n describe 'constructor', -...
coffeescript
chosen
[ { "from": "human", "value": "Hide adjustments in cart by default, show by click\n" }, { "from": "gpt", "value": "$(document).ready ->\n $('#cart_adjustments').hide()\n\n $('th.cart-adjustment-header').html('<a href=\"#\">Order Adjustments...</a>')\n $('th.cart-adjustment-header a').click ->\n...
coffeescript
chosen
[ { "from": "system", "value": "Fix calling showItemInFolder in renderer\n\nThe remote method always assumes the existence of the remote object but\ndoesn't keep a reference to it, so if we only keep the reference of a\nremote method we will get into troubles once the remote object is\ngarbage collected.\n\nW...
coffeescript
chosen
[ { "from": "system", "value": "Allow sending messages to non-whitelisted devices by default\n" }, { "from": "human", "value": "util = require \"./util\"\nbcrypt = require \"bcrypt\"\n_ = require \"lodash\"\n\ncheckLists = (fromDevice, toDevice, whitelist, blacklist, openByDefault) ->\n return fa...
coffeescript
chosen
[ { "from": "system", "value": "Decrease the callback priority of highlight words" }, { "from": "human", "value": "###\n# Hilights is a named function that will process Highlights\n# @param {Object} message - The message object\n###\n\nclass HighlightWordsClient\n constructor: (message) ->\n m...
coffeescript
chosen
[ { "from": "human", "value": "Add unit tests for presigned URLs\n" }, { "from": "gpt", "value": "helpers = require('../helpers')\nAWS = helpers.AWS\n\ndescribe 'AWS.Signers.Presign', ->\n it 'presigns requests', ->\n spyOn(AWS.util.date, 'getDate').andReturn(new Date(0))\n resultUrl = 'htt...
coffeescript
chosen
[ { "from": "human", "value": "Add specs for grammar overrides\n" }, { "from": "gpt", "value": "GrammarRegistry = require '../lib/grammar-registry'\n\ndescribe \"GrammarRegistry\", ->\n describe \"grammar overrides\", ->\n it \"stores the override scope name for a path\", ->\n registry = ...
coffeescript
chosen
[ { "from": "human", "value": "Add -> tests for common utils.\n" }, { "from": "gpt", "value": "debug = require('debug')('spec:common-utils')\n_ = require 'underscore'\n_.mixin require 'underscore-mixins'\n{CommonUtils} = require '../lib'\n{ExtendedLogger} = require 'sphere-node-utils'\npackage_jso...
coffeescript
chosen
[ { "from": "system", "value": "Set default metadata and pagination hashes.\n" }, { "from": "human", "value": "#= require_self\n#= require_tree .\n\nDotLedger.module 'Collections', ->\n class @Base extends Backbone.Collection\n parse: (response, options)->\n @_fetch_options_data = options...
coffeescript
chosen
[ { "from": "human", "value": "Add tests that changelog loads\n" }, { "from": "gpt", "value": "j.describe \"changelog\", ->\n j.it \"should have correct twitter\", ->\n @expect(CI.outer.changelog.twitter(\"pbiggar\")).toEqual \"https://twitter.com/pbiggar\"\n @expect(CI.outer.changelog.twit...
coffeescript
chosen
[ { "from": "human", "value": "Add `Processor` for creating DZIs\n" }, { "from": "gpt", "value": "DeepZoomImage = require 'deepzoomtools'\npath = require 'path'\n\n\n# Defaults\nDEFAULT_TILE_SIZE = 254\nDEFAULT_TILE_OVERLAP = 1\nDEFAULT_FORMAT = 'jpg'\n\n\n# Public API\nmodule.exports = class Proc...
coffeescript
chosen
[ { "from": "human", "value": "Include fuzzy search lib from old repo\n" }, { "from": "gpt", "value": "define [\"underscore\"], (_) ->\n class FuzzySearch\n WEIGHT_SEPARATOR_REGEX = /(\\_|\\-|\\.)/gi\n\n match: (search, text) ->\n chars = _splitChars search\n\n # Escape non alphan...
coffeescript
chosen
[ { "from": "human", "value": "Fix file inputs not displaying selected file name\n" }, { "from": "gpt", "value": "# Overwrites text with filename for BS4 custom-file fields in\n# app/views/forms/[horizontal|vertical]/_file_field.html.haml\n# when files are selected.\n$(document)\n .on(\"change\",...
coffeescript
chosen
[ { "from": "human", "value": "Add some helper methods for classes\n" }, { "from": "gpt", "value": "kopi.module(\"kopi.utils.klass\")\n .require(\"kopi.exceptions\")\n .require(\"kopi.utils\")\n .define (exports, exceptions, utils) ->\n\n extend = (klass, mixin) ->\n for name, method of...
coffeescript
chosen
[ { "from": "system", "value": "Throw error when starting terminated process\n" }, { "from": "human", "value": "_ = require 'underscore'\nchild_process = require 'child_process'\nEventEmitter = require 'event-emitter'\n\nmodule.exports =\nclass Task\n callback: null\n\n constructor: (taskPath) -...
coffeescript
chosen
[ { "from": "human", "value": "Implement refactored zoom component using Modalize\n" }, { "from": "gpt", "value": "modalize = require '../modalize/index.coffee'\n\nmodule.exports = (src) ->\n (img = new Image).src = src\n\n $img = $(\"<img src='#{src}'>\")\n\n modal = modalize render: -> $el: $...
coffeescript
chosen
[ { "from": "system", "value": "Improve logging when Cozy instance goes down\n" }, { "from": "human", "value": "async = require 'async'\nAccount = require '../models/account'\n\nCozyInstance = require '../models/cozy_instance'\n\nfixtures = require 'cozy-fixtures'\n\nmodule.exports.main = (req, re...
coffeescript
chosen
[ { "from": "system", "value": "Add token to request when available\n" }, { "from": "human", "value": "$ = require 'jquery'\n{$$} = require 'space-pen'\n\nmodule.exports =\nclass Gists\n @activate: -> new Gists\n\n constructor: ->\n rootView.command 'gist:create', '.editor', => @createGist()\...
coffeescript
chosen
[ { "from": "human", "value": "Test two step help component/mixin\n" }, { "from": "gpt", "value": "{Testing, expect, sinon, _, React} = require 'test/helpers'\n\nTwoStepHelpMixin = require 'components/exercise/two-step-help-mixin'\nNetworking = require 'model/networking'\n\n\nTestComponent = React...
coffeescript
chosen
[ { "from": "human", "value": "Create team table to display lifetime team standings for a league\n" }, { "from": "gpt", "value": "{div, table, thead, tbody, tr, th, td} = React.DOM\n\ntable_headers = [\n\t\"Team\"\n\t\"Win %\"\n\t\"Wins\"\n\t\"Losses\"\n\t\"Ties\"\n]\n\n@TeamTable = React.createCl...
coffeescript
chosen
[ { "from": "human", "value": "Add a simple way to show/hide elements containing contextual options for an input.\n" }, { "from": "gpt", "value": "# Set an element to display for any input(e.g. select) depending on its value.\n# Typically, this element would contain some options, but it could be\n...
coffeescript
chosen
[ { "from": "human", "value": "Add an experimental resource-bound auto-saving input" }, { "from": "gpt", "value": "React = require 'react'\nChangeListener = require './change-listener'\nhandleInputChange = require '../lib/handle-input-change'\n\nmodule.exports = React.createClass\n displayName: '...
coffeescript
chosen
[ { "from": "human", "value": "Add env and it's related test.\n" }, { "from": "gpt", "value": "# Tests configuration.\n#\n# Author: Andy Zhao(andy@nodeswork.com)\n\nconfig = require 'coffiew/config'\n\ndescribe 'Config', ->\n\n describe 'env', ->\n\n it 'should run in nodes', ->\n config....
coffeescript
chosen
[ { "from": "human", "value": "Package server API file w/header\n" }, { "from": "gpt", "value": "# ______ ______ ______ __ __ ______ __ ______\n# /\\__ _\\ /\\ == \\ /\\ __ \\ /\\ \"-.\\ \\ /\\___ \\ /\\ \\ /\\__ _\\\n# \\/_/\\ \\/ \\ \\ __< \\ \\ __ ...
coffeescript
chosen
[ { "from": "human", "value": "Add menu item to toggle\n\nThis is helpful when things are going really wrong keybinding-wise\n" }, { "from": "gpt", "value": "'menu': [\n {\n 'label': 'Packages'\n 'submenu': [\n 'label': 'Keybinding Resolver'\n 'submenu': [\n { 'label': 'Tog...
coffeescript
chosen
[ { "from": "system", "value": "Fix viewing repo after viewing all repos on safari\n\nWhen transitioning from recent route to a specific repo deactivate is\nnot called for some reason on Safari. It seems like a bug in Ember.js,\nbut I need to investigate more.\n\nA solution is to also try to remove observer i...
coffeescript
chosen
[ { "from": "human", "value": "Create method to load locale from private\n" }, { "from": "gpt", "value": "Meteor.methods\n\tloadLocale: (locale) ->\n\t\tconsole.log \"[method] loadLocale: #{locale}\".green\n\t\ttry\n\t\t\treturn Assets.getText \"moment-locales/#{locale.toLowerCase()}.js\"\n\t\tcat...
coffeescript
chosen
[ { "from": "human", "value": "Add attempt at keep alive.\n" }, { "from": "gpt", "value": "# Description:\n# Utility commands surrounding Hubot uptime.\n#\n# Commands:\n# hubot stay alive - Try keep hubot alive\n\nstayingalive = false\n\nmodule.exports = (robot) ->\n robot.respond /(stay aliv...
coffeescript
chosen
[ { "from": "system", "value": "Use shift in the example rather than explaining the difference" }, { "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\...
coffeescript
chosen
[ { "from": "human", "value": "Update the upvote arrows on ajax submit\n" }, { "from": "gpt", "value": "$(document).ready ->\n $(\".vote-form\").on 'ajax:success', (event, xhr, status) ->\n if xhr.vote_type_id == 1\n $(this).find('.upvote').addClass('vote-active')\n else if xhr.vote_ty...
coffeescript
chosen
[ { "from": "human", "value": ":new: Add a spec about ignoredMessageTypes config\n" }, { "from": "gpt", "value": "describe 'Linter Config', ->\n linter = null\n beforeEach ->\n waitsForPromise ->\n atom.packages.activatePackage('linter').then ->\n linter = atom.packages.getActiveP...
coffeescript
chosen
[ { "from": "human", "value": "Add script translate addresses in crash report into symbols.\n" }, { "from": "gpt", "value": "#!/usr/bin/env coffee\n# Usage:\n# Copy the crash log into pasteboard and then run\n# pbpaste | ./script/translate-crash-log-addresses.coffee\n\natos = (addresses, callback)...
coffeescript
chosen
[ { "from": "human", "value": "Copy over Coffee Cache from Atom\n" }, { "from": "gpt", "value": "crypto = require 'crypto'\npath = require 'path'\n\nCoffeeScript = require 'coffee-script'\nCSON = require 'season'\nfs = require 'fs-plus'\n\ncacheDir = path.join(fs.absolute('~/.atom'), 'compile-cach...
coffeescript
chosen
[ { "from": "system", "value": "Fix syntax error in on() method.\n\nLooks like this was a mistake in ec2999ef8c233d30c46dd5181e246916b0145606\n" }, { "from": "human", "value": "jQuery ->\n $('.locales a:first').tab('show')\n $('.accordion-body').on('hidden', ->\n $(@).prev().find('i')...
coffeescript
chosen
[ { "from": "human", "value": "Patch issue with dependency tracking in Chrome\n" }, { "from": "gpt", "value": "\n# Patch for this issue https://github.com/meteor/meteor/issues/4793\n# Found here: https://github.com/meteor/meteor/issues/4793#issuecomment-129930335\n#\n# Fixes issue with dependencie...
coffeescript
chosen
[ { "from": "human", "value": "Build GItHub API tags URL\n" }, { "from": "gpt", "value": "###\nGitHub API\n###\nexports.api = ->\n \"#{PACKAGE.homepage\n .replace /// // ///, '$&api.'\n .replace /// \\w/ ///, '$&repos/'\n }/tags?per_page=8\"\n" } ]
coffeescript
chosen
[ { "from": "human", "value": "Add projects definitions for atom\n" }, { "from": "gpt", "value": "[\n {\n title: \"Spyns\"\n group: \"Development\"\n paths: [\n \"~/Development/spyns\"\n ]\n }\n {\n title: \"CSI-702: Homework02 Instructor Attempt\"\n group: \"Mason Fall 2...
coffeescript
chosen
[ { "from": "system", "value": "Allow user to be passed in\n" }, { "from": "human", "value": "Backbone = require 'backbone'\nForm = require '../../form/index.coffee'\nCurrentUser = require '../../../models/current_user.coffee'\n\nmodule.exports = class ContactView extends Backbone.View\n classNam...
coffeescript
chosen
[ { "from": "human", "value": "Add script to look up postgres sql statements\n" }, { "from": "gpt", "value": "# Description:\n# Strip help information from the Postgres web documentation.\n# Example: hubot pgsql 9.0 select\n#\n# Dependencies:\n# None\n#\n# Configuration:\n# None\n#\n# Comm...
coffeescript
chosen
[ { "from": "system", "value": "Clean up Webhook parse method\n" }, { "from": "human", "value": "Collection = require './collection'\n\nclass Webhooks extends Collection\n\n model: require '../models/Webhook'\n\n url: \"#{ env.SINGULARITY_BASE }/#{ constants.apiBase }/webhooks\"\n\n parse...
coffeescript
chosen
[ { "from": "human", "value": ":construction: Add test stub for color project element\n" }, { "from": "gpt", "value": "\ndescribe 'ColorProjectElement', ->\n [pigments, project, projectElement] = []\n\n beforeEach ->\n jasmineContent = document.body.querySelector('#jasmine-content')\n\n wa...
coffeescript
chosen
[ { "from": "human", "value": "Test question component's model logic.\n" }, { "from": "gpt", "value": "module 'Unit: components/question'\n\ntest 'its model will come from its tasks questions by ident', ->\n q1 = Ember.Object.create(ident: \"foo\")\n q2 = Ember.Object.create(ident: \"bar\")\n t...
coffeescript
chosen
[ { "from": "human", "value": "Add a test for the comparison function c255lbigintcmp\n" }, { "from": "gpt", "value": "fs = require \"fs\"\n\nenv = do -> this\nenv.eval(fs.readFileSync(\"../curve255.js\").toString())\n\nstdout = process.stdout\nstderr = process.stderr\nwrite = (x) -> stdout.wri...
coffeescript
chosen
[ { "from": "human", "value": "Use simple JS menu to choose login portal. (missed one file in commit)\n\n[#66918404] Clarify login procedure\n\nhttps://www.pivotaltracker.com/story/show/66918404\n" }, { "from": "gpt", "value": "class LoginMenu\n constructor: (@trigger=$('.login_portal_widget_to...
coffeescript
chosen
[ { "from": "system", "value": "Add requestId as a top-level attribute of an active task" }, { "from": "human", "value": "Tasks = require './Tasks'\nTask = require '../models/Task'\n\nclass TasksActive extends Tasks\n\n model: Task\n\n url: \"#{ env.SINGULARITY_BASE }/#{ constants.apiBase }/...
coffeescript
chosen
[ { "from": "human", "value": "Add tests for the Letterclick app initializer.\n" }, { "from": "gpt", "value": "#= require test_helper\n\nsuite 'Letterclick', ->\n test 'exists in the global namespace', ->\n expect(Letterclick.Models).to.be.an 'object'\n\n test 'has namespaces', ->\n expect...
coffeescript
chosen
[ { "from": "human", "value": "Add preflight cors over spdy\n" }, { "from": "gpt", "value": "class PreflightCorsSpdyTest extends Test\n constructor: ->\n super\n @display_name = \"Preflight CORS over SPDY\"\n @url = \"https://corstest-api.coshx.com:4002\"\n\n run: ->\n [a, b] = super...
coffeescript
chosen
[ { "from": "human", "value": "Add missing spec for TypeError.\n" }, { "from": "gpt", "value": "{TypeError} = require('../../src/finitio/errors')\nshould = require('should')\n_ = require('underscore')\n\ndescribe \"TypeError\", ->\n\n error = new TypeError({\n context: \"{{x: Posint}}\"\n t...
coffeescript
chosen
[ { "from": "human", "value": "Add current version of infinite-scroll script\n" }, { "from": "gpt", "value": "angular.module('infinite-scroll', []).directive 'infiniteScroll', [->\n link: (scope, elem, attrs) ->\n $window = angular.element(window)\n $document = angular.element(document)\n...
coffeescript
chosen
[ { "from": "human", "value": "Add service skeleton for handling session state on client\n" }, { "from": "gpt", "value": "angular.module('kassa').service('SessionService',[\n '$http'\n '$q'\n ($http, $q)->\n currentUser = null\n\n setAuthenticated = (promise)-> promise.then (resp)-> curre...
coffeescript
chosen
[ { "from": "system", "value": "Use uniq to filter out dupes\n" }, { "from": "human", "value": "_ = require 'underscore'\nBackbone = require 'backbone'\n\nmodule.exports = class Params extends Backbone.Model\n urlWhitelist:[\n 'page'\n 'medium'\n 'color',\n 'price_range',\n 'width'...
coffeescript
chosen
[ { "from": "human", "value": "StacksV2: Define Stack View: base stack editing view. Currently supports to create new stack templates and update existings if provided\n" }, { "from": "gpt", "value": "kd = require 'kd'\n\nJView = require 'app/jview'\ncurryIn ...
coffeescript
chosen
[ { "from": "human", "value": "Add World Cup schedule and match scores\n" }, { "from": "gpt", "value": "# Description:\n# World Cup 2014 matches and scores\n#\n# Commands:\n# hubot world cup schedule - World Cup schedule for today\n# hubot world cup score - Match scores\n\nmodule.exports = (...
coffeescript
chosen
[ { "from": "human", "value": "Set background color on Paper edit screen\n" }, { "from": "gpt", "value": "ETahi.PaperEditView = Ember.View.extend\n setBackgroundColor:(->\n $('body').addClass('matte')\n ).on('didInsertElement')\n\n resetBackgroundColor:(->\n $('body').removeClass('matte')...
coffeescript
chosen
[ { "from": "human", "value": "Add spec to validate invalid executable error message\n" }, { "from": "gpt", "value": "#!/usr/bin/env coffee\n#\n# This spec file validates:\n# * The atom-linter method used by linter-mypy.\n# * Make sure that over time the behavior is as expected.\n#\n# If it f...
coffeescript
chosen
[ { "from": "system", "value": "Update mobile logic to use new buy flow if lab feature enabled\n" }, { "from": "human", "value": "Backbone = require 'backbone'\n{ acquireArtwork } = require('../../../../components/acquire/view.coffee')\n\nmodule.exports = class MetaDataView extends Backbone.View\n...
coffeescript
chosen
[ { "from": "human", "value": "Add test coverage for kickoff class\n" }, { "from": "gpt", "value": "chai = require('chai')\nsinon = require(\"sinon\")\nsinonChai = require(\"sinon-chai\")\n\nchai.should()\nchai.use(sinonChai)\n\nPioneer = require(\"../../lib/pion...
coffeescript
chosen
[ { "from": "system", "value": "Move main_form function definitions out of nesting\n" }, { "from": "human", "value": "if window.location.pathname.match(/\\/apply$/)\n $ ->\n\n changeSection = ->\n hash = window.location.hash\n sectionId = hash.substring 1\n $('.section').each ()...
coffeescript
chosen
[ { "from": "human", "value": "Add porojects, will need customizing\n" }, { "from": "gpt", "value": "[\n {\n title: \"Lloyd Flanagan Word Count\"\n group: \"Atom\"\n paths: [\n \"/home/aflanagan/Devel/atom/lloyd-flanagan-word-count\"\n ]\n devMode: true\n }\n {\n title: \...
coffeescript
chosen
[ { "from": "human", "value": ":new: Add a buffer modifying linter spec\n" }, { "from": "gpt", "value": "describe 'buffer modifying linters', ->\n getModuleMain = -> atom.packages.getActivePackage('linter').mainModule.instance\n beforeEach ->\n waitsForPromise ->\n atom.packages.activate...
coffeescript
chosen
[ { "from": "human", "value": "Split code for finding sales orders into component\n" }, { "from": "gpt", "value": "class Skr.Components.SalesOrderFinder extends Lanes.React.Component\n\n propTypes:\n onModelSet: React.PropTypes.func\n commands: React.PropTypes.object\n\n dataOb...
coffeescript
chosen
[ { "from": "system", "value": "Fix root url on server side\n" }, { "from": "human", "value": "RocketChat.settings.onload 'Site_Url', (key, value, initialLoad) ->\n\tif value?.trim() isnt ''\n\t\t__meteor_runtime_config__.ROOT_URL = value\n\t\tif Meteor.absoluteUrl.defaultOptions?.rootUrl?\n\t\t\t...
coffeescript
chosen
[ { "from": "human", "value": "Add key bindings for frequently used commands.\n" }, { "from": "gpt", "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 is a basic keyb...
coffeescript
chosen
[ { "from": "human", "value": ":new: Add linter indie API usage spec\n" }, { "from": "gpt", "value": "describe 'Linter Indie API', ->\n\n linter = null\n {wait} = require('./common')\n Remote = require('remote')\n\n beforeEach ->\n global.setTimeout = Remote.getGlobal('setTimeout')\n glo...
coffeescript
chosen
[ { "from": "system", "value": "Fix message sender pastie link\n" }, { "from": "human", "value": "class Kandan.Views.Chatbox extends Backbone.View\n\n template: JST['chatbox']\n tagName: 'div'\n className: 'chatbox'\n\n\n events:\n \"keypress .chat-input\": 'postMessageOnEnter'\n \"cl...
coffeescript
chosen
[ { "from": "human", "value": "Initialize user's area tokens field with data\n" }, { "from": "gpt", "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: ...
coffeescript
chosen
[ { "from": "human", "value": "Add Angular filter for wrapping words larger than N characters.\n" }, { "from": "gpt", "value": "define [\n\t\"base\"\n], (App) ->\n\tDEF_MIN_LENGTH = 20\n\n\t_getWrappedWordsString = (baseStr, wrapperElName, minLength) ->\n\t\tminLength = minLength || DEF_MIN_LENGTH...
coffeescript
chosen
[ { "from": "human", "value": "Add Settings model on client side\n" }, { "from": "gpt", "value": "module.exports = class Settings extends Backbone.Model\n urlRoot: 'settings'\n\n # Make sure that put requests doesn't add id to the url.\n sync: (method, model, options) ->\n options.ur...
coffeescript
chosen
[ { "from": "system", "value": "Allow changing of filename on a case insensitive fs\n\nCloses atom/atom#1359\n" }, { "from": "human", "value": "path = require 'path'\n\n{fs} = require 'atom'\n\nDialog = require './dialog'\n\nmodule.exports =\nclass MoveDialog extends Dialog\n constructor: (@initi...
coffeescript
chosen
[ { "from": "system", "value": "Use coccyx subview tear down helper\n" }, { "from": "human", "value": "ProjectMonitor.Views ||= {}\n\nclass ProjectMonitor.Views.HomeView extends Backbone.View\n tagName: \"ol\"\n className: \"projects\"\n template: JST[\"backbone/templates/home\"]\n\n initializ...
coffeescript
chosen
[ { "from": "system", "value": "Expand the \"Thanks Obama\" responses\n\nPick randomly from the 8 available pages on the thanks-obama site.\nThen pick a random image off that page.\n" }, { "from": "human", "value": "# Description\n# Blames Obama for everything that's bad in your life.\n#\n# Depe...
coffeescript
chosen
[ { "from": "system", "value": ":non-potable-water: Clear project paths after view is created\n\nThis array can be very large and there is no reason to hold onto\nit once it is passed on to the view.\n" }, { "from": "human", "value": "_ = require 'underscore'\n\nmodule.exports =\n projectPaths: n...
coffeescript
chosen
[ { "from": "system", "value": "Fix HousingForm DataTable column properties\n" }, { "from": "human", "value": "$ ->\n\n $('.housing-location-table').DataTable({\n dom: \"<'row-fluid'<'span6'l><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>\",\n pagingType: \"simple_numbers\",\n \"columnDe...
coffeescript
chosen
[ { "from": "human", "value": "Add the insert field coffeescript\n" }, { "from": "gpt", "value": "class window.TheMerger \n\n foobar: ->\n alert 'foo'\n\n insert_field: (body) ->\n alert body\n \n # start=$(\".mail_merge_body\").caret().start;\n # first_half=$(\".mail_merge_body\").val(...
coffeescript
chosen
[ { "from": "human", "value": "Add unit test for GET /CloudHealthCheck\n" }, { "from": "gpt", "value": "\"use strict\"\n\nrequest = require 'supertest'\nassert = require 'assert'\n\napp = req = null\n\nbefore ->\n app = module.parent.exports.app\n req = request(app)\n\ndescribe '/CloudHealt...
coffeescript
chosen
[ { "from": "system", "value": "Kill process when task is aborted\n" }, { "from": "human", "value": "_ = require 'underscore'\nBufferedProcess = require 'buffered-process'\n$ = require 'jquery'\n\nmodule.exports =\nclass LoadPathsTask\n aborted: false\n\n constructor: (@callback) ->\n\n start: ...
coffeescript
chosen
[ { "from": "system", "value": "Allow any comment about l[ou]lz\n" }, { "from": "human", "value": "# lulz - BRING THE LOLZ from bukk.it\n\nSelect = require(\"soupselect\").select\nHtmlParser = require \"htmlparser\"\nutil = require 'util'\n\nmodule.exports = (robot) ->\n robot.respond /l[ou]l...
coffeescript
chosen
[ { "from": "human", "value": "Prepare for using Mocha for cross-platform testing\n" }, { "from": "gpt", "value": "{expect} = require 'chai'\ngraph = require '../src/lib/Graph.coffee'\n\ndescribe 'Graph instance', ->\n g = null\n it 'should have no nodes initially', ->\n g = new graph.Graph\n...
coffeescript
chosen
[ { "from": "human", "value": "Create view to auto save a checkbox\n" }, { "from": "gpt", "value": "Dashboard.AutoSaveCheckboxView = Ember.View.extend\n template: Ember.Handlebars.compile(\"{{input type='checkbox' checked=view.attr}}\")\n tagName: 'span'\n\n attributeBindings: [\n 'attr'\n ...
coffeescript
chosen
[ { "from": "human", "value": "Add task to publish packages\n" }, { "from": "gpt", "value": "async = require 'async'\nrequest = require 'request'\n\n# Configure and publish all packages in package.json to atom.io\n#\n# This task should be run whenever you want to be sure that atom.io contains\n# a...
coffeescript
chosen
[ { "from": "human", "value": "Disable built-in help for the lulz" }, { "from": "gpt", "value": "module.exports = (robot) ->\n lulz = ['lol', 'rofl', 'lmao']\n\n robot.respond /lulz/i, (res) ->\n res.send res.random lulz\n\n robot.listenerMiddleware (context, next, done) ->\n # console.lo...
coffeescript
chosen
[ { "from": "human", "value": "Write test coverage for ViewCache\n" }, { "from": "gpt", "value": "describe \"Marowak.ViewCache\", ->\n beforeEach ->\n @cache = new Marowak.ViewCache\n @view = new Backbone.View\n\n @cid = 1\n @cache.add @cid, @view\n\n describe \"#fetch\", ->\n it ...
coffeescript
chosen
[ { "from": "human", "value": "Add expected section relationship behavior of indicators\n" }, { "from": "gpt", "value": "suite('Indicator Model')\n\ntest('when initialised with no section attribute, it creates and empty section collection', ->\n indicator = new Backbone.Models.Indicator(section: ...
coffeescript
chosen
[ { "from": "human", "value": "Add context menu entry for setting a breakpoint\n" }, { "from": "gpt", "value": "'context-menu':\n 'atom-text-editor': [\n {\n label: 'Debug'\n submenu: [\n {label: 'Toggle Breakpoint', command: 'debugger:toggle-breakpoint-at-current-line'}\n ...
coffeescript
chosen
[ { "from": "human", "value": "Add simple variable default and retrieve module.\n" }, { "from": "gpt", "value": "###*\n# @overview This module loads default variables in to the Stout UI variable\n# system which can shared compiled variables between SASS and JavaScript with\n# support for extension...
coffeescript
chosen
[ { "from": "human", "value": ":construction: Add stub for model tests\n" }, { "from": "gpt", "value": "\ndescribe 'MinimapModel', ->\n [workspaceElement, editor, editorView] = []\n\n beforeEach ->\n waitsForPromise ->\n atom.workspace.open('sample.js')\n\n runs ->\n workspaceEle...
coffeescript
chosen
[ { "from": "human", "value": "Add menu to toggle command palette\n\nCloses atom/atom#1339\n" }, { "from": "gpt", "value": "'menu': [\n {\n 'label': 'View'\n 'submenu': [\n {\n 'label': 'Toggle Command Palette'\n 'command': 'command-palette:toggle'\n }\n ]\n }\n ...
coffeescript
chosen
[ { "from": "human", "value": "Add some Coffeescript to fetch our latest Tumblr blog post.\n" }, { "from": "gpt", "value": "Tumblr = Tumblr or {}\nTumblr.RecentPosts = (el, postsCount) ->\n apiUrl = \"http://blog.hello-base.com/api/read/json?callback=?&filter=text&num=\" + (postsCount or 10)\n t...
coffeescript
chosen
[ { "from": "human", "value": "Add component to resize buffers\n" }, { "from": "gpt", "value": "noflo = require 'noflo'\nsharp = require 'sharp'\nCanvas = require('noflo-canvas').canvas\n\n# @runtime noflo-nodejs\n# @name ResizeBuffer\n\nexports.getComponent = ->\n c = new noflo.Component\n\n c....
coffeescript
chosen
[ { "from": "human", "value": ":new: Add basic Message Registry class\n" }, { "from": "gpt", "value": "\n\nclass MessageRegistry\n constructor: (@linter)->\n @messages = new Map()\n\n set: (linter, messages) ->\n @classifyMessages(messages)\n @messages.set(linter, messages)\n\n delete:...
coffeescript
chosen
[ { "from": "human", "value": "Add the ability to query status for a PR\n\nExample:\n\n`hubot status jekyll/jekyll 2001` will give you back\n\n```\nhttps://github.com/jekyll/jekyll/pull/2001 - error - The Travis CI build could not complete due to an error\n```\n" }, { "from": "gpt", "value": "# De...
coffeescript
chosen
[ { "from": "human", "value": ":new: Add specs for Message Registry\n" }, { "from": "gpt", "value": "describe 'message-registry', ->\n MessageRegistry = require('../lib/messages')\n EditorLinter = require('../lib/editor-linter')\n LinterRegistry = require('../lib/linter-registry')\n getLinterR...
coffeescript
chosen
[ { "from": "human", "value": "Add indementent chart component draft\n" }, { "from": "gpt", "value": "# # https://github.com/jhudson8/react-chartjs/blob/master/dist/react-chartjs.js\n\n## Example\n# PieChart = CustomChart.Pie\n# MyComponent = React.createClass\n# render: ->\n# React.createEl...
coffeescript
chosen
[ { "from": "human", "value": "Include source file for AreaTable entity\n" }, { "from": "gpt", "value": "r = require('restructure')\nEntity = require('../entity')\nLocalizedStringRef = require('../localized-string-ref')\n\nmodule.exports = Entity(\n id: r.uint32le\n mapID: r.uint32le\n parentID...
coffeescript
chosen
[ { "from": "system", "value": "Add error message if node version not found\n" }, { "from": "human", "value": "fs = require 'fs'\np = require 'path'\nminimatch = require 'minimatch'\nclone = require 'clone'\nutil = require './util'\nconfig = require '../config'\n\nmodule.exports =\n\n read: (path...
coffeescript
chosen
[ { "from": "human", "value": "Add spec toggle auto run\n" }, { "from": "gpt", "value": "RubocopAutoCorrect = require '../lib/rubocop-auto-correct'\n\ndescribe \"RubocopAutoCorrect\", ->\n beforeEach ->\n atom.config.set('rubocop-auto-correct.autoRun', false)\n\n it \"toggle auto run\", ->\n ...
coffeescript
chosen
[ { "from": "human", "value": "NEW: Add rollover API call to models\n" }, { "from": "gpt", "value": "angular.module(\"doubtfire.api.models.rollover-unit\", [])\n\n.factory(\"RolloverUnit\", (resourcePlus, api, currentUser) ->\n DuplicatedUnit = resourcePlus \"/units/:id/rollover\", { id: \"@id\" ...
coffeescript
chosen
[ { "from": "system", "value": "Hide and unset categories when filtering by followed artists\n" }, { "from": "human", "value": "Backbone = require 'backbone'\n\ntemplate = -> require('./index.jade') arguments...\n\nmodule.exports = class CategoryFilterView extends Backbone.View\n events:\n 'cl...
coffeescript
chosen