conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add hide key to config" }, { "from": "human", "value": "poi:\n theme: \"paperdark\"\n layout: \"horizonal\"\n window:\n x: 60\n y: 60\n width: 1274\n height: 616\n webview:\n width: 800\nproxy:\n use: \"none\"\n socks5:\n host: \"127.0.0.1\"\...
coffeescript
chosen
[ { "from": "system", "value": "Make the scan task actually work\n" }, { "from": "human", "value": "{PathSearcher, PathScanner, search} = require 'scandal'\n\nmodule.exports = (rootPath, regexSource, options) ->\n callback = @async()\n\n searcher = new PathSearcher()\n scanner = new PathScanner...
coffeescript
chosen
[ { "from": "human", "value": "Add basic integration test to create new products.\n" }, { "from": "gpt", "value": "debug = require('debug')('spec:it:sphere-product-sync-import')\n_ = require 'underscore'\n_.mixin require 'underscore-mixins'\n{ProductImport} = require '../coffee'\nConfig = require ...
coffeescript
chosen
[ { "from": "system", "value": "Fix the youtube regex to be more flexible\n" }, { "from": "human", "value": "class Kandan.Plugins.YouTubeEmbed\n\n @youtube_regex: /^http(s)?:\\/\\/www.youtube.com\\/watch/i\n @youtube_id_regex: /\\Wv=([\\w|\\-]*)/\n\n @youtube_embed_template: _.template '''\n ...
coffeescript
chosen
[ { "from": "system", "value": "Call clearInterval for the currentTimer if one exists\n\nPrevents a double-click from causing the logo to sweep forever after a\nload completes.\n" }, { "from": "human", "value": "NProgress.configure(showSpinner: false)\n\ndefaultClass = 'tanuki-shape'\npieces = [\n...
coffeescript
chosen
[ { "from": "system", "value": "Add ctrl-A/E keybinding to select to beginning/end of line\n\nCloses #711\n" }, { "from": "human", "value": "'body':\n 'meta-up': 'core:move-to-top'\n 'meta-down': 'core:move-to-bottom'\n 'meta-shift-up': 'core:select-to-top'\n 'meta-shift-down': 'core:select-to...
coffeescript
chosen
[ { "from": "human", "value": "Add tests for string interpolation.\n" }, { "from": "gpt", "value": "suite 'String Interpolation', ->\n# ----------\n\n test 'interpolate one string variable', ->\n b = 'b'\n eq 'abc', \"a#{b}c\"\n\n test 'interpolate two string variables', ->\n b = 'b'\n ...
coffeescript
chosen
[ { "from": "system", "value": "Save CollectorProfile (including hack around API bug)\n" }, { "from": "human", "value": "StepView = require './step.coffee'\nForm = require '../../form/index.coffee'\nLocationSearch = require '../../location_search/index.coffee'\ntemplate = -> require('../templates/...
coffeescript
chosen
[ { "from": "human", "value": "Add tool to generate a square polygon\n" }, { "from": "gpt", "value": "# Teaspoon includes some support files, but you can use anything from your own support path too.\n# require support/jasmine-jquery-1.7.0\n# require support/jasmine-jquery-2.0.0\n# require support/...
coffeescript
chosen
[ { "from": "human", "value": "Revert \"Moved requestAnimationFrame to browserlib\"\n\nThis reverts commit 4151b78a76dde9e09b31234db9bc8cf353c3ee90.\n" }, { "from": "gpt", "value": "window.requestAnimationFrame ||= \n window.webkitRequestAnimationFrame || \n window.mozRequestAnimationFrame ||...
coffeescript
chosen
[ { "from": "system", "value": "Sort user list by admin first, then by username\n" }, { "from": "human", "value": "class Kandan.Plugins.UserList\n\n @widget_title: \"People\"\n @widget_icon_url: \"/assets/people_icon.png\"\n @pluginNamespace: \"Kandan.Plugins.UserList\"\n\n @template: _.templa...
coffeescript
chosen
[ { "from": "human", "value": "Add a listen script to respond to pivotal stories seen in the room.\n" }, { "from": "gpt", "value": "# Listen for a specific story from PivotalTracker\n#\n# You need to set the following variables:\n# HUBOT_PIVOTAL_TOKEN = <API token>\n#\n# paste a pivotal tracker ...
coffeescript
chosen
[ { "from": "system", "value": "Make strip whitespace a valid extension\n" }, { "from": "human", "value": "module.exports =\n activate: (rootView) ->\n for buffer in rootView.project.getBuffers()\n @stripTrailingWhitespaceBeforeSave(buffer)\n\n rootView.project.on 'new-buffer', (buffer...
coffeescript
chosen
[ { "from": "human", "value": "Add initial unit tests for batch API\n" }, { "from": "gpt", "value": "should = require 'should'\nKM = require '../../src/kissmetrics'\n\ntestQueue =\n queue: []\n add: (data) ->\n @queue.push data\n get: ->\n @queue\n\ndescribe 'KM batch instance', ->\n ...
coffeescript
chosen
[ { "from": "system", "value": "Update checkout HEAD keybinding to meta-Z\n" }, { "from": "human", "value": "window.keymap.bindKeys '.editor',\n 'ctrl-Z': 'editor:checkout-head-revision'\n" }, { "from": "gpt", "value": "window.keymap.bindKeys '.editor',\n 'meta-Z': 'editor:checkout-h...
coffeescript
chosen
[ { "from": "human", "value": "Add a model object which handles maps zoom/center/fit changes.\n" }, { "from": "gpt", "value": "define \\\n[\n 'backbone'\n], (\n Backbone\n) ->\n\n class MapStateModel extends Backbone.Model\n # Models map center, bounds and zoom in a unified way.\n ...
coffeescript
chosen
[ { "from": "human", "value": "Implement component to get a frame of a GIF\n" }, { "from": "gpt", "value": "noflo = require 'noflo'\ngm = require 'gm'\nfileType = require 'file-type'\nreadChunk = require 'read-chunk'\ntemporary = require 'temporary'\n\n# @runtime noflo-nodejs\n# @name GetGIFFrame\...
coffeescript
chosen
[ { "from": "human", "value": "Add a simple JS tests file for the linear interpolator.\n" }, { "from": "gpt", "value": "{expect} = require \"chai\"\nutils = require \"../../utils\"\n\n{Collections} = utils.require \"base\"\n\ndescribe \"linear_interpolator_transform module\", ->\n source = {start...
coffeescript
chosen
[ { "from": "human", "value": "Add comment and indent settings\n" }, { "from": "gpt", "value": "\".source.csound, .source.csound-score\":\n editor:\n commentStart: \"; \"\n\n\".source.csound\":\n editor:\n increaseIndentPattern: \"\\\\b(?:do|else(?:if)?|i(?:f|nstr)|opcode)\\\\b\"\n decr...
coffeescript
chosen
[ { "from": "human", "value": "Add missing paging support classes\n" }, { "from": "gpt", "value": "# Support classes for the paging feature.\r\n\r\n{vlog} = require 'verbosity'\r\n{decSymbol} = require 'symbols'\r\n{clone} = require 'tc_util'\r\n\r\nPAGE_DEFAULT_SIZE = decSymbol 'PAGE_DEFAULT_SIZE...
coffeescript
chosen
[ { "from": "human", "value": "Add a random top reddit post script. Say subreddit or default to homepage.\n\nChose a post from random from the top ones for the day. The script tries to pick an image if it can find one.\n" }, { "from": "gpt", "value": "# a reddit <subreddit> - A random top (today) ...
coffeescript
chosen
[ { "from": "system", "value": "Use random sort instead of relative size for filtered partners on /galleries and /institutions.\n" }, { "from": "human", "value": "module.exports =\n \"\"\"\n query partners_results($includeAggregations: Boolean!, $includeResults: Boolean!, $near: String, $categor...
coffeescript
chosen
[ { "from": "human", "value": "Add simple integration test for categories (create, update, delete)\n" }, { "from": "gpt", "value": "_ = require 'underscore'\nQ = require 'q'\nSphereClient = require '../../lib/client'\nConfig = require('../../config').config\n\nuniqueId = (prefix) ->\n _.uniqueId ...
coffeescript
chosen
[ { "from": "system", "value": ":lipstick: Remove unneeded requires, variables, commas, and parens\n" }, { "from": "human", "value": "path = require 'path'\nfs = require 'fs-plus'\n\n{_} = require 'atom'\n\n## Platform specific helpers\nmodule.exports =\n # Public: Returns true if being run from ...
coffeescript
chosen
[ { "from": "human", "value": "Add directive for smooth scrolling to anchor\n" }, { "from": "gpt", "value": "Darkswarm.directive \"ofnSmoothScrollTo\", ($location, $document)->\n # Onclick sets $location.hash to attrs.ofnScrollTo\n # Then triggers $document.scrollTo\n restrict: 'A'\n link: (sc...
coffeescript
chosen
[ { "from": "human", "value": "Add tool to copy event schemas into snowplow repository.\n" }, { "from": "gpt", "value": "fs = require 'fs-extra'\npath = require 'path'\n \nif process.argv.length <= 2\n console.log \"Usage: #{__filename} snowplow-schema-dir\"\n process.exit -1\n\nsource = path.jo...
coffeescript
chosen
[ { "from": "system", "value": "Add Range.fromObject, which takes a [start, end] array" }, { "from": "human", "value": "Point = require 'point'\n_ = require 'underscore'\n\n\nmodule.exports =\nclass Range\n constructor: (pointA = new Point(0, 0), pointB = new Point(0, 0)) ->\n pointA = Point.f...
coffeescript
chosen
[ { "from": "human", "value": "Add script to subscribe email address to Mailchimp list\n" }, { "from": "gpt", "value": "# Description:\n# Add email to Mailchimp list\n#\n# Dependencies:\n# \"mailchimp\": \"0.9.5\"\n#\n# Configuration:\n# MAILCHIMP_API_KEY\n# MAILCHIMP_LIST_ID\n#\n# Command...
coffeescript
chosen
[ { "from": "human", "value": "Add JS to request the content to the user about his bankaccount\n" }, { "from": "gpt", "value": "Neighborly.Users ?= {}\n\nNeighborly.Users.Payments =\n modules: -> []\n init: Backbone.View.extend\n el: '.user-payments-content'\n\n initialize: ->\n $acco...
coffeescript
chosen
[ { "from": "human", "value": "Add unit test for vm-clean-reboot\n" }, { "from": "gpt", "value": "{job} = require '../../jobs/vm-clean-reboot'\nConnector = require '../../src'\ndebug = require('debug')('meshblu-connector-xenserver:test')\nsimple = require('simple-mock')\n\nclass MockConnector exte...
coffeescript
chosen
[ { "from": "human", "value": "Add mongodb and redis inspector utility\n" }, { "from": "gpt", "value": "MongoClient = require('mongodb').MongoClient\nObjectID = require('mongodb').ObjectID\nredisClient = require('redis')\n\nredis = redisClient.createClient()\nmongo = null\n\nexit = (msg, code) ->\...
coffeescript
chosen
[ { "from": "human", "value": "Add Atom package list file\n" }, { "from": "gpt", "value": "packages: [\n \"editorconfig\"\n \"file-icons\"\n \"highlight-selected\"\n \"linter\"\n \"linter-coffeelint\"\n \"linter-csslint\"\n \"linter-flake8\"\n \"linter-htmlhint\"\n \"linter-js-yaml\"\n \...
coffeescript
chosen
[ { "from": "human", "value": "Add test example for Coffee options support.\n" }, { "from": "gpt", "value": "# options_.coffee\n# An example of specifying file-level options in CoffeeScript.\n#\n# Usage:\n# coffee-streamline options_.coffee\n#\n# streamline.options = { \"callback\": \"_wait\" }\n\...
coffeescript
chosen
[ { "from": "system", "value": ":memo: Update CSON link to Atom Flight Manual\n" }, { "from": "human", "value": "# Your snippets\n#\n# Atom snippets allow you to enter a simple prefix in the editor and hit tab to\n# expand the prefix into a larger code block with templated values.\n#\n# You can cr...
coffeescript
chosen
[ { "from": "human", "value": "Add test for component metadata\n" }, { "from": "gpt", "value": "noflo = require 'noflo'\nunless noflo.isBrowser()\n chai = require 'chai' unless chai\n GetMetadata = require '../components/GetMetadata.coffee'\n testutils = require './testutils'\n sharp = require...
coffeescript
chosen
[ { "from": "human", "value": "Add utils for handling OTP GraphQL queries.\n" }, { "from": "gpt", "value": "define ->\n\n PLAN_QUERY = \"\"\"\n query(\n $modes: String!,\n $from: InputCoordinates!,\n $to: InputCoordinates!,\n $locale: String!,\n $wheelchair...
coffeescript
chosen
[ { "from": "system", "value": "Fix indexing of entries with \"event\" in the name\n" }, { "from": "human", "value": "class app.models.Entry extends app.Model\n # Attributes: name, type, path\n\n SEPARATORS_REGEXP = /\\:?\\ |#|::|->/g\n PARANTHESES_REGEXP = /\\(.*?\\)$/\n\n constructor: ->\n ...
coffeescript
chosen
[ { "from": "human", "value": "Define projects for work computer on 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: \"Maso...
coffeescript
chosen
[ { "from": "human", "value": "Add renderer plugin spec document.\n" }, { "from": "gpt", "value": "# nwdrome-renderer-plugin spec\n# Copyright 2014, Ragg(@_ragg_)\n\n###\n\n# Nwdrome renderer plugin specification\n\n## Register plugin\nCall `nwdrome.plugin.addRenderer` with `factory function`\nFac...
coffeescript
chosen
[ { "from": "human", "value": "Add \"your wish is my command\" watcher\n" }, { "from": "gpt", "value": "# Description\n# Grabs the current forecast from Dark Sky\n#\n# Dependencies\n# None\n#\n# Configuration\n# HUBOT_DARK_SKY_API_KEY\n# HUBOT_DARK_SKY_DEFAULT_LOCATION\n# HUBOT_DARK_SKY_...
coffeescript
chosen
[ { "from": "human", "value": "Add Coffee source for initial Backbone/Heap integration.\n" }, { "from": "gpt", "value": "_ = @_\nView = Backbone.View::constructor\n\nBackbone.View::constructor = (args...) ->\n result = View.apply @, args\n events = _.result @, 'events'\n\n for key, method of...
coffeescript
chosen
[ { "from": "system", "value": "Add pagination helpers to base collection.\n" }, { "from": "human", "value": "#= require_self\n#= require_tree .\n\nRahani.module 'Collections', ->\n class @Base extends Backbone.Collection\n" }, { "from": "gpt", "value": "#= require_self\n#= require_tr...
coffeescript
chosen
[ { "from": "human", "value": "Add coffee version of the shim.\n" }, { "from": "gpt", "value": "# Airbrake shim that stores exceptions until Airbrake notifier is loaded.\nwindow.Airbrake = []\n\n# Wraps passed function and returns new function that catches and\n# reports unhandled exceptions.\nAir...
coffeescript
chosen
[ { "from": "system", "value": "Update current test instance AMI identifier\n" }, { "from": "human", "value": "module.exports =\n current: 'ami-5dd50436'\n\n # Ordered by creation date\n list: [\n 'ami-5dd50436'\n ]\n" }, { "from": "gpt", "value": "module.exports =\n current:...
coffeescript
chosen
[ { "from": "human", "value": "Add the most important script in existence\n" }, { "from": "gpt", "value": "# Robot Roll Call\n#\n# robot roll call - does what it says\n#\n\nrobots = [\n \"http://i.imgur.com/6PcNC.jpg\", # robot roll call\n \"http://i.imgur.com/9UmSw.jpg\", # cambot\n \"http://i...
coffeescript
chosen
[ { "from": "human", "value": "Add tests for show view helpers.\n" }, { "from": "gpt", "value": "ViewHelpers = require '../../helpers/view_helpers'\n{ fabricate } = require 'antigravity'\n\ndescribe 'ViewHelpers', ->\n describe 'sailthruTags', ->\n it 'formats sailthru tags properly', ->\n ...
coffeescript
chosen
[ { "from": "system", "value": "Clean up generating score values\n" }, { "from": "human", "value": "###\n# Copyright 2015-2016 ppy Pty. Ltd.\n#\n# This file is part of osu!web. osu!web is distributed with the hope of\n# attracting more community contributions to the core ecosystem of osu!.\n#\n# o...
coffeescript
chosen
[ { "from": "human", "value": "Copy and paste youtube to steam\n\n100% OC, totally not ripping anyone off here." }, { "from": "gpt", "value": "# Description\n# Grab the title of a youtube video\n#\n# Dependencies:\n# cheerio\n# request\n#\n# Configuration:\n# None\n#\n# Commands:\n# None\n#\n...
coffeescript
chosen
[ { "from": "system", "value": "Hide the mouse after 5 seconds of inactivity.\n\nOriginal code by LKLG https://github.com/Shopify/dashing/pull/312\n" }, { "from": "human", "value": "# dashing.js is located in the dashing framework\n# It includes jquery & batman for you.\n#= require dashing.js\n\n#...
coffeescript
chosen
[ { "from": "system", "value": "Change the artifact target directory to dist instead of lib.\n" }, { "from": "human", "value": "module.exports = (grunt) ->\n grunt.initConfig\n pkg: grunt.file.readJSON('package.json')\n\n meta:\n banner:\n '// rivets.js\\n' +\n '// versio...
coffeescript
chosen
[ { "from": "system", "value": "Use new runas API for grunt install on Windows.\n" }, { "from": "human", "value": "path = require 'path'\n\nmodule.exports = (grunt) ->\n {cp, mkdir, rm, spawn} = require('./task-helpers')(grunt)\n\n grunt.registerTask 'install', 'Install the built application', -...
coffeescript
chosen
[ { "from": "system", "value": "Use self instead of hacky eval\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 self.postMe...
coffeescript
chosen
[ { "from": "human", "value": "Add possibility to remember/forget Harvest credentials.\n" }, { "from": "gpt", "value": "# Description:\n# Allows Hubot to interact with Harvest's (http://harvestapp.com) time-tracking\n# service.\n#\n# Dependencies:\n# None\n# Configuration:\n# HUBOT_HARVEST...
coffeescript
chosen
[ { "from": "human", "value": "Add promises marking when the containing body is in various stages of completion\n" }, { "from": "gpt", "value": "ready = $.Deferred()\ncomplete = $.Deferred()\n\nif /^(interactive|complete)$/.test(document.readyState)\n ready.resolve()\nelse\n document.addEventLis...
coffeescript
chosen
[ { "from": "human", "value": "Add KSS javascript to handle CSS pseudo classes" }, { "from": "gpt", "value": "# Scans stylesheets for pseudo classes, then inserts a new CSS rule with the\n# same properties, but named 'psuedo-class-{{name}}'.\n#\n# Supported pseudo classes: hover, disabled, active,...
coffeescript
chosen
[ { "from": "human", "value": "Add task to log loop returns\n" }, { "from": "gpt", "value": "path = require 'path'\n\nmodule.exports = (grunt) ->\n grunt.registerTask 'output-for-loop-returns', 'Log methods that end with a for loop', ->\n appDir = grunt.config.get('atom.appDir')\n\n jsPaths...
coffeescript
chosen
[ { "from": "human", "value": "Pricing: Define new TabHandleView for ui changes.\n" }, { "from": "gpt", "value": "kd = require 'kd'\nKDTabHandleView = kd.TabHandleView\n\n\nmodule.exports = class BranchTabHandleView extends KDTabHandleView\n\n constructor: (options = {}, data) ->\n\n...
coffeescript
chosen
[ { "from": "system", "value": "Simplify WebSocket reconnects and guard against opening multiple connections\n" }, { "from": "human", "value": "# Encapsulate the cable connection held by the consumer. This is an internal class not intended for direct user manipulation.\nclass Cable.Connection\n c...
coffeescript
chosen
[ { "from": "human", "value": "Add sample proportion class and basic methods\n" }, { "from": "gpt", "value": "class App.SampleProportion\n\n\tSD_TO_GRAPH = 5\n\n\tconstructor: (@participants, @conversions) ->\n\t\t@p = @conversions / @participants\n\t\t@sd = this.getStdDev()\n\n\tgetStdDev: ->\n\t...
coffeescript
chosen
[ { "from": "system", "value": "Use JANKY_SIGNTOOL env var to sign\n" }, { "from": "human", "value": "path = require 'path'\n\nmodule.exports = (grunt) ->\n {spawn} = require('./task-helpers')(grunt)\n\n grunt.registerTask 'codesign', 'Codesign the app', ->\n done = @async()\n\n if process...
coffeescript
chosen
[ { "from": "human", "value": "Add global tests for Expected parameters\n" }, { "from": "gpt", "value": "@expectRequiredParameters = (type, expectedParameterNames) ->\n originalType = type\n paramList = {}\n\n #check is this is an Abstract type\n if(type.isAbstract && type.isAbstract())\n t...
coffeescript
chosen
[ { "from": "human", "value": "Add tests for the AppRouter\n" }, { "from": "gpt", "value": "describe \"AppRouter specs\", ->\n describe \"Initialise\", ->\n it \"should set the correct properties\", ->\n pm = jasmine.createSpyObj(\"PageManager\", [\"on\"])\n pp = jasmine.createSpyObj...
coffeescript
chosen
[ { "from": "system", "value": "Add assert for null value when no next match\n" }, { "from": "human", "value": "{OnigScanner} = require '../lib/oniguruma'\n\ndescribe \"OnigScanner\", ->\n it \"returns the index of the matching pattern\", ->\n scanner = new OnigScanner([\"a\", \"b\", \"c\"])\n...
coffeescript
chosen
[ { "from": "system", "value": "Include release stage in campfire notification\n" }, { "from": "human", "value": "NotificationPlugin = require \"../../notification-plugin\"\n\nclass Campfire extends NotificationPlugin\n @receiveEvent: (config, event, callback) ->\n # Build the message\n mes...
coffeescript
chosen
[ { "from": "human", "value": "Add tests to ensure common interface.\n" }, { "from": "gpt", "value": "describe \"ImageViewer\", ->\n viewer = $('#ImageViewer').imageViewer\n\n beforeEach ->\n loadFixtures 'image_viewer_index'\n $('#ImageViewer').imageViewer([\"/assets/test_image_1.jpeg\"])...
coffeescript
chosen
[ { "from": "human", "value": "Add spec coverage for channel.js.coffee\n" }, { "from": "gpt", "value": "describe 'WebSocketRails.Channel:', ->\n beforeEach ->\n @dispatcher =\n new_message: -> true\n dispatch: -> true\n trigger_event: (event) -> true\n state: 'connected'\n ...
coffeescript
chosen
[ { "from": "human", "value": "Add jasmine tests to check measure calculation (in progress)\n" }, { "from": "gpt", "value": "#= require map_editor\nbeforeEach ->\n @map = new L.Map(document.createElement('div')).setView [0, 0], 15\n\ndescribe 'L.Draw.Polyline.ReactiveMeasure', ->\n beforeEach ->...
coffeescript
chosen
[ { "from": "human", "value": "Add CoffeeScript for the bar chart diagram\n\nI have forgotten to add the CoffeeScript file for generating the bar\nchart diagram. This commit adds it now.\n\nSigned-off-by: Konrad Reiche <4ff0213f56e2082fcd8c882d04c546881c579ce4@gmail.com>\n" }, { "from": "gpt", "va...
coffeescript
chosen
[ { "from": "human", "value": "Use logger from lib for eventual testing\n" }, { "from": "gpt", "value": "app = require \"./app/app\"\r\nlogger = require \"./app/libs/logger\"\r\n\r\nserver = app.listen app.get(\"port\"), ->\r\n logger.info \"Server listening on port \" + server.address().port"...
coffeescript
chosen
[ { "from": "human", "value": "Create JS unit test for choose_metric\n\nThis test is necessary in order to provide proper coverage that allows\na refactor.\n\nSigned off by: Diego Araújo <diegoamc90@gmail.com>\n" }, { "from": "gpt", "value": "#= require spec_helper\n#= require metric_collector\n\n...
coffeescript
chosen
[ { "from": "human", "value": "Add shortcut for removing powerbuild's cache file\n\nIt tends to become corrupted, and when it does, powerbuild can't\ncope with it and the build fails.\n" }, { "from": "gpt", "value": "fs = require 'fs'\npath = require 'path'\n_ = require 'lodash'\n\nmodule.exports ...
coffeescript
chosen
[ { "from": "human", "value": "Add basic test for File Source\n\n* Test whether we get the right streamKey\n* Test whether data is emitted\n" }, { "from": "gpt", "value": "FileSource = $src \"sources/file\"\nMasterStream = $src \"master/stream\"\nLogger = $src \"logger\"\n\nSTREAM...
coffeescript
chosen
[ { "from": "system", "value": "Add app/project name to uservoice\n" }, { "from": "human", "value": "NotificationPlugin = require \"../../notification-plugin\"\n\nclass UserVoice extends NotificationPlugin\n @receiveEvent: (config, event, callback) ->\n return if event?.trigger?.type == \"reop...
coffeescript
chosen
[ { "from": "human", "value": "Work with cocoon gem better\n" }, { "from": "gpt", "value": "# When we add a cocoon element, it copies a static template into the DOM\n# We have to update this template to have a unique ID\n$(document).on 'cocoon:before-insert', (event, item) ->\n return true if ite...
coffeescript
chosen
[ { "from": "human", "value": "Add markdow editor on channel edit\n" }, { "from": "gpt", "value": "Neighborly.Channels ?= {}\nNeighborly.Channels.Profiles ?= {}\n\nNeighborly.Channels.Profiles.Edit =\n init: Backbone.View.extend\n el: '.edit-channel-page'\n\n initialize: ->\n this.$('#...
coffeescript
chosen
[ { "from": "system", "value": "Use @@ in example snippet\n" }, { "from": "human", "value": "# If you want some example snippets, check out:\n# - https://raw.githubusercontent.com/atom/language-coffee-script/master/snippets/language-coffee-script.cson\n\n'.source.__package-name__':\n 'If':\n ...
coffeescript
chosen
[ { "from": "human", "value": "Add task to output file types in build folder\n" }, { "from": "gpt", "value": "path = require 'path'\n\nmodule.exports = (grunt) ->\n grunt.registerTask 'output-build-filetypes', 'Log counts for each filetype in the built application', ->\n shellAppDir = grunt.co...
coffeescript
chosen
[ { "from": "human", "value": "Implement ButtonViewWithProgressBar for built-in progress button usages\n" }, { "from": "gpt", "value": "kd = require 'kd'\nKDButtonView = kd.ButtonView\nKDProgressBarView = kd.ProgressBarView\nKDLoaderView = kd.LoaderView\nKDCustomHTMLView ...
coffeescript
chosen
[ { "from": "human", "value": "Add an integration test for images from mobile\n" }, { "from": "gpt", "value": "faker = require 'faker'\nfs = require 'fs-extra'\npath = require 'path'\nshould = require 'should'\n\nCozy = require '../helpers/integration'\nFiles = require '../helpers/files'\n...
coffeescript
chosen
[ { "from": "system", "value": "Add menu item to \"Add a folder\"\n" }, { "from": "human", "value": "'menu': [\n {\n 'label': 'View'\n 'submenu': [\n 'label': 'Toggle Treeview'\n 'command': 'tree-view:toggle'\n ]\n }\n {\n 'label': 'Packages'\n 'submenu': [\n 'labe...
coffeescript
chosen
[ { "from": "system", "value": "Rebuild the cordova index when change the Site Url\n" }, { "from": "human", "value": "if Meteor.isServer\n\turl = Npm.require('url')\n\nRocketChat.settings.get 'Site_Url', (key, value) ->\n\tif value?.trim() isnt ''\n\t\t__meteor_runtime_config__.ROOT_URL = value\n\...
coffeescript
chosen
[ { "from": "human", "value": "Add initial tests for portal lights\n" }, { "from": "gpt", "value": "noflo = require 'noflo'\n\ndevice = \"simulator://\"\n#device = \"serial:///dev/ttyACM0\"\n\nRuntime = require 'noflo-runtime/src/RemoteSubGraph'\n\ndescribe 'MicroFlo Portal Lights', ->\n runtime ...
coffeescript
chosen
[ { "from": "system", "value": "Remove unnecessary 'if x then true else false's\n" }, { "from": "human", "value": "Utils = require '../../../utils'\n\nFormField = React.createClass\n\n render: ->\n <input \n className = {classNames 'form-control', @props.prop.customClass}\n ...
coffeescript
chosen
[ { "from": "system", "value": "Use string interpolation for error message\n" }, { "from": "human", "value": "module.exports =\nclass GitRepository\n constructor: (path) ->\n unless repo = $git.getRepository(path)\n throw new Error(\"No Git repository found searching path: \" + path)\n ...
coffeescript
chosen
[ { "from": "human", "value": "Add script for current playing song in Last.fm\n" }, { "from": "gpt", "value": "# Last (or current) played song by a user in Last.fm\n#\n# hubot <what's playing> someone - Returns song name and artist\n#\n\nmodule.exports = (robot) ->\n robot.respond /what's playing...
coffeescript
chosen
[ { "from": "human", "value": "Create JS to upload images with dropzone\n" }, { "from": "gpt", "value": "Neighborly.Images = {} if Neighborly.Images is undefined\n\nNeighborly.Images.New =\n init: Backbone.View.extend\n el: '.new-image-page'\n\n initialize: ->\n dropzone = new this.Dra...
coffeescript
chosen
[ { "from": "human", "value": "Test for new squad button.\n" }, { "from": "gpt", "value": "require = patchRequire global.require\ncommon = require './common'\n\ncommon.setup()\n\n\ncasper.test.begin \"New squad\", (test) ->\n common.waitForStartup('#rebel-builder')\n\n common.createList('#re...
coffeescript
chosen
[ { "from": "human", "value": "Create a task which builds an installer\n" }, { "from": "gpt", "value": "fs = require 'fs'\npath = require 'path'\n\nmodule.exports = (grunt) ->\n {spawn} = require('./task-helpers')(grunt)\n\n grunt.registerTask 'create-installer', 'Create the Windows installer', ...
coffeescript
chosen
[ { "from": "human", "value": "Implement DOM node children list\n" }, { "from": "gpt", "value": "'use strict'\n\n\nList = require '../nodes/list'\n\n\nmodule.exports = class ChildrenList extends List\n\n constructor: (@element) ->\n\n\n setValue: (elementList) ->\n while (el = @element.lastCh...
coffeescript
chosen
[ { "from": "human", "value": "Add stupid simple concept for unannoying install prompt\n" }, { "from": "gpt", "value": "###!\n wai\n Version 0.1.0\n (c) 2014 tofumatt, MIT License\n###\n\"use strict\"\n\n# What kind of app install process are we dealing with?\nmozApps = @navigator.mozApps\n\n# ...
coffeescript
chosen
[ { "from": "human", "value": "Add test script using brain\n" }, { "from": "gpt", "value": "module.exports = (robot) ->\n\n robot.hear /tired/, (msg) ->\n robot.brain.data.count = 0 unless robot.brain.data.count\n robot.brain.data.count += 1\n robot.brain.save\n if robot.brain.data.co...
coffeescript
chosen
[ { "from": "human", "value": "Add effector plugin spec document.\n" }, { "from": "gpt", "value": "# nwdrome-effector-plugin spec\n# Copyright 2014, Ragg(@_ragg_)\n\n###\n\n# Nwdrome effector plugin specification\n\n## Register plugin\nCall `nwdrome.plugin.addEffector` with `factory function`\nFac...
coffeescript
chosen
[ { "from": "human", "value": "Add simple RDFa context to JSON tool\n" }, { "from": "gpt", "value": "jsdom = require 'jsdom'\nRDFaJSON = require \"../js/rdfa-json\"\npath = \"http://www.w3.org/2011/rdfa-context/rdfa-1.1.html\"\n#\"http://www.w3.org/2011/rdfa-context/xhtml-rdfa-1.1\"\n#\"http://www...
coffeescript
chosen
[ { "from": "system", "value": "Implement simple DSL for scripting\n\nlearn it if you're too lazy to type a few characters more" }, { "from": "human", "value": "Component = require 'core/Component'\nResult = require 'core/Result'\n\n###\n###\nmodule.exports = class Scriptable extends Component\n ...
coffeescript
chosen
[ { "from": "human", "value": "Move Queue over from alac.js\n" }, { "from": "gpt", "value": "class Queue\n constructor: (@name) ->\n @highwaterMark = 256\n @lowwaterMark = 64\n \n @finished = false\n @buffering = true\n \n @onHighwaterMark = null...
coffeescript
chosen
[ { "from": "human", "value": "Add sample for saving threads to mongodb\n" }, { "from": "gpt", "value": "mongoose = require \"mongoose\"\ndb = mongoose.connect 'mongodb://localhost/mailist-dev'\t\nThread = require '../models/Thread'\n\nmessage = {\n\tsubject: 'Friday cakes'\n\t,sender: 'rumi.neyk...
coffeescript
chosen
[ { "from": "human", "value": "Add simple spec for routes.\n" }, { "from": "gpt", "value": "describe \"Application routes\", ->\n\n beforeEach module(\"myApp\")\n\n beforeEach inject ($httpBackend) ->\n for partial in [\"views/main.html\", \"views/other.html\"]\n $httpBackend.whenGET(par...
coffeescript
chosen
[ { "from": "human", "value": "Add integration test for question interpreter\n" }, { "from": "gpt", "value": "describe 'Question to HTML', ->\n @timeout 0\n interpreter = SwanKiosk.Interpreters.Question\n layout = SwanKiosk.Layout\n question =\n title: 'Gender',\n why: 'This hel...
coffeescript
chosen
[ { "from": "human", "value": "Add utility lib to help with color conversions\n" }, { "from": "gpt", "value": "App.Utils =\n\thexToRgb: (hex) ->\n\t\tresult = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec hex;\n\t\tif result\n\t\t\tr: parseInt(result[1], 16),\n\t\t\tg: parseInt(result[2], 16...
coffeescript
chosen
[ { "from": "human", "value": "Add a unit test for GitRepositoryProvider.\n" }, { "from": "gpt", "value": "path = require 'path'\n{Directory} = require 'pathwatcher'\nGitRepository = require '../src/git-repository'\nGitRepositoryProvider = require '../src/git-repository-provider'\n\ndescribe \"Git...
coffeescript
chosen