conversations listlengths 2 3 | source stringclasses 1 value | stack stringclasses 1 value |
|---|---|---|
[
{
"from": "system",
"value": "NavigationList: Fix DND, simple is better\n"
},
{
"from": "human",
"value": "class NavigationList extends KDListView\n\n constructor:->\n super\n\n @viewWidth = 70\n\n @on 'ItemWasAdded', (view)=>\n\n view.once 'viewAppended', =>\n\n view._inde... | coffeescript | chosen |
[
{
"from": "system",
"value": "Revert \"remove respimg plugin and add unload plugin\"\n\nThis reverts commit f3fd6164a86c2ac25ee4156ee0adb232403d1856.\n"
},
{
"from": "human",
"value": "#= require lazysizes/plugins/rias/ls.rias\n#= require lazysizes/plugins/bgset/ls.bgset\n#= require lazysizes/pl... | coffeescript | chosen |
[
{
"from": "system",
"value": "Change sort to use > and not >=\n"
},
{
"from": "human",
"value": "mid = new Date('02/25/14 00:00:00')\nTemplate.agenda.day1 = ->\n @items.filter((i) -> i.time < mid).sort((a, b) -> a.time >= b.time)\n\nTemplate.agenda.day2 = ->\n @items.filter((i) -> i.time > mid... | coffeescript | chosen |
[
{
"from": "system",
"value": "Refactor loading of order in Orders.find()\n"
},
{
"from": "human",
"value": "Sprangular.service \"Orders\", ($http) ->\n\n service =\n find: (number) ->\n $http.get(\"/api/orders/#{number}\")\n .then (response) ->\n order = new Sprangular.O... | coffeescript | chosen |
[
{
"from": "system",
"value": "Fix Biskoto to be compatible with PhantomJS's escaping of cookies\n"
},
{
"from": "human",
"value": "define ->\n class Biskoto\n encode = encodeURIComponent\n decode = decodeURIComponent\n\n @get: (name) ->\n if document.cookie\n cookies = deco... | coffeescript | chosen |
[
{
"from": "system",
"value": "Allow street lights to be not connected\n"
},
{
"from": "human",
"value": "noflo = require 'noflo'\n\nclass ConvertStreetLight extends noflo.Component\n icon: 'filter'\n description: 'Convert street light RGB values so we can send them to PWM'\n\n constructor: ->... | coffeescript | chosen |
[
{
"from": "system",
"value": "Remove setting for obsolete autocomplete package\n"
},
{
"from": "human",
"value": "\"*\":\n core:\n ignoredNames: [\n \".DS_Store\"\n \".git\"\n \"vendor\"\n ]\n disabledPackages: [\n \"center-line\"\n \"branch-status\"\n \"o... | coffeescript | chosen |
[
{
"from": "system",
"value": "Fix warnings caused by invalid nesting of p elems\n"
},
{
"from": "human",
"value": "React = require 'react'\nEnrollButton = require '../students/enroll_button'\n\nInlineUsers = React.createClass(\n displayName: 'InlineUsers'\n render: ->\n key... | coffeescript | chosen |
[
{
"from": "system",
"value": "Fix portamento by using setValueAtTime instead of just changing the value.\n"
},
{
"from": "human",
"value": "#\n# Syntho - A Web based Synthesizer\n# by Michael Marner <michael@20papercups.net>\n#\n\naudioContext = new (window.AudioContext || window.webkitAudioCont... | coffeescript | chosen |
[
{
"from": "system",
"value": "Set the branch to '', that makes it use the default.\n\nIt also means the repo in the url does not by default contain /branch/master.\n"
},
{
"from": "human",
"value": "define [], () ->\n defaultRepo:\n repoUser: 'oerpub'\n repoName: 'textbook-demo'\n branch: ... | coffeescript | chosen |
[
{
"from": "system",
"value": "Fix param posting in chrome\n"
},
{
"from": "human",
"value": "BaseView = require 'views/base_view'\n\nclass Dialog extends BaseView\n className: 'dialog'\n tag: 'div'\n\n dialogTemplate: require './templates/dialog'\n\n initialize: (options) ->\n @parent = o... | coffeescript | chosen |
[
{
"from": "system",
"value": "Set auth token for all JS HTTP requests\n"
},
{
"from": "human",
"value": "window.Darkswarm = angular.module(\"Darkswarm\", [\"ngResource\",\n 'mm.foundation',\n 'LocalStorageModule',\n 'infinite-scroll',\n 'angular-flash.service',\n 'templates',\n 'ngSanitize... | coffeescript | chosen |
[
{
"from": "system",
"value": "Add Allen's information to team\n"
},
{
"from": "human",
"value": "root = exports ? this\n\nroot.team =\n paul:\n name: \"Paul Bigger\"\n role: \"Founder\"\n photo: \"paul.jpg\"\n github: \"pbiggar\"\n email: \"paul@circleci.com\"\n bio: \"Lorem i... | coffeescript | chosen |
[
{
"from": "system",
"value": "Use suggested_topics passed as parameter, and fall back to collection with the single model\n"
},
{
"from": "human",
"value": "#= require ./add_channel_to_channels_modal_view\n\nclass window.AddChannelToChannelsButtonView extends Backbone.Marionette.Layout\n templa... | coffeescript | chosen |
[
{
"from": "system",
"value": "Update 'outerPages' so that features/integrations pages don't redirect to themselves\n"
},
{
"from": "human",
"value": "checkOuterPages = (url) =>\n outerPages = [\"docs\", \"about\", \"privacy\", \"pricing\"]\n for page in outerPages\n if (url.match \"^/#{page... | coffeescript | chosen |
[
{
"from": "system",
"value": "EDSC-149: Fix landing page behavior when transitioning using the enter key\n"
},
{
"from": "human",
"value": "this.edsc.util.url = do(window,\n document,\n History,\n extend = jQuery.extend,\n ... | coffeescript | chosen |
[
{
"from": "system",
"value": "Add pprint utility function for JSON-based structures\n"
},
{
"from": "human",
"value": "define [\n 'jquery'\n './utils/numbers'\n './utils/url'\n './utils/version'\n], ($, mods...) ->\n\n # Convenience method for getting a value using the dot-notion ... | coffeescript | chosen |
[
{
"from": "system",
"value": "Revert \"Replace validation to node built-in functions\"\n\nThis reverts commit 9e4ff9f9d1dfa10098ec9fdbcd44420e2af64332.\n"
},
{
"from": "human",
"value": "util = require 'util'\n\nexports.is =\n fun: util.isFunction\n str: util.isString\n arr: util.isArray\n o... | coffeescript | chosen |
[
{
"from": "system",
"value": "Include past shows in related shows on gallery pages\n"
},
{
"from": "human",
"value": "_ = require 'underscore'\n{ Cities, FeaturedCities } = require 'places'\nPartnerShows = require '../../../../collections/partner_shows.coffee'\nRelatedShowsView = require './view... | coffeescript | chosen |
[
{
"from": "system",
"value": "Fix go-to-declaration for various cursor position within Ruby identifier\n\nEven though technically the Ruby \"word\" can only start with a letter or\nunderscore, in practice it's not a good idea to define such regexp here,\nbecause due to Atom's implementation of `editor.scanI... | coffeescript | chosen |
[
{
"from": "system",
"value": "Enable click support on mobile devices.\n"
},
{
"from": "human",
"value": "window.bsat.utils.readyOrPageChange ->\n #\n # Setup sidebar open/close state when the user\n # clicks on sidebar toggle button. The sidebar\n # gets closed on small devices using media q... | coffeescript | chosen |
[
{
"from": "system",
"value": "Remove deprecated swig file type\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 restored.\n#\... | coffeescript | chosen |
[
{
"from": "system",
"value": "Add optional server and port\n"
},
{
"from": "human",
"value": "commander = require 'commander'\nmeshblu = require 'meshblu'\n\nclass KeygenCommand\n parseOptions: =>\n commander\n .parse process.argv\n\n run: =>\n @parseOptions()\n\n @config = {se... | coffeescript | chosen |
[
{
"from": "system",
"value": "Add description for config setting\n"
},
{
"from": "human",
"value": "GitHubFile = require './github-file'\n\nmodule.exports =\n config:\n includeLineNumbersInUrls:\n default: true\n type: 'boolean'\n\n activate: ->\n atom.commands.add 'atom-pane'... | coffeescript | chosen |
[
{
"from": "system",
"value": "Remove try without a catch\n"
},
{
"from": "human",
"value": "fs = require('fs')\n\nisFile= (name,foundCB)->\n try\n fs.stat name, (err,stats)->\n foundCB(!err && stats.isFile())\n\nisFileSync= (name)->\n try\n fs.statSync(name).isFile()\n catch e\n ... | coffeescript | chosen |
[
{
"from": "system",
"value": "Include query strings in backbone history\n"
},
{
"from": "human",
"value": "define (require) ->\n $ = require('jquery')\n Backbone = require('backbone')\n router = require('cs!router')\n analytics = require('cs!helpers/handlers/analytics') # Setup Analytics Han... | coffeescript | chosen |
[
{
"from": "system",
"value": "Use a regex to capture the base64 encoded string\n"
},
{
"from": "human",
"value": "###\nPDFImage - embeds images in PDF documents\nBy Devon Govett\n###\n\nfs = require 'fs'\nData = require './data'\nJPEG = require './image/jpeg'\nPNG = require './image/png'\n\nclas... | coffeescript | chosen |
[
{
"from": "system",
"value": "Fix for windows template paths.\n"
},
{
"from": "human",
"value": "fs = require 'graceful-fs'\nAssetWatcher = require './Asset'\n\nclass TemplateWatcher extends AssetWatcher\n constructor: (@config)->\n super()\n\n pattern: -> super [\"**/template.jade\... | coffeescript | chosen |
[
{
"from": "system",
"value": "Fix width on PDF viewer\n"
},
{
"from": "human",
"value": "'use strict'\n\napp.directive 'pdfViewer', [\n () ->\n restrict: 'E'\n scope:\n asset: '=asset'\n link: ($scope, $elem) ->\n pdfElement = $($elem)[0]\n objectTag = document.createEl... | coffeescript | chosen |
[
{
"from": "system",
"value": "Change isDev util function to use re.test() instead of search()\n"
},
{
"from": "human",
"value": "moment = require('lib/moment')\n\nexports.isDev = (req) ->\n # We are on DEV when Host has string like\n # '/dev.' or '/staging.' or '.local' or '.dev' or 'localh... | coffeescript | chosen |
[
{
"from": "system",
"value": "Remove debug message from save method.\n"
},
{
"from": "human",
"value": "program = require \"commander\"\nfs = require \"fs\"\npath = require \"path\"\n\nbang = process.env.HOME + \"/.bang\"\ndata = {}\n\nif path.existsSync bang\n data = JSON.parse(fs.read... | coffeescript | chosen |
[
{
"from": "system",
"value": "Use updated endpoint and fix for legacy endpoint\n"
},
{
"from": "human",
"value": "_ = require 'underscore'\nBackbone = require 'backbone'\n{ API_URL } = require('sharify').data\nUserInterest = require '../models/user_interest.coffee'\n\nmodule.exports = class User... | coffeescript | chosen |
[
{
"from": "system",
"value": "Fix checkbox to slide correctly only when ticked\n"
},
{
"from": "human",
"value": "window.UsersComponent = class UsersComponent\n @initialize: ->\n @addEventListeners()\n\n @addEventListeners: ->\n @userDetailsTooltip()\n @respondentsTable()\n #Enable... | coffeescript | chosen |
[
{
"from": "system",
"value": "Add support for document status in data gen\n"
},
{
"from": "human",
"value": "\"use strict\"\n\nObjectID = require('mongodb').ObjectID\nMoniker = require('moniker')\n\nrand = (min, max) -> Math.floor (Math.random() * (max - min + 1) + min)\n\nlisence = [\n \"CC BY... | coffeescript | chosen |
[
{
"from": "system",
"value": "Revert \"Added url for NDPEvidenceCollection\"\n\nThis reverts commit 4cbcb9b3947112bc980da95cc7078bbae0291882.\n"
},
{
"from": "human",
"value": "class window.NDPEvidenceCollection extends Backbone.Collection\n initialize: (models, options) ->\n @on 'change', @... | coffeescript | chosen |
[
{
"from": "system",
"value": "Use _.escape to escape tooltip titles"
},
{
"from": "human",
"value": "{$, View} = require 'atom'\npath = require 'path'\n\nmodule.exports =\nclass TabView extends View\n @content: ->\n @li class: 'tab sortable', =>\n @div class: 'title', outlet: 'title'\n ... | coffeescript | chosen |
[
{
"from": "system",
"value": "Enable soft wrap in Atom for text files.\n\nMarkdown reference:\nhttps://discuss.atom.io/t/soft-wrap-support-but-only-for-markdown/46374/2\n"
},
{
"from": "human",
"value": "\"*\":\n \"activate-power-mode\":\n autoToggle: false\n comboMode:\n enabled: fa... | coffeescript | chosen |
[
{
"from": "system",
"value": "Revert \"Revert \"CHECKPOINT re-implemented binarySearch using slices\"\"\n\nThis reverts commit 71ac993cfc9b521cbb2492d2ce31943d08bb84ab.\n"
},
{
"from": "human",
"value": "\n{ isListAscending } = require './is-list-ascending.coffee'\n\n_binarySearch = (sortedList,... | coffeescript | chosen |
[
{
"from": "system",
"value": "Support ESC key for closing modalize modals\n"
},
{
"from": "human",
"value": "_ = require 'underscore'\nBackbone = require 'backbone'\ntemplate = require './templates/index.coffee'\nScrollbar = require '../scrollbar/index.coffee'\n\nmodule.exports = class Modalize ... | coffeescript | chosen |
[
{
"from": "system",
"value": "Remove _ and fs from exports\n"
},
{
"from": "human",
"value": "{Point, Range} = require 'text-buffer'\n\nmodule.exports =\n _: require 'underscore-plus'\n BufferedNodeProcess: require '../src/buffered-node-process'\n BufferedProcess: require '../src/buffered-pro... | coffeescript | chosen |
[
{
"from": "system",
"value": "Update notification store to handle notification action\n"
},
{
"from": "human",
"value": "# Requirements\n#----------------------------------------\n\nMcFly = require 'mcfly'\nFlux = new McFly()\n\n# Data\n#----------------------------------------\n\n_notifications... | coffeescript | chosen |
[
{
"from": "system",
"value": "Disable Reddit (using RES instead).\n"
},
{
"from": "human",
"value": "\nconfigs = []\n\nconfigs.push\n name: \"Reddit Comments\"\n comment:\n \"\"\"\n We select comments, but not responses. This avoids the need to \"j\" through endless lists of drivel.\n ... | coffeescript | chosen |
[
{
"from": "system",
"value": "Make the pre-formatted code regular expression a lot more permissive\n"
},
{
"from": "human",
"value": "###\n# Highlight is a named function that will highlight ``` messages\n# @param {Object} message - The message object\n###\n\nclass Highlight\n\n\t# If message st... | coffeescript | chosen |
[
{
"from": "system",
"value": "Update for the new theme\n"
},
{
"from": "human",
"value": "{$$} = require 'space-pen'\nSelectList = require 'select-list'\n$ = require 'jquery'\n_ = require 'underscore'\n\nmodule.exports =\nclass CommandPaletteView extends SelectList\n @activate: ->\n new Comm... | coffeescript | chosen |
[
{
"from": "system",
"value": "Update entity search service to use latest Marbles.HTTP.Client\n"
},
{
"from": "human",
"value": "class EntitySearchService\n constructor: (@options = {}) ->\n @client = new Marbles.HTTP.Client(middleware: [Marbles.HTTP.Middleware.SerializeJSON])\n\n # options:... | coffeescript | chosen |
[
{
"from": "system",
"value": "Test that UOM setting propogates\n"
},
{
"from": "human",
"value": "describe \"Skr.Models.SoLine\", ->\n\n it \"can be instantiated\", ->\n model = new Skr.Models.SoLine()\n expect(model).toEqual(jasmine.any(Skr.Models.SoLine))\n"
},
{
"from... | coffeescript | chosen |
[
{
"from": "system",
"value": "Add `self` URL to `Content`\n"
},
{
"from": "human",
"value": "config = require '../config'\ncrypto = require 'crypto'\nredis = require 'redis'\n\n\n# Redis\nclient = redis.createClient()\n\n# Keys\nHASH_ALGORITHM = 'sha256'\nHASH_ENCODING = 'hex'\n\nNEXT_ID_KEY = '... | coffeescript | chosen |
[
{
"from": "system",
"value": "Remove unused fetchers, getDomains does it all\n"
},
{
"from": "human",
"value": "'use strict'\n\nclass DomainsFactory\n constructor: (@restangular) ->\n\n getDomains: ->\n @restangular.all('domains-details').getList()\n\n getDomainPageCount: (domain) ->\n ... | coffeescript | chosen |
[
{
"from": "system",
"value": "Set and fit Yandex Map bounds\n"
},
{
"from": "human",
"value": "class @Gmaps4Rails.Yandex.Map extends Gmaps4Rails.Common\n\n @include Gmaps4Rails.Interfaces.Map\n\n @include Gmaps4Rails.Map\n @include Gmaps4Rails.Yandex.Shared\n @include Gmaps4Rails.Configur... | coffeescript | chosen |
[
{
"from": "system",
"value": "Fix XSS error in OEmbed\n"
},
{
"from": "human",
"value": "getTitle = (self) ->\n\tif not self.meta?\n\t\treturn\n\n\treturn self.meta.ogTitle or self.meta.twitterTitle or self.meta.title or self.meta.pageTitle\n\ngetDescription = (self) ->\n\tif not self.meta?\n\t\... | coffeescript | chosen |
[
{
"from": "system",
"value": "Support for JSON reponse in browser impl added\n"
},
{
"from": "human",
"value": "'use strict'\n\n[utils, Model] = ['utils', 'model'].map require\n\nexports.Request = require('./request.coffee')()\nexports.Response = require('./response.coffee')()\n\nexports.init = ... | coffeescript | chosen |
[
{
"from": "system",
"value": "Add findTask method to store.\n"
},
{
"from": "human",
"value": "# http://emberjs.com/guides/models/using-the-store/\n\nETahi.Store = DS.Store.extend\n # Override the default adapter with the `DS.ActiveModelAdapter` which\n # is built to work nicely with the Activ... | coffeescript | chosen |
[
{
"from": "system",
"value": "Add mandatory transaction date to spec data\n"
},
{
"from": "human",
"value": "describe 'LedgerWeb.Models.Transactions.Month', ->\n it 'populates transactions attribute as transactions collection', ->\n month = new LedgerWeb.Models.Transactions.Month\n mont... | coffeescript | chosen |
[
{
"from": "system",
"value": "Fix dumb break in script"
},
{
"from": "human",
"value": "# build task for tsc \ntask 'build', 'build:typescript', (done)-> \n count = 0\n typescriptProjects()\n .pipe foreach (each,next) -> \n count++\n execute \"#{basefolder}/node_modules/.bin/tsc -... | coffeescript | chosen |
[
{
"from": "system",
"value": "Fix escaping in test system.\n"
},
{
"from": "human",
"value": "Qjs = require '../../lib/qjs'\n\nTestSystem = Qjs.parse \"\"\"\n # Nil & others\n Any = .\n Nil = .( v | v === null )\n\n # Booleans\n True = .( b | b === true )\n False = .( b | b === false ... | coffeescript | chosen |
[
{
"from": "system",
"value": "Set current cwd folder for download by default"
},
{
"from": "human",
"value": "fs = require 'fs'\n\nexports.initialize = (args) ->\n configName = if args.length isnt 0 then args[0] else 'main'\n configPath = \"#{__dirname}/users/#{configName}.json\"\n fs.exists ... | coffeescript | chosen |
[
{
"from": "system",
"value": "Set user's realname to alias if not set already\n"
},
{
"from": "human",
"value": "Meteor.methods\n\tsendMessage: (message) ->\n\t\tif message.msg?.length > RocketChat.settings.get('Message_MaxAllowedSize')\n\t\t\tthrow new Meteor.Error('error-message-size-exceeded'... | coffeescript | chosen |
[
{
"from": "system",
"value": "Move flattening title links for todo_lists in to own function; register updated handler\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.j... | coffeescript | chosen |
[
{
"from": "system",
"value": "Make sure links aren't caught by Phabot Rabbit\n\nTest Plan:\nset /bin/secrets to only be in jamestest room\nbin/culturecow\ntype\nD1234\ncheck out D1234\nhttp://phabricator.khanacademy.org/D1234\naD1\n\nMake sure the frist two are responded to, but the last two aren't\n\nRevie... | coffeescript | chosen |
[
{
"from": "system",
"value": "Append after at end of initialize\n"
},
{
"from": "human",
"value": "_ = require 'underscore-plus'\n{View} = require 'atom'\n\nmodule.exports =\nclass PackageUpdatesStatusView extends View\n @content: ->\n @div class: 'inline-block text text-info', =>\n @... | coffeescript | chosen |
[
{
"from": "system",
"value": "Add push keybinding for atom\n"
},
{
"from": "human",
"value": "'atom-text-editor':\n 'ctrl-i': 'editor:auto-indent'\n'atom-text-editor':\n 'alt-s': 'editor:split-selection-into-lines'\n"
},
{
"from": "gpt",
"value": "'atom-text-editor':\n 'ctrl-i': '... | coffeescript | chosen |
[
{
"from": "system",
"value": ":penguin: Add ctrl-. keybinding on Linux\n"
},
{
"from": "human",
"value": "'.workspace .platform-darwin':\n 'cmd-.': 'key-binding-resolver:toggle'\n\n'.workspace .platform-win32':\n 'ctrl-.': 'key-binding-resolver:toggle'\n"
},
{
"from": "gpt",
"value... | coffeescript | chosen |
[
{
"from": "system",
"value": "Set this method to public\n"
},
{
"from": "human",
"value": "# Public: Here's a class.\nclass Foo\n # Here's a method, baz.\n baz: () -> 'baz'\n\n# Here is a method on Foo, called bar.\nFoo::bar = () -> 'bar'\n"
},
{
"from": "gpt",
"value": "# Public: ... | coffeescript | chosen |
[
{
"from": "system",
"value": "Revert \"trying history mode for gh-pages\"\n\nThis reverts commit dfcd5df36658335555caeebcae785bdc120fd976.\n"
},
{
"from": "human",
"value": "# Setup router\nimport Vue from 'vue'\nimport VueRouter from 'vue-router'\nVue.use VueRouter\n\n###\nRouting paths\n`/` ... | coffeescript | chosen |
[
{
"from": "system",
"value": "Add keybindings for windows and linux\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 basic keybinding... | coffeescript | chosen |
[
{
"from": "system",
"value": "Add preliminary sorting functionality to transactions controller"
},
{
"from": "human",
"value": "App.TransactionsController = Em.ArrayController.extend App.PagingMixin,\n needs: ['categories']\n perPage: 100\n itemController: 'transaction'\n init: ->\n @_sup... | coffeescript | chosen |
[
{
"from": "system",
"value": "Refactor the if conditional on show password JS\n"
},
{
"from": "human",
"value": "Neighborly.Devise ?= {}\nNeighborly.Devise.Registrations ?= {}\n\nNeighborly.Devise.Registrations.New =\n init: ->\n $('#show_password').change ->\n $input = $('#show_passwor... | coffeescript | chosen |
[
{
"from": "system",
"value": "Allow non-unique media to have their title changed globally\n"
},
{
"from": "human",
"value": "define [\n 'underscore'\n 'backbone'\n], (_, Backbone) ->\n\n return Backbone.Model.extend\n url: () -> return \"/api/content/#{ @id }\"\n mediaType: 'application... | coffeescript | chosen |
[
{
"from": "system",
"value": "Add \"permanent-delete\" package to Atom\n\nBecause Atom can't delete a file without OS trash. :(\n"
},
{
"from": "human",
"value": "packages: [\n \"autocomplete-emojis\"\n \"busy-signal\"\n \"editorconfig\"\n \"file-icons\"\n \"highlight-selected\"\n \"inten... | coffeescript | chosen |
[
{
"from": "system",
"value": "Fix _.string to _.str on recent server trim check\n"
},
{
"from": "human",
"value": "sendwithus = require '../sendwithus'\nutils = require '../lib/utils'\nerrors = require '../commons/errors'\nwrap = require 'co-express'\ndatabase = require '../commons/database'\npa... | coffeescript | chosen |
[
{
"from": "system",
"value": "Make draft mode regex global\n"
},
{
"from": "human",
"value": "fs = require \"fs\"\nlogger = require \"logger-sharelatex\"\n\nmodule.exports = DraftModeManager =\n\tinjectDraftMode: (filename, callback = (error) ->) ->\n\t\tfs.readFile filename, \"utf8\", (error, c... | coffeescript | chosen |
[
{
"from": "system",
"value": "Enable pretty HTML on development\n"
},
{
"from": "human",
"value": "express = require 'express'\nmongoose = require 'mongoose'\next_type = require 'connect-ext-type'\n{ createServer } = require 'http'\n{ join } = require 'path'\n\nmodule.exports = express().configu... | coffeescript | chosen |
[
{
"from": "system",
"value": "Use class instead of element\n"
},
{
"from": "human",
"value": "{Testing, expect, sinon, _, ReactTestUtils} = require 'shared/specs/helpers'\n{ChangeStudentIdForm} = require 'shared'\n\ndescribe 'ChangeStudentIdForm Component', ->\n\n beforeEach ->\n @props =\n ... | coffeescript | chosen |
[
{
"from": "system",
"value": "Update project lab to use new pages resource\n"
},
{
"from": "human",
"value": "React = require 'react'\nAutoSave = require '../../components/auto-save'\nhandleInputChange = require '../../lib/handle-input-change'\n\nmodule.exports = React.createClass\n displayName... | coffeescript | chosen |
[
{
"from": "system",
"value": "Allow backbone navigation from conversation index to user profile, in stead of letting the click be handled by the wholeElementClick\n"
},
{
"from": "human",
"value": "class window.ConversationItemView extends Backbone.Marionette.ItemView\n tagName: 'li'\n classNa... | coffeescript | chosen |
[
{
"from": "system",
"value": "Reorder expectations in trinary test suite\n\nThis matches the jasmine conventions, and makes error messages less\nconfusing.\n"
},
{
"from": "human",
"value": "Trinary = require './example'\n\ndescribe 'Trinary', ->\n\n it '1 is decimal 1', ->\n expect(1).toEqu... | coffeescript | chosen |
[
{
"from": "system",
"value": "Correct coffeescript syntax for events\n"
},
{
"from": "human",
"value": "$ ->\n if isOnPage 'eventplug-events', 'edit' or isOnPage 'eventplug-events', 'new'\n $(\"#event_date\").datepicker()\n\n opts =\n button: false\n\n editor = new EpicEditor(opts... | coffeescript | chosen |
[
{
"from": "system",
"value": "Change name of function isObject to isObejctOrArray\n\nMakes the flow more clear. Also added isArray function which returnes\ntrue only if passed an Array\n"
},
{
"from": "human",
"value": "\nisObject = require 'is-object'\nisFunction = require 'is-function'\n\n##... | coffeescript | chosen |
[
{
"from": "system",
"value": "Integrate grid clearing and add random background image.\n"
},
{
"from": "human",
"value": "button = require '../../button'\ngrid = require '../../grid'\nparser = require 'stout-client/parser'\n\n\nwindow.onload = ->\n parser.parse().then ->\n\n grid = $stout.... | coffeescript | chosen |
[
{
"from": "system",
"value": "Use long opts for readability\n"
},
{
"from": "human",
"value": "_ = require 'underscore'\nBufferedProcess = require 'buffered-process'\n$ = require 'jquery'\n\nmodule.exports =\nclass LoadPathsTask\n constructor: (@callback) ->\n\n start: ->\n rootPath = proje... | coffeescript | chosen |
[
{
"from": "system",
"value": "Change keymap according to upstream command changes\n"
},
{
"from": "human",
"value": "'atom-text-editor':\n 'alt-cmd-r': 'debugger:start-locally'\n 'alt-cmd-e': 'debugger:stop'\n 'alt-cmd-c': 'debugger:resume'\n 'alt-cmd-y': 'debugger:pause'\n 'f6': 'de... | coffeescript | chosen |
[
{
"from": "system",
"value": "Use poi-plugin-translator to translate ships and items\n"
},
{
"from": "human",
"value": "require 'coffee-react/register'\nrequire \"#{ROOT}/views/env\"\n\ni18n = require './node_modules/i18n'\n{join} = require 'path-extra'\n\ni18n.configure\n locales: ['en-US', 'j... | coffeescript | chosen |
[
{
"from": "system",
"value": "Make it possible to not recurse through dir.\n"
},
{
"from": "human",
"value": "fs = require 'fs'\npath = require 'path'\n\nvm = require './vm'\nwalk = require './walk'\n{parseArgs} = require './utils'\n\n\nmodule.exports = parseArgs (basePath, opts, cb) ->\n {... | coffeescript | chosen |
[
{
"from": "system",
"value": "Fix dateFormat directive to accept string model values.\n"
},
{
"from": "human",
"value": "angular\n.module('angular-w')\n.directive('dateFormat', ['dateFilter', (dateFilter)->\n restrict: 'A'\n require: 'ngModel'\n link: (scope, element, attrs, ngModel)->\n n... | coffeescript | chosen |
[
{
"from": "system",
"value": "Fix test, no more menu on header.\n"
},
{
"from": "human",
"value": "\ndescribe 'Laere Module', ->\n\n # load the controller's module\n beforeEach module 'laere'\n\n HeaderController = scope = null\n\n # Initialize the controller and a mock scope\n beforeEach i... | coffeescript | chosen |
[
{
"from": "system",
"value": "Change all attributes of current unit when another unit is selected\n"
},
{
"from": "human",
"value": "class Langtrainer.LangtrainerApp.Views.UnitSelector extends Backbone.View\n _.extend(@prototype, Langtrainer.LangtrainerApp.Views.Extensions.Localized)\n\n templ... | coffeescript | chosen |
[
{
"from": "system",
"value": "Make sure new/edit exists before calling them on create/update.\n"
},
{
"from": "human",
"value": "window.App ||= {}\nclass App.Base\n\n constructor: ->\n return this\n\n\n create: ->\n $this.new()\n return\n\n\n update: ->\n $this.edit()\n return"... | coffeescript | chosen |
[
{
"from": "system",
"value": "Use isFileSync instead of existsSync\n"
},
{
"from": "human",
"value": "url = require 'url'\nfs = require 'fs-plus'\n\nMarkdownPreviewView = require './markdown-preview-view'\n\nmodule.exports =\n activate: ->\n atom.workspaceView.command 'markdown-preview:show'... | coffeescript | chosen |
[
{
"from": "system",
"value": "Add use strict atom snippet\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 create a new snippet... | coffeescript | chosen |
[
{
"from": "system",
"value": "Make sure to not suppress errors.\n"
},
{
"from": "human",
"value": "Promise = require 'zousan'\n\nPromise.suppressUncaughtRejectionError = true\n\nclass PromiseInspection\n constructor: ({@state, @value, @reason}) ->\n\n isFulfilled: ->\n @state is 'fulfilled'... | coffeescript | chosen |
[
{
"from": "system",
"value": "RabbitMQ: Read total number of messages instead of those in queue\n\nReduces issue where workers were being shut down when they had\nwork in progress: the messages went back to queue and then had\nto start up more workers again.\nEspecially painful for min=0 roles.\nWill cause ... | coffeescript | chosen |
[
{
"from": "system",
"value": "Add event parameter to popover click event\n"
},
{
"from": "human",
"value": "$(document).on 'ready page:load', ->\n \n $(\"a.popover\").click ->\n event.preventDefault()\n popover_src = $(this).children(\"img\").attr(\"data-src\")\n popover_caption = $(t... | coffeescript | chosen |
[
{
"from": "system",
"value": "Stop execution on rebuild if one command fails\n\nBefore, the callback was called with an error but execution continued on.\n"
},
{
"from": "human",
"value": "gyp = require('node-gyp')()\n\n# The first two arguments are apparently necessary as else nopt won’t includ... | coffeescript | chosen |
[
{
"from": "system",
"value": "Revert back to production posts\n"
},
{
"from": "human",
"value": "#\n# Using [\"The Twelve-Factor App\"](http://12factor.net/) as a reference all\n# environment configuration will live in environment variables. This file\n# simply lays out all of those environment ... | coffeescript | chosen |
[
{
"from": "system",
"value": "Add more phrases to ping hubot\n"
},
{
"from": "human",
"value": "# Hubot is very attentive\n\nmodule.exports = (robot) ->\n name_regex = new RegExp(\"#{robot.name}\\\\?$\", \"i\")\n\n robot.hear name_regex, (msg) ->\n msg.reply \"Yes, master?\"\n"
},
{
... | coffeescript | chosen |
[
{
"from": "system",
"value": "Fix dirty tracking after save"
},
{
"from": "human",
"value": "ETahi.ManuscriptManagerTemplateEditController = Ember.ObjectController.extend\n dirty: false\n\n paperTypes: (->\n @get('journal.paperTypes')\n ).property('journal.paperTypes.@each')\n\n sortedPha... | coffeescript | chosen |
[
{
"from": "system",
"value": "Fix permalink reformat to wait for link to load if its the first time the page opened\n"
},
{
"from": "human",
"value": "$ ->\n\t$(\"*[data-umlaut-toggle-permalink]\").click (event) ->\n\t\toriginalLink = $(this)\n\t\tvalueContainer = $(\"#umlaut-permalink-contain... | coffeescript | chosen |
[
{
"from": "system",
"value": "Hide detailed observation fields by default.\n"
},
{
"from": "human",
"value": "$ = jQuery\n$ ->\n current_jd = +$(\"#current-jd\").text()\n $(\"#id_jd\").val(current_jd)\n"
},
{
"from": "gpt",
"value": "$ = jQuery\n$ ->\n current_jd = +$(\"#cur... | coffeescript | chosen |
[
{
"from": "system",
"value": "Support providing a defaultLevel when in logger factory\n"
},
{
"from": "human",
"value": "class LoggerFactory\r\n\r\n instance = null\r\n @get: ->\r\n instance ?= new LoggerFactory\r\n\r\n createLogger: (namespace)->\r\n log.debug 'LoggerFactory.createLogg... | coffeescript | chosen |
[
{
"from": "system",
"value": "Check for new slides after every cycle\n"
},
{
"from": "human",
"value": "storage = require 'node-persist'\nstorage.initSync()\nconfig = storage.getItemSync 'config'\n\nmodule.exports =\n getConfig: ->\n defaultDelay: 3\n defaultDuration: 0.5\n defaultTran... | coffeescript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.