conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Remove first .abstract element if it exists\n" }, { "from": "human", "value": "define (require) ->\n $ = require('jquery')\n toc = require('cs!collections/toc')\n Node = require('cs!models/content/node')\n require('backbone-associations')\n\n return class Page ...
coffeescript
chosen
[ { "from": "system", "value": "Add /feature bid route for Eigen\n" }, { "from": "human", "value": "#\n# Auction related routes\n#\n\nexpress = require 'express'\nroutes = require './routes'\n\napp = module.exports = express()\napp.set 'views', __dirname + '/templates'\napp.set 'view engine', 'jad...
coffeescript
chosen
[ { "from": "system", "value": "Use removeListener instead of off\n" }, { "from": "human", "value": "\n#\nmodule.exports =\nclass ObjectSelection\n constructor: (@options={}) ->\n @options.class ?= 'object-selection'\n\n setObject: (object) ->\n @_unbindObject(@object)\n @object = objec...
coffeescript
chosen
[ { "from": "system", "value": "Return null when not found\n" }, { "from": "human", "value": "EnumerableWrapper =\n getLength: ->\n @value.length\n\n forEach: (callback) ->\n if @wrappers.constructor == Object\n callback(key, wrapper) for key, wrapper of @wrappers\n else if @wrappe...
coffeescript
chosen
[ { "from": "system", "value": "Switch appveyor from apm to npm\n" }, { "from": "human", "value": "module.exports = (grunt) ->\n grunt.initConfig\n pkg: grunt.file.readJSON('package.json')\n\n coffee:\n glob_to_multiple:\n expand: true\n cwd: 'src'\n src: ['**/*.co...
coffeescript
chosen
[ { "from": "system", "value": "Fix bug with not called observers listening to aliases." }, { "from": "human", "value": "Wheelmap.ToolbarController = Ember.Controller.extend\n needs: 'map'\n statusFilters: ['yes', 'limited', 'no', 'unknown']\n map: Ember.computed.alias('controllers.map')\n _ex...
coffeescript
chosen
[ { "from": "system", "value": "Add RMQ to sparse tables contest" }, { "from": "human", "value": "import contest from \"../../lib/contest\"\nimport label from \"../../lib/label\"\nimport link from \"../../lib/link\"\nimport page from \"../../lib/page\"\nimport problem from \"../../lib/problem\"\ni...
coffeescript
chosen
[ { "from": "system", "value": "Remove no longer needed requires\n" }, { "from": "human", "value": "{CompositeDisposable} = require 'atom'\n\nmodule.exports =\n config:\n executablePath:\n type: 'string'\n title: 'PHP Executable Path'\n default: 'php' # Let OS's $PATH handle the...
coffeescript
chosen
[ { "from": "system", "value": "Enable tests to absolutely fail\n" }, { "from": "human", "value": "# Generated on 2014-12-25 using generator-bower 0.0.1\n'use strict'\n\nmountFolder = (connect, dir) ->\n connect.static require('path').resolve(dir)\n\nmodule.exports = (grunt) ->\n require('matc...
coffeescript
chosen
[ { "from": "system", "value": "Adjust indentation to make coffeescript happy\n" }, { "from": "human", "value": "AjaxPrefix.addAjaxPrefix(jQuery, -> CMS.prefix)\n\n@CMS =\n Models: {}\n Views: {}\n\n prefix: $(\"meta[name='path_prefix']\").attr('content')\n\n_.extend CMS, Backbone.Events\n\n$ -...
coffeescript
chosen
[ { "from": "system", "value": "Return a *real* promise so that we can then/catch\n" }, { "from": "human", "value": "User = require '../../../models/user.coffee'\nArtwork = require '../../../models/artwork.coffee'\nArtworkInquiry = require '../../../models/artwork_inquiry.coffee'\nopenInquiryQuest...
coffeescript
chosen
[ { "from": "system", "value": "Use RootView::open instead of RootView::openSync\n" }, { "from": "human", "value": "{_, $, fs, View} = require 'atom'\nMatchView = require './match-view'\npath = require 'path'\n\nmodule.exports =\nclass ResultView extends View\n @content: (filePath, matches) ->\n ...
coffeescript
chosen
[ { "from": "system", "value": "Add finalize filter and comment filter support.\n" }, { "from": "human", "value": "\nfs = require \"fs\"\nclass ContentManifest\n\n\tfilters: [ ]\n\n\tconstructor: (file,@options) ->\n\t\t@rawContent = fs.readFileSync(file,\"utf8\")\n\t\t@list = @rawContent.spli...
coffeescript
chosen
[ { "from": "system", "value": "Add root node to POST contributions/\n" }, { "from": "human", "value": "`// @ngInject`\nangular.module('cobudget').config (RestangularProvider, config) ->\n RestangularProvider.setBaseUrl(config.apiEndpoint)\n RestangularProvider.setDefaultHttpFields\n withCred...
coffeescript
chosen
[ { "from": "system", "value": "Add normalize.css before other css files." }, { "from": "human", "value": "exports.config =\n files:\n javascripts:\n joinTo:\n 'js/app.js': /^(vendor|bower_components|app)/\n\n stylesheets:\n joinTo: 'css/app.css'\n\n templates:\n jo...
coffeescript
chosen
[ { "from": "system", "value": "Add a more prominent link to the original journal\n" }, { "from": "human", "value": "Controller = require 'zooniverse/controllers/base-controller'\nApi = require 'zooniverse/lib/api'\n\nclass SubjectMetadata extends Controller\n \n template: (context) ->\n \"\n...
coffeescript
chosen
[ { "from": "system", "value": "Increase timeout before loading chosen\n\nSee #967. That still wasn't enough time.\n" }, { "from": "human", "value": "class window.ChosenActivator\n @activate: ->\n $(\".js--chosen\").not(\".optional\").chosen()\n $(\".js--chosen.optional\").chosen(allow_sing...
coffeescript
chosen
[ { "from": "system", "value": "UserItem: Add loader and a method to deal with it.\n" }, { "from": "human", "value": "kd = require 'kd'\nKDListItemView = kd.ListItemView\nKDCustomHTMLView = kd.CustomHTMLView\nAvatarView = require 'app/commonviews/avatarviews/avatarview'\n\n\nmodule.exports = class...
coffeescript
chosen
[ { "from": "system", "value": "Put Push config inside an autorun\n" }, { "from": "human", "value": "if Meteor.isCordova\n\tif RocketChat.settings.get('Push_enable') is true\n\t\tPush.Configure {}\n\n\t\tPush.addListener 'token', (token) ->\n\t\t\tMeteor.call 'log', 'token', arguments\n\n\t\tPush....
coffeescript
chosen
[ { "from": "system", "value": "Refactor my own knowledge on vanilla DOM manipulation\n\nGosh I didn't remember we could just use document.body instead of\ndocument.getElementsByTagName('body')[0]! -_-'\n" }, { "from": "human", "value": "'use strict'\n\nApp =\n items: [\n {name: 'Learn Brunch'...
coffeescript
chosen
[ { "from": "system", "value": "Fix issue where clearing filters would reset in-project status\n" }, { "from": "human", "value": "ns = @edsc.models.data\n\nns.Project = do (ko) ->\n\n class Project\n constructor: ->\n @datasets = ko.observableArray()\n\n toggleDataset: (dataset) =>\n ...
coffeescript
chosen
[ { "from": "system", "value": "Change AbstractButton.icon's type to Instance in bokehjs\n" }, { "from": "human", "value": "_ = require \"underscore\"\n\nWidget = require \"./widget\"\np = require \"../../core/properties\"\n\nclass AbstractButton extends Widget.Model\n type: \"AbstractButton\"\n\...
coffeescript
chosen
[ { "from": "system", "value": "Use appropriate icon name in PreviewSaveTool\n" }, { "from": "human", "value": "_ = require \"underscore\"\n$ = require \"jquery\"\n$1 = require \"bootstrap/modal\"\nActionTool = require \"./action_tool\"\npreview_save_tool_template = require \"./preview_save_tool_t...
coffeescript
chosen
[ { "from": "system", "value": "Handle backbone links in the modal on the site properly\n" }, { "from": "human", "value": "# Add a default clickhandler so we can use hrefs\nBackbone.View::defaultClickHandler = (e, routeTo=null) ->\n routeTo ||= $(e.target).closest(\"a\").attr(\"href\")\n\n # Ret...
coffeescript
chosen
[ { "from": "system", "value": "Increase sudo-mode time to one hour\n" }, { "from": "human", "value": "RedisWrapper = require('../../infrastructure/RedisWrapper')\nrclient = RedisWrapper.client('sudomode')\nlogger = require('logger-sharelatex')\n\n\nTIMEOUT_IN_SECONDS = 60 * 10\n\n\nmodule.exports...
coffeescript
chosen
[ { "from": "system", "value": "Improve date picker UX by defaulting to year first\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 thi...
coffeescript
chosen
[ { "from": "system", "value": "Update copy for a more natural sentence\n" }, { "from": "human", "value": "# Description\n# Notifies based on the results of xcode builds and controls xcode builds\n#\n# Dependencies\n# None\n#\n# Configuration\n# None\n#\n# Commands:\n# hubot build <bot nam...
coffeescript
chosen
[ { "from": "system", "value": "Access panes on workspace instead of view\n" }, { "from": "human", "value": "{$} = require 'atom'\n\nmodule.exports =\n configDefaults:\n enabled: false\n\n activate: ->\n atom.workspaceView.on 'focusout', \".editor:not(.mini)\", (event) =>\n editor = $...
coffeescript
chosen
[ { "from": "system", "value": "Use astrifex.svg-star instead of md5.svg-star\n" }, { "from": "human", "value": "'use strict'\n\nmodule.exports = angular.module('astrifex', [\n 'ui.router'\n 'md5.svg-star'\n require('../../../tmp/templates').name\n require('../common/index').name\n require('....
coffeescript
chosen
[ { "from": "system", "value": "Drop px units and spaces from size label\n" }, { "from": "human", "value": "_ = require 'underscore-plus'\n{View} = require 'atom'\nImageEditor = require './image-editor'\n\nmodule.exports =\nclass ImageEditorStatusView extends View\n @content: ->\n @div class: ...
coffeescript
chosen
[ { "from": "system", "value": "Move Antimatter task to level 8C\n" }, { "from": "human", "value": "import contest from \"../../lib/contest\"\nimport label from \"../../lib/label\"\nimport link from \"../../lib/link\"\nimport page from \"../../lib/page\"\nimport problem from \"../../lib/problem\"\...
coffeescript
chosen
[ { "from": "system", "value": "Fix deprecated selectors in keymap\n" }, { "from": "human", "value": "'.editor':\n 'ctrl-f2': 'bookmarks:view-all'\n 'f2': 'bookmarks:jump-to-next-bookmark'\n 'shift-f2': 'bookmarks:jump-to-previous-bookmark'\n\n'.platform-darwin .editor':\n 'cmd-f2': 'bookmarks...
coffeescript
chosen
[ { "from": "system", "value": "Fix adding inner elements to array\n" }, { "from": "human", "value": "{elementMatchesSelector} = LocalTime\n\nclass LocalTime.PageObserver\n constructor: (@selector, @callback) ->\n\n start: ->\n unless @started\n @observeWithMutationObserver() or @observe...
coffeescript
chosen
[ { "from": "system", "value": "Increment results line when scanning using a stream\n" }, { "from": "human", "value": "async = require 'async'\nfs = require 'fs'\nVariableScanner = require '../variable-scanner'\n\nclass PathScanner\n constructor: (@path) ->\n @scanner = new VariableScanner\n\n...
coffeescript
chosen
[ { "from": "system", "value": "Add an example menu item.\n" }, { "from": "human", "value": "'context-menu':\n '.tree-view':\n 'Add File': 'tree-view:add'\n 'Rename': 'tree-view:move'\n 'Delete': 'tree-view:remove'\n" }, { "from": "gpt", "value": "menu: [\n {\n label: 'Vi...
coffeescript
chosen
[ { "from": "system", "value": "Disable Twilio validation because it keeps failing\n" }, { "from": "human", "value": "#!/usr/bin/env coffee\n\nfeathers = require(\"feathers\")\nbodyParser = require(\"body-parser\")\npath = require(\"path\")\ntwilio = require(\"twilio\")\nconfig = require(\"./confi...
coffeescript
chosen
[ { "from": "system", "value": "Fix issue caused by asynchronous routing delaying a callback function\n" }, { "from": "human", "value": "define ['backbone.marionette'], (Marionette) ->\n class Router extends Marionette.AppRouter\n routes:\n 'unit/:id': 'renderUnit',\n ...
coffeescript
chosen
[ { "from": "system", "value": "Clean slate for live coding\n" }, { "from": "human", "value": "Crafty.defineScene 'New', ->\n\n #Crafty.e('2D,DOM,Color').attr(\n #x: 10\n #y: 10\n #w: 20\n #h: 20\n #).color('#0000FF')\n\n #Crafty.e('2D,Canvas,Color,Fourway').attr(\n #x: 100\n ...
coffeescript
chosen
[ { "from": "system", "value": "Fix JS to have translation pages working\n" }, { "from": "human", "value": "display_locale_fields = () ->\n attr = $('#attr_list a.active').data('attr')\n locales = $('#locale').val()\n show = $(\"select[name='show-only']\").val()\n\n $('#attr_fields .pane...
coffeescript
chosen
[ { "from": "system", "value": "Build should fail on any error.\n" }, { "from": "human", "value": "fs = require 'fs'\npath = require 'path'\n\nmkdir = (path, cb) ->\n cb = cb or ->\n mode = 0o777 & (~process.umask())\n fs.mkdir path, mode, (err) ->\n if err?.code is 'ENOENT'\n mkdir p...
coffeescript
chosen
[ { "from": "system", "value": "Read correct field for state update.\n" }, { "from": "human", "value": "containers = $(\".ontology-version-state\")\nfinal_states = [\"done\", \"failed\"]\npoll_time = 3000 # milliseconds\n\nreturn if _.isEmpty(containers) || !containers.length\n\nupdate = (cont...
coffeescript
chosen
[ { "from": "system", "value": "Use Stack instead of Express" }, { "from": "human", "value": "express = require 'express'\n\napp = express()\n\napp.get '/', (request, response) ->\n response.send('Hello World!')\n\n\nport = process.env.PORT or 5000\napp.listen port, ->\n console.log(\"Listening ...
coffeescript
chosen
[ { "from": "system", "value": "Add metadata for each suggestion" }, { "from": "human", "value": "{Range} = require('atom')\nfuzzaldrin = require('fuzzaldrin')\n\nmodule.exports =\nclass SnippetsProvider\n selector: '*'\n\n getSuggestions: ({scopeDescriptor, prefix}) ->\n return unless prefi...
coffeescript
chosen
[ { "from": "system", "value": "Add a delay before fetching matching records on search.\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 i...
coffeescript
chosen
[ { "from": "system", "value": "Disable github package in smoke test – it takes too long to compile\n" }, { "from": "human", "value": "fs = require 'fs-plus'\npath = require 'path'\nseason = require 'season'\ntemp = require('temp').track()\nrunAtom = require './helpers/start-atom'\n\ndescribe \"Sm...
coffeescript
chosen
[ { "from": "system", "value": "Add basic reads from all tests.\n" }, { "from": "human", "value": "describe 'PodsList', ->\n subject = null\n beforeEach (done) ->\n subject = new SeedsStore('test')\n expect(subject.clear()).eventually.notify(done)\n it 'counts 0', (done) ->\n expect(su...
coffeescript
chosen
[ { "from": "system", "value": "Add HUBOT_GITHUB_USER env variable to configuration. Delete unneeded variable 'oauth'." }, { "from": "human", "value": "# Description:\n# None\n#\n# Dependencies:\n# \"date-utils\": \">=1.2.5\"\n# \"githubot\": \"0.2.0\"\n# \n# Configuration:\n# HUBOT_GITHUB...
coffeescript
chosen
[ { "from": "system", "value": "Hide only the immediate li children of the list, rather than embedded lists too.\n" }, { "from": "human", "value": "class Filter\n constructor: (options) ->\n @list = options.list\n @icon = options.icon\n @form = options.form\n @attrs = options.attrs...
coffeescript
chosen
[ { "from": "system", "value": "Remove check for Meteor.userId() as session can be used without it\n" }, { "from": "human", "value": "if Meteor.isClient\n UI.registerHelper('featureFlag', () ->\n flag = @valueOf()\n flags = Session.get('flags')\n if flags and flag of flags ...
coffeescript
chosen
[ { "from": "system", "value": "Expand keywords into multiple key:value pairs\n" }, { "from": "human", "value": "define (require) ->\n $ = require('jquery')\n _ = require('underscore')\n router = require('cs!router')\n SearchHeaderView = require('cs!../header/header')\n BaseView = require('cs...
coffeescript
chosen
[ { "from": "system", "value": "Use options to observe phpExecutablePath config\n" }, { "from": "human", "value": "linterPath = atom.packages.getLoadedPackage(\"linter\").path\nLinter = require \"#{linterPath}/lib/linter\"\n{CompositeDisposable} = require 'atom'\n\nclass LinterPhp extends Linter\n...
coffeescript
chosen
[ { "from": "system", "value": "Use correct js file for test\n" }, { "from": "human", "value": "fs = require('fs')\nexpect = require('chai').expect\njsdom = require('jsdom').jsdom\nhtml = fs.readFileSync(\"#{__dirname}/index.html\", 'utf-8')\n\nglobal.document = jsdom(html)\nglobal.win...
coffeescript
chosen
[ { "from": "system", "value": "Load 10 records in poll page\n" }, { "from": "human", "value": "angular.module('loomioApp').controller 'PollsPageController', ($scope, $q, $rootScope, Records, AbilityService, TranslationService, LoadingService, ModalService, PollCommonStartModal) ->\n $rootScope.$...
coffeescript
chosen
[ { "from": "system", "value": "Fix for the master checkbox.\n" }, { "from": "human", "value": "'use strict'\n\nangular.module('xoWebApp')\n .controller 'MainCtrl', ($scope, $location, stats, objects) ->\n $scope.stats = stats.stats\n\n $scope.byUUIDs = objects.byUUIDs\n $scope.hosts = o...
coffeescript
chosen
[ { "from": "system", "value": "Add user credentials delete on controller\n" }, { "from": "human", "value": "BaseController = require \"#{__dirname}/base\"\nsql = require 'sql'\nUserCredential = require \"#{__dirname}/../models/user_credential\"\n\nclass UsersController extends BaseController\n\n ...
coffeescript
chosen
[ { "from": "system", "value": "Update coffeelint test to fix bug where the test was getting the output from the 1.5.0+ version of coffeescript\n" }, { "from": "human", "value": "path = require 'path'\nvows = require 'vows'\nassert = require 'assert'\ncoffeelint = require path.join('..', 'lib', 'c...
coffeescript
chosen
[ { "from": "system", "value": "Watch for hash change for tabs\n" }, { "from": "human", "value": "define [\n\t\"base\"\n], (App) ->\n\tApp.directive \"bookmarkableTabset\", ($location, _) ->\n\t\trestrict: \"A\"\n\t\trequire: \"tabset\"\n\t\tlink: (scope, el, attrs, tabset) ->\n\t\t\tscope.$applyA...
coffeescript
chosen
[ { "from": "system", "value": "Add correct password to postgres connect\n" }, { "from": "human", "value": "exports.conString = 'postgres://postgres:@localhost:5432/test'\nexports.from = [\n {table: 'calendar', type: 'C', colId: 'id'}\n {table: 'calendar_entry', type: 'E', colId: 'id'}\n]\nexpor...
coffeescript
chosen
[ { "from": "system", "value": "Change the ratio of partner cover images to 3:2, as suggested in CMS.\n" }, { "from": "human", "value": "module.exports =\n\n '''\n fragment partner on Partner {\n id\n name\n initials\n locations(size:15) {\n city\n }\n profile {\n id...
coffeescript
chosen
[ { "from": "system", "value": "Include XML error response message in exception.\n" }, { "from": "human", "value": "# Require Node.js core modules.\nhttp = require(\"http\")\n\n# Require Node EC2 specific modules.\nResponseParser = require(\"./response\").ResponseParser\ninvoke ...
coffeescript
chosen
[ { "from": "system", "value": "Set up a new GA tracking code for 2015\n" }, { "from": "human", "value": "Template.setup.rendered = ->\n setupGa()\n\nsetupGa = ->\n if !window.ga?\n (\n (i, s, o, g, r, a, m) ->\n i['GoogleAnalyticsObject'] = r\n i[r] = i[r] || -> (i[r].q = ...
coffeescript
chosen
[ { "from": "system", "value": "[FIX] Use author link in footer" }, { "from": "human", "value": "m = require 'mithril'\nFooter = require './components/footer'\n\nconfig = require 'config'\n\nmodule.exports = (vnode, attrs) ->\n ctrl = vnode.state.ctrl\n attrs = Object.assign attrs or {}, vnode.a...
coffeescript
chosen
[ { "from": "system", "value": "Use lazy loading for requires to ensure we only include the minimum necessary code.\n" }, { "from": "human", "value": "module.exports =\n Server: require(\"patchboard-server\")\n Client: require(\"patchboard-client\")\n Tools: require(\"./tools\")\n\n" }, { ...
coffeescript
chosen
[ { "from": "system", "value": "Fix typo in test name\n" }, { "from": "human", "value": "chai = require 'chai'\nsinon = require 'sinon'\nchai.use require 'sinon-chai'\n\nexpect = chai.expect\n\ndescribe 'pathview', ->\n beforeEach ->\n @robot =\n respond: sinon.spy()\n hear: sinon.sp...
coffeescript
chosen
[ { "from": "system", "value": "Improve Table of Contents nested list font size\n" }, { "from": "human", "value": "# *************************************\n#\n# Application\n# -> Compendium\n#\n# *************************************\n\n# -------------------------------------\n# Vendor\n# --...
coffeescript
chosen
[ { "from": "system", "value": "Change $ to jQuery, to prevent naming conflicts" }, { "from": "human", "value": "window.App ||= {}\nclass App.Base\n\n constructor: ->\n if (window.jQuery) then @setClearEventHandlers() # clearing application event handlers only possible with jQuery\n return ...
coffeescript
chosen
[ { "from": "system", "value": "Change version to 0.9.3.1 (with \"pre\") in preparation for release.\n" }, { "from": "human", "value": "###\nThis version class exists so we can work a version number into the catalog. \n###\n\nclass window._Version extends Control\n \n @catalog: \"0.9.3.1-pre\"\n...
coffeescript
chosen
[ { "from": "system", "value": "Add more JS snippets for Polymer declarations\n" }, { "from": "human", "value": "\".source.js\":\n \"Polymer: Element declaration\":\n \"prefix\": \"Polymer\"\n \"body\": \"\"\"\n Polymer({\n is: \"${1:my-element}\",\n $2\n });\n \"\"\"\n ...
coffeescript
chosen
[ { "from": "system", "value": "Add `uniExternalCollaboration` proxy to AnalyticRouter\n" }, { "from": "human", "value": "AuthenticationController = require './../Authentication/AuthenticationController'\nAnalyticsController = require('./AnalyticsController')\nAnalyticsProxy = require('./Analytics...
coffeescript
chosen
[ { "from": "system", "value": "Add parentheses to Jison Lex injection scopes\n" }, { "from": "human", "value": "\"name\": \"Jison Lex Injection\"\nscopeName: \"source.jisonlex-injection\"\n\n# Jison Lex replaces certain strings that start with “yy”:\n#\n# This string | is replaced with\n# -------...
coffeescript
chosen
[ { "from": "system", "value": "Swap order of map updates\n" }, { "from": "human", "value": "$(document).ready( ->\n require(['factsheet_handler'], (FactsheetHandler) ->\n new FactsheetHandler($('.factsheet'))\n )\n\n require(['tabs'], (Tabs) ->\n new Tabs($('.js-tabs-map'), ($tab, $tabCo...
coffeescript
chosen
[ { "from": "system", "value": "Fix subLayers being affected by superLayer `html`\n\nA subLayer of a superLayer with `Layer#html` content set would not be\npositioned correctly in the parent view, as it would be pushed down by\nthe content. This ensures layers are positioned correctly within\ntheir parent.\n"...
coffeescript
chosen
[ { "from": "system", "value": "Add concurrent task for watch and connect\n" }, { "from": "human", "value": "module.exports = (grunt) ->\n\tgrunt.initConfig\n\t\tbrowserify:\n\t\t\tgen:\n\t\t\t\tfiles:\n\t\t\t\t\t\"gen/out.js\": [\"scripts/index.js\"]\n\t\t\t\toptions:\n\t\t\t\t\ttransform: ['node...
coffeescript
chosen
[ { "from": "system", "value": "Fix heroku /public file serving\n" }, { "from": "human", "value": "express = require 'express'\napp = express()\n\n# Serve static files\napp.use express.static(__dirname + '/public')\n\n# Set cache manifext content-type\napp.use (req, res, next)->\n if req.original...
coffeescript
chosen
[ { "from": "system", "value": "Fix line-length on openFixture spec helper\n" }, { "from": "human", "value": "fs = require 'fs'\n\nmodule.exports.openFixture = (file, callback) ->\n fs.readFile __dirname.concat(\"/fixtures/#{file}.html\"), 'utf-8', (err, data) ->\n return callback err, data ...
coffeescript
chosen
[ { "from": "system", "value": "Fix undefined variable access and modifiers not being passed through to guest avatar\n" }, { "from": "human", "value": "###\n# Copyright 2015-2017 ppy Pty. Ltd.\n#\n# This file is part of osu!web. osu!web is distributed with the hope of\n# attracting more c...
coffeescript
chosen
[ { "from": "system", "value": "Use different hashing function for the mouth machine\n\nSo mouths and noses aren't always paired together\n" }, { "from": "human", "value": "# node libs\nfs = require('fs')\npath = require('path')\n\n# our libs\nSlotMachine = require('./slotMac...
coffeescript
chosen
[ { "from": "system", "value": "Fix the interaction between batch actions\n" }, { "from": "human", "value": "$(document).on 'ready page:load turbolinks:load', ->\n\n #\n # Use ActiveAdmin.modal_dialog to prompt user if confirmation is required for current Batch Action\n #\n $('.batch_actions_s...
coffeescript
chosen
[ { "from": "system", "value": "Use song id as key.\n" }, { "from": "human", "value": "goog.provide 'app.react.pages.Home'\n\nclass app.react.pages.Home\n\n ###*\n @param {app.Routes} routes\n @param {app.songs.Store} songsStore\n @param {app.react.Touch} touch\n @constructor\n ###\n...
coffeescript
chosen
[ { "from": "system", "value": "Remove unused syncing logic to conform to new sync architecture\n" }, { "from": "human", "value": "# A button used to set integers\nctrl = [\n '$scope',\n 'Devices',\n 'Data'\n 'Calendar'\n ($scope, Devices, Data, Calendar) ->\n $scope.text = ->\n switc...
coffeescript
chosen
[ { "from": "system", "value": "Modify change tracker to detect nested attributes\n" }, { "from": "human", "value": "# If you add the follow event to your View this will automatically update\n# all attributes on your model when the input field changes.\n#\n# 'change :input': 'changed'\n#\n# No...
coffeescript
chosen
[ { "from": "system", "value": "Move menu item to Edit menu.\n" }, { "from": "human", "value": "# See https://atom.io/docs/latest/creating-a-package#menus for more details\n'context-menu':\n '.overlayer':\n 'Execute as Ruby': 'execute-as-ruby:execute'\n\n'menu': [\n {\n 'label': 'Package...
coffeescript
chosen
[ { "from": "system", "value": "Use get_value instead of call\n" }, { "from": "human", "value": "exports.draw_grid = (SVG, world) ->\n grid_size = world.get('size')\n cell_size = world.get('scale')\n draw_leg = (x, y) ->\n size = cell_size * 0.5\n SVG.rect {\n x: x\n y: y\n ...
coffeescript
chosen
[ { "from": "system", "value": "Convert integer dropbox id to string when searching mongo\n" }, { "from": "human", "value": "logger = require(\"logger-sharelatex\")\nasync = require \"async\"\nUser = require(\"../../models/User\").User\nTpdsUpdateSender = require \"../ThirdPartyDataStore/TpdsUpdat...
coffeescript
chosen
[ { "from": "system", "value": "Fix bug where tests from new ES code being included in requirejs wrapped code\n" }, { "from": "human", "value": "# Set up requirejs to load the tests\n# Uses heuristic that test filenames end with Tests.js\ntests = []\nfor file of window.__karma__.files\n if window...
coffeescript
chosen
[ { "from": "system", "value": "Add score method to Reputation that takes the average of all scores.\n" }, { "from": "human", "value": "{log, p, pjson} = require 'lightsaber'\n{ first, flatten, unique } = require 'lodash'\nPromise = require 'bluebird'\ntrustExchange = require './trustExchange'\n\n...
coffeescript
chosen
[ { "from": "system", "value": ":bug: Fix error raised on tab close\n" }, { "from": "human", "value": "module.exports = ->\n highlightSelectedPackage = atom.packages.getLoadedPackage('highlight-selected')\n\n highlightSelected = require (highlightSelectedPackage.path)\n HighlightedAreaView = re...
coffeescript
chosen
[ { "from": "system", "value": "Use x3dom feature to load dynamically added x3d nodes\n" }, { "from": "human", "value": "Controller = require 'controllers/base/controller'\nX3dPageView = require 'views/x3d_page_view'\n\nmodule.exports = class X3dsController extends Controller\n historyURL: 'x3d'\...
coffeescript
chosen
[ { "from": "system", "value": "Format consistently with other (more complex) modules\n" }, { "from": "human", "value": "# Copyright 2012 The Apache Software Foundation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with th...
coffeescript
chosen
[ { "from": "system", "value": "Fix media url problem in tinymce\n" }, { "from": "human", "value": "WysiwygSelectView = OrchestraView.extend(\n events:\n 'click #sendToTiny': 'sendToTiny'\n 'change #media_crop_format' : 'changeCropFormat'\n\n initialize: (options) ->\n @options = @reduc...
coffeescript
chosen
[ { "from": "system", "value": "Set props on self rather than prototype\n\nAmpersand-state ver 5 uses `Object.keys` when an object is passed to\n`set`. In order to allow a Grid.Selections instance to be be passed to\nQuery.Fields the properties need to be set directly\n" }, { "from": "human", "va...
coffeescript
chosen
[ { "from": "system", "value": "Tests: Fix indent and bump timeout a bit\n" }, { "from": "human", "value": "\n{ jsJobRun } = require './cli'\npath = require 'path'\nchai = require 'chai'\n\ntestserver = 'http://localhost:8001'\nexample = (name) ->\n return path.join testserver, 'dist/examples', n...
coffeescript
chosen
[ { "from": "system", "value": "[Config] Remove spaces and hyphens from \"fromNumber\"\n\nTwilio wants the test number to be free of spaces and hyphens, so removing them from the example." }, { "from": "human", "value": "example =\n twilio:\n AccountSID: 'AC_YOUR_TWILIO_ACCOUNT_SID'\n AuthT...
coffeescript
chosen
[ { "from": "system", "value": "Atom: Add command to insert now as timestamp\n" }, { "from": "human", "value": "# Your init script\n#\n# Atom will evaluate this file each time a new window is opened. It is run\n# after packages are loaded/activated and after the previous editor state\n# has been r...
coffeescript
chosen
[ { "from": "system", "value": "Allow CoffeeScript files to be directly required.\n" }, { "from": "human", "value": "# Expose `Impromptu`.\nexports = module.exports = {}\n\n# Expose APIs.\nexports.db = require './db'\nexports.color = require './color'\nexports.Prompt = require './prompt'\nexports....
coffeescript
chosen
[ { "from": "system", "value": "Use built-ins instead of _\n" }, { "from": "human", "value": "{_, $, View} = require 'atom'\n\nmodule.exports =\nclass WrapGuideView extends View\n @activate: ->\n atom.workspaceView.eachEditorView (editorView) ->\n if editorView.attached and editorView.get...
coffeescript
chosen
[ { "from": "system", "value": "Fix tabs, and fix some syntax errors\n" }, { "from": "human", "value": "http = require( 'http' )\n\nclientID = \"\"\n\nmodule.exports = {\n\n setApiKey: ( ApiKey ) ->\n clientID = ApiKey\n\n getJSON: ( trackID ) ->\n https.get(url, (res) ->\n\n body = '...
coffeescript
chosen
[ { "from": "system", "value": "Return a valid current user id when testing\n" }, { "from": "human", "value": "Dashboard.CustomAuthenticator = SimpleAuth.Authenticators.Devise.extend\n restore: (properties) ->\n new Ember.RSVP.Promise((resolve, reject) ->\n if not Ember.isEmpty(properties...
coffeescript
chosen
[ { "from": "system", "value": "Fix for when the array is empty\n\n`$$.fn.hasClass` and `$$.fn.style` will both throw exceptions if the current selection of elements is empty.\n" }, { "from": "human", "value": "do ($$ = Quo) ->\n\n VENDORS = [ \"-webkit-\", \"-moz-\", \"-ms-\", \"-o-\", \"\" ]\...
coffeescript
chosen
[ { "from": "system", "value": "Change default homeRoute to /" }, { "from": "human", "value": "AccountsEntry =\n settings:\n wrapLinks: true\n homeRoute: '/home'\n dashboardRoute: '/dashboard'\n passwordSignupFields: 'EMAIL_ONLY'\n emailToLower: true\n usernameToLower: false\n ...
coffeescript
chosen