conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "human", "value": "Add a node.js coffeescript version\n" }, { "from": "gpt", "value": "#!/usr/bin/env coffee\n\nhttp = require 'http'\n\nserver = http.createServer (req, resp) ->\n req.setEncoding('utf-8')\n\n console.log \"#{req.method} #{req.url} HTTP/#{req.httpVersion}\"\n\n for ...
coffeescript
chosen
[ { "from": "human", "value": "Add test for unlocalize currency filter\n\n - Test that comma is well handle in both cases where comma is the default decimal separator or not.\n" }, { "from": "gpt", "value": "describe 'convert string to number with configurated currency', ->\n filter = null\n\n b...
coffeescript
chosen
[ { "from": "human", "value": "Add Comment-Section Module (Use Disqus)\n" }, { "from": "gpt", "value": "commentSection = angular.module(\"EventricDocs.Directive.CommentSection\", [])\n\n.directive \"commentSection\", ($window, $location) ->\n restrict: \"E\"\n scope:\n disqus_shortname: \"@di...
coffeescript
chosen
[ { "from": "human", "value": "Use JS to set active class on product nav\n" }, { "from": "gpt", "value": "jQuery ($) ->\n $(document).ready ->\n unless $('dl.tabs dd').hasClass('active')\n setActive()\n\n $('dl.tabs dd').on('click', setActive)\n\nsetActive = (item) ->\n console.log(item...
coffeescript
chosen
[ { "from": "human", "value": "Add unit tests for Trix.MutationObserver\n" }, { "from": "gpt", "value": "{assert, defer, test, testGroup} = Trix.TestHelpers\n\nobserver = null\nelement = null\nsummaries = []\n\ninstall = (html) ->\n element = document.createElement(\"div\")\n element.innerHTML =...
coffeescript
chosen
[ { "from": "system", "value": "Add local sub-collections to ConceptCollection\n\nThis differentiates between _queryable_ vs. _viewable_ concepts\nfor the query and results views, respectively.\n" }, { "from": "human", "value": "define ['../core', './field'], (c, field) ->\n\n class ConceptMode...
coffeescript
chosen
[ { "from": "system", "value": "Make the display of the results a bit nicer\n" }, { "from": "human", "value": "$ ->\n updateDisplay = ->\n if localStorage.lastSyncTime?\n $('.sync-stats').html \"You last synced on #{localStorage.lastSyncTime}\"\n $('.collection-num').html localStorage....
coffeescript
chosen
[ { "from": "human", "value": "Add custom script for Arnie quotes\n" }, { "from": "gpt", "value": "# Description:\n# Listens for words and sometimes replies with an Arnie quote\n#\n# Dependencies:\n# None\n#\n# Commands:\n# None\n#\n# Author:\n# Casey Lawrence <cjlaw@users.noreply.github.c...
coffeescript
chosen
[ { "from": "system", "value": "Remove throttle breaking object orientedness\n" }, { "from": "human", "value": "SocketIOThrottle = require './SocketIOThrottle'\n\nclass Limiter\n constructor: (@socket) ->\n\n throttle: (@callback=->) =>\n @throttled\n\n throttled: =>\n originalArguments =...
coffeescript
chosen
[ { "from": "human", "value": "Add CoffeeScript for uploads and progress display." }, { "from": "gpt", "value": "uploadFile = (fileField) ->\n form = fileField.parent()\n fileInput = document.getElementById(\"file\")\n file = fileInput.files[0]\n\n $.ajax\n type: \"GET\"\n url: \"/signat...
coffeescript
chosen
[ { "from": "human", "value": "Write dummy states for articles and people\n" }, { "from": "gpt", "value": "angular.module(\"hyperadmin\")\n .config ($locationProvider, $stateProvider, $urlRouterProvider) ->\n $locationProvider.html5Mode true\n\n $stateProvider\n .state \"list_articles\...
coffeescript
chosen
[ { "from": "system", "value": "Use path.join for test command\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: '.'\n src: ['index.coff...
coffeescript
chosen
[ { "from": "human", "value": "Bring the lulz from bukk.it\n" }, { "from": "gpt", "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]lz/i, (m...
coffeescript
chosen
[ { "from": "human", "value": "Use object for tempting within haml-coffee\n" }, { "from": "gpt", "value": "root = exports ? this\n\nroot.team =\n paul:\n name: \"Paul Bigger\"\n role: \"Founder\"\n github: \"pbiggar\"\n email: \"paul@circleci.com\"\n bio: \"Lorem ipsum dolor sit am...
coffeescript
chosen
[ { "from": "human", "value": "Update traceur and other stuff\n" }, { "from": "gpt", "value": "nconf = require(\"nconf\")\n\nhost = nconf.get(\"host\")\nhostEsc = host.replace(/[-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g, \"\\\\$&\")\nplunkRe = new RegExp(\"^([0-9a-zA-Z]+)\\.plunk\\.#{host...
coffeescript
chosen
[ { "from": "system", "value": "Refactor changeSection to avoid extra arguments\n\nScrolling to the top of a page is just another thing executed on hashchange now.\n\nI found the call \"changeSection null, !!e\" and the \"noscroll\" argument to be a\nbit confusing, and out of the proper scope. This refactor ...
coffeescript
chosen
[ { "from": "human", "value": "Add new user celebration script\n" }, { "from": "gpt", "value": "# Description:\n# Create a party when a new user appear\n#\n# Dependencies:\n# None\n#\n# Configuration:\n# None\n#\n# Commands:\n# new user - Create a party when a new user appear\n#\n# Author:\n...
coffeescript
chosen
[ { "from": "human", "value": "Index viewing test via casper.js\n" }, { "from": "gpt", "value": "casper = require('casper').create()\n\nd = ->\n console.log arguments...\n\ncasper.start 'http://func', ->\n this.test.assertHttpStatus 200\n\ncasper.run()\n" } ]
coffeescript
chosen
[ { "from": "human", "value": "Add initial spec to very grammar parses\n" }, { "from": "gpt", "value": "describe \"perl grammar\", ->\n grammar = null\n\n beforeEach ->\n waitsForPromise ->\n atom.packages.activatePackage(\"language-perl\")\n\n runs ->\n grammar = atom.grammars.g...
coffeescript
chosen
[ { "from": "system", "value": "Create comment box on the right location if there are already comments for this line.\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....
coffeescript
chosen
[ { "from": "system", "value": "Write file using grunt API\n" }, { "from": "human", "value": "fs = require 'fs'\npath = require 'path'\n_ = require 'underscore-plus'\n\nmodule.exports = (grunt) ->\n {spawn} = require('./task-helpers')(grunt)\n\n fillTemplate = (filePath, data) ->\n template =...
coffeescript
chosen
[ { "from": "human", "value": "Add the execution manager singleton class\n" }, { "from": "gpt", "value": "{Emitter} = require('atom')\n\n# ------------------------------------------------------------------------------\n\nclass ExecutionManager\n\n ## Construction ---------------------------------...
coffeescript
chosen
[ { "from": "system", "value": "Stop passing link separately to DemandVisualizer constructor\n" }, { "from": "human", "value": "# The view class for each link child item in the tree view. Each child item\n# is <li> tag with an anchor surrounding the name.\nclass window.sirius.TreeChildItemDemandLi...
coffeescript
chosen
[ { "from": "system", "value": "Add ember and angular skeletons to suggestions.\n" }, { "from": "human", "value": "'use strict'\n\ninitSkeleton = require 'init-skeleton'\nsysPath = require 'path'\nwatch = require './watch'\nlogger = require 'loggy'\n\ncreate = (skeleton, path = '.') ->\n unless s...
coffeescript
chosen
[ { "from": "system", "value": "Allow theme's package.cson to leave off stylesheet extension\n" }, { "from": "human", "value": "fs = require 'fs-utils'\nTheme = require 'theme'\nCSON = require 'cson'\n\nmodule.exports =\nclass AtomTheme extends Theme\n\n loadStylesheet: (stylesheetPath)->\n @s...
coffeescript
chosen
[ { "from": "system", "value": "Use Consolas font in Atom\n" }, { "from": "human", "value": "'exception-reporting':\n 'userId': '3ba70428-f782-5321-e73a-7b678f36511c'\n'release-notes':\n 'viewedVersion': '0.94.0'\n'welcome':\n 'showOnStartup': false\n'metrics':\n 'userId': '9e20623847c7c22109b...
coffeescript
chosen
[ { "from": "human", "value": ":new: Add first spec about event order\n" }, { "from": "gpt", "value": "describe 'Custom Element Base', ->\n registerCustomElement = require('../base.min.js')\n {getCustomElement} = require('./helper')\n\n it 'fires the events in order', ->\n lastRan = null\n ...
coffeescript
chosen
[ { "from": "human", "value": "Add Github Issue Link Generator\n\nSigned-off-by: Jordan Clist <51457cc104698da1e72d7c83202e49cfa8c509af@gmail.com>\n" }, { "from": "gpt", "value": "# Github issue link looks for #nnn and links to that issue for your default repo. Eg. \"Hey guys check out #273\"\n# R...
coffeescript
chosen
[ { "from": "human", "value": "Implement custom serverside filter according to the API filters structure\n" }, { "from": "gpt", "value": "Backbone = require 'backbone'\nBackgrid = require 'backgrid'\nFilter = require 'backgrid-filter'\n\n\nCustomServerSideFilter = Backgrid.Extension.ServerSideFi...
coffeescript
chosen
[ { "from": "system", "value": "Delete is on selection now, not editor\n" }, { "from": "human", "value": "_ = require 'underscore'\n\nclass NumericPrefix\n count: null\n complete: null\n operatorToRepeat: null\n\n constructor: (@count) ->\n @complete = false\n\n isComplete: -> @complete\n\...
coffeescript
chosen
[ { "from": "human", "value": "Add message for chrome users about scrolling select boxes\n" }, { "from": "gpt", "value": "###\nChrome version 32 changed how scroll bars work.\nThis is causing problems with some select fields\nwith many options. There's no way\nto click on the scroll bar. Sugg...
coffeescript
chosen
[ { "from": "system", "value": "Fix spec now that `Theme.load` returns a theme instead of an array" }, { "from": "human", "value": "$ = require 'jquery'\nfs = require 'fs'\nTheme = require 'theme'\n\ndescribe \"@load(name)\", ->\n themes = null\n\n beforeEach ->\n $(\"#jasmine-content\").appe...
coffeescript
chosen
[ { "from": "system", "value": "Fix login logo in subdir\n" }, { "from": "human", "value": "Template.loginHeader.helpers\n\tlogoUrl: ->\n\t\tasset = RocketChat.settings.get('Assets_logo')\n\t\tif asset?\n\t\t\treturn asset.url or asset.defaultUrl\n" }, { "from": "gpt", "value": "Templa...
coffeescript
chosen
[ { "from": "system", "value": "Add render process check for ATOM_HOME\n\nSetting it in the browser process does not seem to make it into\nthe render processes on Linux.\n\nCloses #5412\n" }, { "from": "human", "value": "# Like sands through the hourglass, so are the days of our lives.\nrequire '....
coffeescript
chosen
[ { "from": "human", "value": "Create user controller using searchable mixins\n" }, { "from": "gpt", "value": "Dashboard.UsersTabController = Ember.ArrayController.extend Dashboard.SearchableBaseController,\n baseRouteName: 'users'\n\n defaultSearchFields:\n query: null\n\nDashboard.UsersSear...
coffeescript
chosen
[ { "from": "system", "value": "Sort by name when type count is the same\n" }, { "from": "human", "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.conf...
coffeescript
chosen
[ { "from": "system", "value": "Add --extension option to log out all found paths\n" }, { "from": "human", "value": "asar = require 'asar'\npath = require 'path'\n\nmodule.exports = (grunt) ->\n grunt.registerTask 'output-build-filetypes', 'Log counts for each filetype in the built application', ...
coffeescript
chosen
[ { "from": "human", "value": "Add function to figure out amount.\n\n[#51755647]\n" }, { "from": "gpt", "value": "@getPayableAmount = (expense = {}, income = {}) ->\n if expense.amountRemaining and income.amountRemaining\n # Logic is simple here: we want the smallest number. This should work\n...
coffeescript
chosen
[ { "from": "human", "value": "Test public API. h/t @mikestone\n" }, { "from": "gpt", "value": "module \"public API\"\n\ntest \"strftime\", ->\n datetime = \"2013-11-12T12:13:00Z\"\n time = new Date Date.parse datetime\n format = \"%B %e, %Y %l:%M%P\"\n results = LocalTime.strftime time, forma...
coffeescript
chosen
[ { "from": "system", "value": "Rename season variable to CSON for consistency\n" }, { "from": "human", "value": "fs = require 'fs-plus'\npath = require 'path'\nKeymap = require 'atom-keymap'\nseason = require 'season'\n\nKeymap::loadBundledKeymaps = ->\n @loadKeyBindings(path.join(@resourcePath,...
coffeescript
chosen
[ { "from": "human", "value": "Add a vote click handler stub\n" }, { "from": "gpt", "value": "$ ->\n $('.vote').on 'click', (event) ->\n do event.preventDefault\n return unless (comicID = $(this).data 'id')\n $counter = $('.number-of-votes')\n count = parseInt $counter.text()\n cou...
coffeescript
chosen
[ { "from": "human", "value": "Add import script to populate contacts with existing collaborators\n" }, { "from": "gpt", "value": "# Usage: coffee preprocess.coffee projects.json done.csv\n# where projects.json is the output of \n# mongoexport <CREDENTIALS> --db sharelatex-staging --collection pro...
coffeescript
chosen
[ { "from": "human", "value": "Add start of a unit test for ActivityTableRow component\n" }, { "from": "gpt", "value": "require '../../testHelper'\nActivityTableRow = require '../../../app/assets/javascripts/components/activity/activity_table_row'\n\ndescribe 'ActivtyTableRow', ->\n TestRow = Rea...
coffeescript
chosen
[ { "from": "system", "value": "Remove caching on auction lots until we can get headers working correctly\n" }, { "from": "human", "value": "_ = require 'underscore'\n\nArtist = require '../../models/artist'\nAuctionLots = require '../../collections/auction_lots'\n\n@artist = (req, res) -...
coffeescript
chosen
[ { "from": "human", "value": "Stacks: Define route handler of stacks app\n" }, { "from": "gpt", "value": "kd = require 'kd'\nlazyrouter = require 'app/lazyrouter'\n\n\nhandleSection = (path, callback)->\n\n { appManager, router, groupsController } = kd.singletons\n\n unless appM...
coffeescript
chosen
[ { "from": "human", "value": "Call upnp module with MediaServer configuration\n" }, { "from": "gpt", "value": "upnp = require 'upnp'\nconfig =\n app:\n name: 'Bragi'\n version: '0.0.1'\n url: 'http://'\n device:\n type: 'MediaServer'\n version: '1.0'\n\nup...
coffeescript
chosen
[ { "from": "human", "value": "Add duration > 0 check\n" }, { "from": "gpt", "value": "dbm = require(\"db-migrate\")\nasync = require 'async'\n_ = require 'underscore'\ntype = dbm.dataType\n\ntable = \"time_entries\"\nconstraint = \"positive_duration\"\n\nexports.up = (db, callback) ->\n r = [\n ...
coffeescript
chosen
[ { "from": "human", "value": "Hide resource selection for roles other than team leader\n" }, { "from": "gpt", "value": "do($ = jQuery) ->\n $ ->\n resource_select = $('#user_role_resource')\n if resource_select.length\n do ->\n role_select = $('#user_role_role')\n role_c...
coffeescript
chosen
[ { "from": "human", "value": "Clean up. First simple step (download files from AWS).\n" }, { "from": "gpt", "value": "fs = require 'fs'\nQ = require 'q'\nknox = require 'knox'\n_ = require('underscore')._\n\nclass Client\n constructor: (key, secret, bucket) ->\n @client = knox.createClient\n ...
coffeescript
chosen
[ { "from": "human", "value": "Consolidate all test data into one object\n" }, { "from": "gpt", "value": "import enUSAmount from './en-us.amount.coffee'\nimport enUSCheque from './en-us.cheque.coffee'\nimport enUSNumber from './en-us.number.coffee'\nimport zhTWAmount from './zh-tw.amount.coffee'\n...
coffeescript
chosen
[ { "from": "human", "value": "Add script to fetch the status of a minecraft server.\n" }, { "from": "gpt", "value": "# Description:\n# Report the status of a Minecraft server\n# Uses http://api.syfaro.net/\n#\n# Dependencies:\n# None\n#\n# Configuration:\n# server_url and server_port, bel...
coffeescript
chosen
[ { "from": "system", "value": "Add support for loading titles, and removing ellipsis if needed. eg: title=\"Title and...\" selftext=\"...rest of joke\" gets changed into \"Title and rest of joke\"\n" }, { "from": "human", "value": "# joke me - Pull a random joke from /r/jokes\n\nmodule.exports = ...
coffeescript
chosen
[ { "from": "human", "value": "Add test skeleton for ObjectExpression fix\n" }, { "from": "gpt", "value": "'use strict'\n\nexpect = require('chai').expect\nescope = require '..'\n\ndescribe 'object expression', ->\n it 'doesn\\'t require property type', ->\n # Hardcoded AST\n ast =\n t...
coffeescript
chosen
[ { "from": "human", "value": "Add flat theme coffee file (same as future)" }, { "from": "gpt", "value": "$ = jQuery\n\nspinner_template = '''\n <div class=\"messenger-spinner\">\n <span class=\"messenger-spinner-side messenger-spinner-side-left\">\n <span class=\"messenger-sp...
coffeescript
chosen
[ { "from": "system", "value": "Fix the over creation of AudioContexts when record audio message.\n" }, { "from": "human", "value": "@AudioRecorder = new class\n\tstart: (cb) ->\n\t\twindow.AudioContext = window.AudioContext or window.webkitAudioContext\n\t\tnavigator.getUserMedia = navigator.getU...
coffeescript
chosen
[ { "from": "human", "value": "Add spec for Command::spawn calling back only once\n\nSigned-off-by: Katrina Uychaco <ef0b2ab5bd1ac851826b76acd653f3c4825374fb@github.com>\n" }, { "from": "gpt", "value": "Command = require '../lib/command'\n\ndescribe \"Command\", ->\n describe \"::spawn\", ->\n ...
coffeescript
chosen
[ { "from": "human", "value": "Add test for eventsource over spdy\n" }, { "from": "gpt", "value": "class EventSourceSpdyTest extends Test\n constructor: ->\n super\n @display_name = \"EventSource CORS over SPDY\"\n\n run: ->\n [a, b] = super\n\n source = new EventSource(\"https://cor...
coffeescript
chosen
[ { "from": "human", "value": "Fix navigation to use spine routes\n" }, { "from": "gpt", "value": "Spine = require 'spine'\nMyGalaxies = require 'controllers/interactive/my_galaxies'\nGraph = require 'controllers/interactive/graph'\nHome = require 'controllers/interactive/interactive'\n\nclass Nav...
coffeescript
chosen
[ { "from": "system", "value": "Tweak the modal styling for register modals\n" }, { "from": "human", "value": "Darkswarm.directive \"ofnRegistrationLimitModal\", (Navigation, $modal, Loading) ->\n restrict: 'A'\n link: (scope, elem, attr)->\n scope.modalInstance = $modal.open\n templateU...
coffeescript
chosen
[ { "from": "system", "value": "Fix keybindings to work with Nordic OS-X keyboards\n" }, { "from": "human", "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 b...
coffeescript
chosen
[ { "from": "human", "value": "Create classes for media-related stuff\n" }, { "from": "gpt", "value": "class SublimeVideo.Media.ImagePreloader\n constructor: (imageUrl, callback, options = {}) ->\n @callback = callback\n @imageSrc = imageUrl\n @options = options\n @problem = false\n...
coffeescript
chosen
[ { "from": "human", "value": "Add specs for display logic in artist header\n" }, { "from": "gpt", "value": "jade = require 'jade'\npath = require 'path'\nfs = require 'fs'\nBackbone = require 'backbone'\n{ fabricate } = require 'antigravity'\nArtist ...
coffeescript
chosen
[ { "from": "system", "value": "Fix limited fair partnership status display\n" }, { "from": "human", "value": "module.exports = \"\"\"\n fragment commercial on Artwork {\n _id\n id\n is_acquireable\n is_inquireable\n is_in_auction\n sale_message\n artists {\n name\n ...
coffeescript
chosen
[ { "from": "system", "value": "Handle null incision date time better\n" }, { "from": "human", "value": "###*\n@namespace scoping into the hquery namespace\n###\nthis.hQuery ||= {}\n\n\n# =require core.coffee\n###*\nThis represents all interventional, surgical, diagnostic, or therapeutic procedure...
coffeescript
chosen
[ { "from": "human", "value": "Add new data update tool\n" }, { "from": "gpt", "value": "\"use strict\"\n\nrand = (min, max) -> Math.floor(Math.random() * (max - min + 1)) + min\n\nMongoClient = require('mongodb').MongoClient\nMongoClient.connect \"mongodb://localhost:27017/test\", (err, db) ->\n ...
coffeescript
chosen
[ { "from": "human", "value": "Add an acceptance test for registration and login\n" }, { "from": "gpt", "value": "expect = require(\"chai\").expect\nasync = require(\"async\")\nUser = require \"./helpers/User\"\nrequest = require \"./helpers/request\"\nsettings = require \"settings-sharelatex\"\nr...
coffeescript
chosen
[ { "from": "system", "value": "Remove snake-case variable names in tests.\n" }, { "from": "human", "value": "path = require 'path'\n{Directory} = require 'pathwatcher'\nGitRepository = require '../src/git-repository'\nGitRepositoryProvider = require '../src/git-repository-provider'\n\ndescribe \"...
coffeescript
chosen
[ { "from": "human", "value": "Add StateService for cleaner state handling using promises\n" }, { "from": "gpt", "value": "angular.module('kassa').factory('StateService', [\n ->\n STATE_ERROR = 0\n STATE_SUCCESS = 1\n STATE_CHANGING = 2\n STATE_DEFAULT = 3\n class StateHandler\n ...
coffeescript
chosen
[ { "from": "human", "value": "Add grunt task to log long paths in built app\n" }, { "from": "gpt", "value": "path = require 'path'\n\nmodule.exports = (grunt) ->\n grunt.registerTask 'output-long-paths', 'Log long paths in the built application', ->\n shellAppDir = grunt.config.get('atom.shel...
coffeescript
chosen
[ { "from": "human", "value": "Add other example a ^Cuntdown sensor\n" }, { "from": "gpt", "value": "HubotSensor = require('../sensor')\n\nclass CountDownSensor extends HubotSensor\n constructor: (@robot) ->\n super(60 * 1000, false)\n @_init()\n\n check: () ->\n --@minutes\n @minute...
coffeescript
chosen
[ { "from": "human", "value": "Set up env for tests\n" }, { "from": "gpt", "value": "#= require jquery\n#= require jquery_ujs\n#\n#= require ember\n#= require ember-data\n#\n#= require_self\n#= require ember_cart/ember/app\n\njQuery ->\n jQuery(\"#konacha\").append('<div id=\"ember-cart\"></div>'...
coffeescript
chosen
[ { "from": "human", "value": "Add script to control Spot.\n" }, { "from": "gpt", "value": "# Description:\n# Control Spot from campfire. https://github.com/minton/spot\n#\n# Dependencies:\n# None\n#\n# Configuration:\n# HUBOT_SPOT_URL\n#\n# Commands:\n# hubot play - Plays current playlist...
coffeescript
chosen
[ { "from": "human", "value": "Add script to evaluate Clojure script\n" }, { "from": "gpt", "value": "# Evaluate one line of Clojure script.\n#\n# clojure|clj <script> - Evaluate one line of Clojure script\nmodule.exports = (robot) ->\n robot.respond /(clojure|clj)\\s+(.*)/i, (msg)->\n script ...
coffeescript
chosen
[ { "from": "human", "value": "Add onScroll hide effect Coffeescript\n" }, { "from": "gpt", "value": "window.lesson = {}\n\nwindow.lesson.applyScrollEffect = (classList, options) ->\n @prevST = 0\n @scrollTimer = null\n\n @onScroll = =>\n currentST = $(window).scrollTop()\n\n ...
coffeescript
chosen
[ { "from": "system", "value": "Use PeerServer :cloud: instead of EC2\n" }, { "from": "human", "value": "Peer = require './peer'\nGuid = require 'guid'\n\nmodule.exports =\n createPeer: ->\n id = Guid.create().toString()\n new Peer(id, host: 'ec2-54-218-51-127.us-west-2.compute.amazonaws.co...
coffeescript
chosen
[ { "from": "human", "value": "Add migration to set channel 'GENERAL' with default: true\n" }, { "from": "gpt", "value": "Meteor.startup ->\n\tMigrations.add\n\t\tversion: 11\n\t\tup: ->\n\t\t\t###\n\t\t\t# Set GENERAL room to be default\n\t\t\t###\n\n\t\t\tChatRoom.update({_id: 'GENERAL'}, {$set:...
coffeescript
chosen
[ { "from": "human", "value": "Revert \"S53434 - Changed Roadmap Planning App to use new base model\"\n\nThis reverts commit dca6a2a5ba1fefd4d29af51dca836eefad336029.\n" }, { "from": "gpt", "value": "Ext = window.Ext4 || window.Ext\n\ndescribe 'Rally.apps.roadmapplanningboard.BaseModel', ->\n bef...
coffeescript
chosen
[ { "from": "system", "value": "Clear deprecations after mapping over them\n" }, { "from": "human", "value": "{userAgent, taskPath} = process.env\nhandler = null\n\nsetupGlobals = ->\n global.attachEvent = ->\n console =\n warn: -> emit 'task:warn', arguments...\n log: -> emit 'task:log', ...
coffeescript
chosen
[ { "from": "human", "value": "Add initial spec to highlight deprecations\n" }, { "from": "gpt", "value": "describe \"incompatible packages view\", ->\n beforeEach ->\n waitsForPromise ->\n atom.packages.activatePackage('incompatible-packages')\n\n it \"opens a pane item when incompatibl...
coffeescript
chosen
[ { "from": "system", "value": "Add deep copy to Range\n" }, { "from": "human", "value": "Point = require 'point'\n\nmodule.exports =\nclass Range\n constructor: (pointA, pointB) ->\n pointA = Point.fromObject(pointA)\n pointB = Point.fromObject(pointB)\n\n if pointA.compare(pointB) <= 0...
coffeescript
chosen
[ { "from": "human", "value": "Add tests for preparing and executing SQL.\n" }, { "from": "gpt", "value": "Connection = require('../../src/connection')\nRequest = require('../../src/request')\nfs = require('fs')\nTYPES = require('../../src/data-type').typeByName\n\ngetConfig = ->\n config = JSON....
coffeescript
chosen
[ { "from": "human", "value": "Add a fix for the weird facebook hash\n" }, { "from": "gpt", "value": "if window.location.hash == '#_=_'\n if history.replaceState\n history.replaceState(null, null, window.location.href.split('#')[0])\n else\n window.location.hash = ''\n" } ]
coffeescript
chosen
[ { "from": "system", "value": "Make edit link on issuable sidebar works\n\nSigned-off-by: Dmitriy Zaporozhets <be23d75b156792e5acab51b196a2deb155d35d6a@gmail.com>\n" }, { "from": "human", "value": "#= require jquery.waitforimages\n\nclass @IssuableContext\n constructor: ->\n new UsersSelect()...
coffeescript
chosen
[ { "from": "system", "value": "Use key name by default, full otherwise\n" }, { "from": "human", "value": "_ = require 'lodash'\ndirection = require './direction'\n\nbindings = require '../key-bindings.json'\n\nmodule.exports = exports = (game) ->\n\tgame.on 'key.*', (ch, key) ->\n\t\taction = bin...
coffeescript
chosen
[ { "from": "human", "value": "Add test for rotate component\n" }, { "from": "gpt", "value": "noflo = require 'noflo'\nunless noflo.isBrowser()\n chai = require 'chai' unless chai\n Rotate = require '../components/Rotate-node.coffee'\n testutils = require './testutils'\n sharp = require 'sharp...
coffeescript
chosen
[ { "from": "human", "value": "Add test cases for signal handling\n" }, { "from": "gpt", "value": "vows = require 'vows'\nchild_process = require 'child_process'\nexec = child_process.exec\nspawn = child_process.spawn\nassert = require 'assert'\n\ndescribe = (name, bat) -> vows.describe(name)...
coffeescript
chosen
[ { "from": "human", "value": "Add first simple tests (not working yet).\n" }, { "from": "gpt", "value": "ProductTypeGenerator = require('../lib/producttypegenerator').ProductTypeGenerator\n\ndescribe 'ProductTypeGenerator', ->\n beforeEach ->\n @generator = new ProductTypeGenerator('foo')\n\n...
coffeescript
chosen
[ { "from": "system", "value": "Stop app specs from running.\n\nThese will be the last thing to implement." }, { "from": "human", "value": "App = require 'app'\nfs = require 'fs'\n\ndescribe \"App\", ->\n app = null\n\n beforeEach ->\n app = new App()\n\n afterEach ->\n window.close() for...
coffeescript
chosen
[ { "from": "system", "value": "Swap parameter order for Document.deserialize()\n" }, { "from": "human", "value": "require 'atom'\nrequire 'window'\n$ = require 'jquery'\n{$$} = require 'space-pen'\n{createPeer, connectDocument} = require './session-utils'\n{createSite, Document} = require 'telepa...
coffeescript
chosen
[ { "from": "system", "value": "Move checkout-head binding to `alt-meta-z` (meta-Z shadows redo)\n\nThis is my fault since I told Kevin to use this binding. Ooops." }, { "from": "human", "value": "window.keymap.bindKeys '.editor',\n 'meta-Z': 'editor:checkout-head-revision'\n" }, { "from"...
coffeescript
chosen
[ { "from": "human", "value": "Add the custom exception classes.\n" }, { "from": "gpt", "value": "# Exception class\nclass CustomException\n constructor:(@name, @message,@options)->\n log:->\n console.log(\"name\", @name, \"message\", @message, \"options\", @options)\n# Exception for a not im...
coffeescript
chosen
[ { "from": "human", "value": "Add JavaScript State Machine downloader.\n" }, { "from": "gpt", "value": "handle = require 'knit-common'\n\nuser = 'jakesgordon'\nrepo = 'javascript-state-machine'\nfilename = if knit.min then 'state-machine.min.js' else 'state-machine.js'\nref = knit.args.shift()\n\...
coffeescript
chosen
[ { "from": "human", "value": "Disable hiding the off-canvas upon window resize.\n\nIn some browsers for mobile devices, the address bar is automatically\nhidden when scrolling down the page. This is not workable if the height\nof the contents of the off-canvas exceeds the height of the screen,\nbecause the l...
coffeescript
chosen
[ { "from": "human", "value": "Add Facebook generator meta tags." }, { "from": "gpt", "value": "React = require 'react'\n\npkg = require '../package.json'\n\nmodule.exports = [\n <meta property='op:generator:application' content='marquee' />\n <meta property='op:generator:application:version...
coffeescript
chosen
[ { "from": "human", "value": "Convert script: implement basic version.\n" }, { "from": "gpt", "value": "#!/usr/bin/env _coffee\n#\n# Converts content that we have in our database but haven't converted yet.\n#\n# See these issues:\n#\n# https://github.com/zoomhub/zoomhub/issues/89\n# https://githu...
coffeescript
chosen
[ { "from": "system", "value": "Add log to main Alchemy class\n" }, { "from": "human", "value": "class Alchemy\n constructor: (@conf) -> \n @version = \"0.1.0\"\n @layout = {}\n @interactions = {}\n @utils = {}\n @visControls = {}\n @styles = {}\n ...
coffeescript
chosen
[ { "from": "human", "value": "Add A to Z lib\n" }, { "from": "gpt", "value": "_ = require 'underscore'\n\n# Lifted from:\n# https://raw.githubusercontent.com/artsy/artsy-backbone-mixins/master/lib/a_to_z.coffee\n\nmodule.exports =\n #\n # Collection models must specify what to sort by through a...
coffeescript
chosen
[ { "from": "human", "value": "Add typedump(), typecheck() for assertions.\n" }, { "from": "gpt", "value": "\ntypedump = (key, value, indent='') ->\n if isNumber value\n console.log indent + \"#{key}: T.num\"\n else if isString value\n console.log indent + \"#{key}: T.str\"\n else if isBo...
coffeescript
chosen
[ { "from": "human", "value": "Use recursinve frame reading (instead of time interval) from video feed to try and hit max frames per second.\n" }, { "from": "gpt", "value": "cv = require 'opencv'\n\n# First we create a new VideoCapture object to get\n# video from the camera (0 for default camera)\...
coffeescript
chosen
[ { "from": "system", "value": "Use spawn instead of execFile for squirrel events\n" }, { "from": "human", "value": "app = require 'app'\nChildProcess = require 'child_process'\npath = require 'path'\n\nupdateDotExe = path.resolve(path.dirname(process.execPath), '..', 'Update.exe')\nexeName = path...
coffeescript
chosen