Instruction
stringlengths
14
778
input_code
stringlengths
0
4.24k
output_code
stringlengths
1
5.44k
Add Atom ruby-test preferred spec framework
"*": "atom-ctags": {} "autocomplete-plus": enableAutoActivation: false core: audioBeep: false disabledPackages: [ "exception-reporting" ] ignoredNames: [ ".bundle" ".git" "log" "repositories" "tmp" ] themes: [ "atom-dark-ui" "solarized-da...
"*": "atom-ctags": {} "autocomplete-plus": enableAutoActivation: false core: audioBeep: false disabledPackages: [ "exception-reporting" ] ignoredNames: [ ".bundle" ".git" "log" "repositories" "tmp" ] themes: [ "atom-dark-ui" "solarized-da...
Fix spec file to enable --force-exclusion option in RuboCop
Rubocop = require '../../lib/linter/rubocop' describe 'Rubocop', -> rubocop = null beforeEach -> rubocop = new Rubocop('/path/to/target.rb') describe 'buildCommand', -> originalRubocopPath = atom.config.get('atom-lint.rubocop.path') afterEach -> atom.config.set('atom-lint.rubocop.path', orig...
Rubocop = require '../../lib/linter/rubocop' describe 'Rubocop', -> rubocop = null beforeEach -> rubocop = new Rubocop('/path/to/target.rb') describe 'buildCommand', -> originalRubocopPath = atom.config.get('atom-lint.rubocop.path') afterEach -> atom.config.set('atom-lint.rubocop.path', orig...
Check if pretender is available
{fork} = require('child_process') prerenderUrl = 'http://127.0.0.1:' + (process.env.PORT or 3000) module.exports = (app) -> # Start up prerender server child = fork('server/prerender/server') process.on 'exit', -> child.kill() # Set up Prerender middleware and link to server middleware = require('preren...
{fork} = require('child_process') prerenderUrl = 'http://127.0.0.1:' + (process.env.PORT or 3000) module.exports = (app) -> # Check if Prerender is available try require.resolve('prerender') require.resolve('prerender-node') catch return # Start up prerender server child = fork('server/prerender...
Fix bug in fetch-mock that breaks custom Promise usage
_ = require('lodash') Promise = require('bluebird') IS_BROWSER = window? if (IS_BROWSER) # The browser mock assumes global fetch prototypes exist realFetchModule = require('fetch-ponyfill')({ Promise }) global.Promise = Promise global.Headers = realFetchModule.Headers global.Request = realFetchModule.Request gl...
_ = require('lodash') Promise = require('bluebird') IS_BROWSER = window? if (IS_BROWSER) # The browser mock assumes global fetch prototypes exist realFetchModule = require('fetch-ponyfill')({ Promise }) global.Promise = Promise global.Headers = realFetchModule.Headers global.Request = realFetchModule.Request gl...
Use the undocumented cookies api
passport = require 'passport' debug = require('debug')('meshblu-google-authenticator:routes') url = require 'url' class Router constructor: (@app) -> register: => @app.get '/', (request, response) => response.status(200).send status: 'online' @app.get '/login', @storeCallbackUrl, passport.authenticate '...
passport = require 'passport' debug = require('debug')('meshblu-google-authenticator:routes') url = require 'url' class Router constructor: (@app) -> register: => @app.get '/', (request, response) => response.status(200).send status: 'online' @app.get '/login', @storeCallbackUrl, passport.authenticate '...
Use the new CoveringView API in MergeConflict.
MergeConflictsView = require './merge-conflicts-view' SideView = require './side-view' NavigationView = require './navigation-view' Conflict = require './conflict' module.exports = activate: (state) -> atom.workspaceView.command "merge-conflicts:detect", -> MergeConflictsView.detect() atom.workspaceV...
MergeConflictsView = require './merge-conflicts-view' SideView = require './side-view' NavigationView = require './navigation-view' Conflict = require './conflict' module.exports = activate: (state) -> atom.workspaceView.command "merge-conflicts:detect", -> MergeConflictsView.detect() atom.workspaceV...
Add disable select_users when public is false
$ -> $('.reminder_active').on 'change', -> $('.reminder_days_before').prop "disabled", !@.checked select2_options = theme: 'bootstrap' placeholder: 'Selecione os usuários' maximumSelectionLength: 7 $('.select_users').select2 select2_options $('.js-account').click (e)-> path = '/main_accou...
$ -> $('.reminder_active').on 'change', -> $('.reminder_days_before').prop "disabled", !@.checked $('.public').on 'change', -> $('.select_users').prop "disabled", !@.checked select2_options = theme: 'bootstrap' placeholder: 'Selecione os usuários' maximumSelectionLength: 7 $('.select_user...
Delete white spaces at end of file
kd = require 'kd' KDCustomHTMLView = kd.CustomHTMLView KodingSwitch = require 'app/commonviews/kodingswitch' CustomLinkView = require 'app/customlinkview' module.exports = class IDEChatHeadWatchItemView extends KDCustomHTMLView constructor: (options = {}, data) -> options.partial ?= 'Watch' super options, ...
kd = require 'kd' KDCustomHTMLView = kd.CustomHTMLView KodingSwitch = require 'app/commonviews/kodingswitch' CustomLinkView = require 'app/customlinkview' module.exports = class IDEChatHeadWatchItemView extends KDCustomHTMLView constructor: (options = {}, data) -> options.partial ?= 'Watch' super options, ...
Adjust minutes and seconds counters to have a zero on the left when they are less than 10.
'use strict' @start = (limit) -> window.startDate = new Date().getTime() window.elapsedSeconds = 0 window.seconds = 0 window.minutes = 0 window.limit = limit window.timerID = setInterval(timeCounter, 1000) return @stop = -> clearInterval timerID return timeCounter = -> if elapsedSeconds >= limit ...
'use strict' @start = (limit) -> window.startDate = new Date().getTime() window.elapsedSeconds = 0 window.seconds = 0 window.minutes = 0 window.limit = limit window.timerID = setInterval(timeCounter, 1000) return @stop = -> clearInterval timerID return timeCounter = -> if elapsedSeconds >= limit ...
Fix "How did you hear about The Queen's Awards?" conditional JS
jQuery -> ($ '#account-next-step').on 'click', (e) -> do e.preventDefault do ($ '#account-form').submit if ($ '#user_qae_info_source_other').length toggleOther = (checkbox) -> if checkbox.is(':checked') ($ '#qae_info_source_other').removeClass('visuallyhidden') else ($ '#qae...
jQuery -> ($ '#account-next-step').on 'click', (e) -> do e.preventDefault do ($ '#account-form').submit if $('#user_qae_info_source').size() > 0 toggleOther = (select) -> if select.val() == 'other' ($ '#qae_info_source_other').removeClass('visuallyhidden') else ($ '#qae_info...
Use constructor instead of init
class window.DP.Realtime init: -> if typeof Pusher == 'function' @pusher = new Pusher(DP.PUSHER_KEY) @channel = @pusher.subscribe DP.Round.url @channel.bind('new:charge', _.bind(@newCharge, this)) console.log(["Subscribing to real-time", @pusher, @channel]) newCharge: -> console.log...
class window.DP.Realtime constructor: -> if typeof Pusher == 'function' @pusher = new Pusher(DP.PUSHER_KEY) @channel = @pusher.subscribe DP.Round.url @channel.bind('new:charge', _.bind(@newCharge, this)) console.log(["Subscribing to real-time", @pusher, @channel]) newCharge: -> cons...
Save sequence if location.search exists
$ -> saveSequence = (sequence) -> if sequence? localStorage.setItem('sequence', sequence) true loadSequence = -> localStorage.getItem('sequence') input = $("input#fragment") button = $("#methods button") sequence = loadSequence() if sequence? input.val(sequence) unless win...
$ -> saveSequence = (sequence) -> if sequence? localStorage.setItem('sequence', sequence) true loadSequence = -> localStorage.getItem('sequence') button = $("#methods button") input = $("input#fragment") $(window).on "load", (e) -> search = window.location.search if search ...
Fix for executing PHP on Windows
child_process = require 'child_process' module.exports = activate: (state) -> atom.commands.add 'atom-workspace', 'wp-phptidy:run': => @run() run: -> editor = atom.workspace.getActivePaneItem() editor.save() file = editor?.buffer.file filepath = file?.path if filepath.length child_process.exec(__...
child_process = require 'child_process' module.exports = activate: (state) -> atom.commands.add 'atom-workspace', 'wp-phptidy:run': => @run() run: -> editor = atom.workspace.getActivePaneItem() editor.save() file = editor?.buffer.file filepath = file?.path if filepath.length child_process.exec('p...
Increase contrast of mine agains background
Crafty.c 'Mine', init: -> @requires 'Color, Enemy' mine: (attr = {}) -> @attr _.defaults(attr, w: 25, h: 25, health: 200) @origin 'center' @color '#555555' @enemy() this
Crafty.c 'Mine', init: -> @requires 'Color, Enemy' mine: (attr = {}) -> @attr _.defaults(attr, w: 25, h: 25, health: 200) @origin 'center' @color '#111111' @enemy() this
Fix bug - yellows last move not displayed when he wins
window.Game = class Game constructor: (grid, moves, status, winner) -> console.log 'Game ctor' @gameBoard = new GameBoard($('#canvas'), $('#canvasOverlay'), { grid: grid, moves: moves, winner: winner, afterMoveAnimation: $.proxy(this.afterMove, this) }) @setFinished(winner) if ...
window.Game = class Game constructor: (grid, moves, status, winner) -> console.log 'Game ctor' @gameBoard = new GameBoard($('#canvas'), $('#canvasOverlay'), { grid: grid, moves: moves, winner: winner, afterMoveAnimation: $.proxy(this.afterMove, this) }) @setFinished(winner) if ...
Change darts-ui size to fit screen
'use strict' class Game constructor: -> peer = new Peer 'server', {host: 'localhost', port: 9999} conn = peer.connect 'device' conn.on 'open', => conn.send 'Conneced.' conn.on 'data', (id) => console.log id @resizeWindow() $(window).resize ...
'use strict' class Game constructor: -> peer = new Peer 'server', {host: 'localhost', port: 9999} conn = peer.connect 'device' conn.on 'open', => conn.send 'Conneced.' conn.on 'data', (id) => console.log id @resizeWindow() $(window).resize ...
Initialize can be implemented instead of implementing the constructor on a layer. Meaning super isn't required.
window.Echotron ||= {} Echotron.Echoes ||= {} Echotron.Echoes.foreground ||= [] Echotron.Echoes.midground ||= [] Echotron.Echoes.background ||= [] class Echotron.Echo extends THREE.Object3D uniformAttrs: {} # Override, calling super. Setup your Echo however you need. constructor: -> super @active = yes...
window.Echotron ||= {} Echotron.Echoes ||= {} Echotron.Echoes.foreground ||= [] Echotron.Echoes.midground ||= [] Echotron.Echoes.background ||= [] class Echotron.Echo extends THREE.Object3D uniformAttrs: {} # Override, calling super. Setup your Echo however you need. constructor: -> super @active = yes...
Add command to automatically install extensions.
program = require 'commander' program .command('new [name]') .description('create a new app and/or extension') .usage('[name] [options]') .option('-t, --template [name]', 'template to use') .option('-c, --config [config file]', 'config file to use') .action (name, opts={}) -> if not name return c...
program = require('commander') .version(require('../package.json').version) help = -> console.log program.helpInformation() program .command('new [name]') .description('create a new app and/or extension') .usage('[name] [options]') .option('-t, --template [name]', 'template to use') .option('-c, --config ...
Fix the console logging from invalid json
module.exports.listen = (port) -> createApp().listen port createApp = () -> express = require 'express' bodyParser = require 'body-parser' errors = require './errors' allowCrossDomain = (request, response, next) -> response.header 'Access-Control-Allow-Origin', '*' response.header( 'Access-Con...
module.exports.listen = (port) -> createApp().listen port createApp = () -> express = require 'express' bodyParser = require 'body-parser' errors = require './errors' allowCrossDomain = (request, response, next) -> response.header 'Access-Control-Allow-Origin', '*' response.header( 'Access-Con...
Change JSX default beautifier back to Pretty Diff
module.exports = { name: "JSX" namespace: "jsx" fallback: ['js'] ### Supported Grammars ### grammars: [ "JSX" "JavaScript (JSX)" "Babel ES6 JavaScript" "JavaScript with JSX" ] ### Supported extensions ### extensions: [ "jsx", "js" ] defaultBeautifier: "JS Beautify...
module.exports = { name: "JSX" namespace: "jsx" fallback: ['js'] ### Supported Grammars ### grammars: [ "JSX" "JavaScript (JSX)" "Babel ES6 JavaScript" "JavaScript with JSX" ] ### Supported extensions ### extensions: [ "jsx", "js" ] defaultBeautifier: "Pretty Diff...
Prepend newly enabled themes, not append
AtomPackage = require './atom-package' Package = require './package' ### Internal: Loads and resolves packages. ### module.exports = class ThemePackage extends AtomPackage getType: -> 'theme' getStylesheetType: -> 'theme' enable: -> atom.config.pushAtKeyPath('core.themes', @metadata.name) disable: -> ...
AtomPackage = require './atom-package' Package = require './package' ### Internal: Loads and resolves packages. ### module.exports = class ThemePackage extends AtomPackage getType: -> 'theme' getStylesheetType: -> 'theme' enable: -> themes = atom.config.get('core.themes') themes = [@metadata.name].co...
Add an empty line to separate methods
React = require 'react' {PureRenderMixin} = require('react/addons').addons cx = require 'classname' styleMixin = require 'mixins/style-mixin' module.exports = React.createClass mixins: [ styleMixin require('./style.scss') PureRenderMixin ] getIconTypeClass: -> i...
React = require 'react' {PureRenderMixin} = require('react/addons').addons cx = require 'classname' styleMixin = require 'mixins/style-mixin' module.exports = React.createClass mixins: [ styleMixin require('./style.scss') PureRenderMixin ] getIconTypeClass: -> i...
Enforce order of build tasks.
gulp = require 'gulp' coffee = require 'gulp-coffee' concat = require 'gulp-concat' gutil = require 'gulp-util' uglify = require 'gulp-uglify' wrap = require 'gulp-wrap-umd' gulp.task 'build', -> sink = concat('main.js') gulp.src('lib/base64-binary.js') .pipe(sink, end: false) gulp.src('src/validateSSH.coffee'...
gulp = require 'gulp' coffee = require 'gulp-coffee' concat = require 'gulp-concat' gutil = require 'gulp-util' uglify = require 'gulp-uglify' wrap = require 'gulp-wrap-umd' gulp.task 'caffeinate', -> gulp.src('src/*.coffee') .pipe(coffee(bare: true)).on('error', gutil.log) .pipe(gulp.dest('./tmp/build')) gulp...
Add snippet for inserting a vanilla code-block
'.text.restructuredtext': 'image': 'prefix': 'image' 'body': '.. image:: ${1:path}\n$0' 'link': 'prefix': 'link' 'body': '\\`${1:Title} <${2:http://link}>\\`_$0' 'section 1': 'prefix': 'sec' 'body': '${1:subsection name}\n================$0\n' 'section 2': 'prefix': 'subs' 'body'...
'.text.restructuredtext': 'image': 'prefix': 'image' 'body': '.. image:: ${1:path}\n$0' 'link': 'prefix': 'link' 'body': '\\`${1:Title} <${2:http://link}>\\`_$0' 'section 1': 'prefix': 'sec' 'body': '${1:subsection name}\n================$0\n' 'section 2': 'prefix': 'subs' 'body'...
Make graphs <-> series mapping use naturalOrder too
class PG.Legend defaults: className: "legend" constructor: (container, @graphs, options) -> @container = $(container) @options = $.extend @defaults, options @element = $("<div></div>").addClass(@options.className) @container.append @element @legend = new Rickshaw.Graph.Legend graph:...
class PG.Legend defaults: className: "legend" constructor: (container, @graphs, options) -> @container = $(container) @options = $.extend @defaults, options @element = $("<div></div>").addClass(@options.className) @container.append @element @legend = new Rickshaw.Graph.Legend graph:...
Make the easing smoother at the end
# Place all the behaviors and hooks related to the matching controller here. # All this logic will automatically be available in application.js. # You can use CoffeeScript in this file: http://coffeescript.org/ roundUpBy = (value, round_to) -> return round_to * Math.ceil(value / round_to) $ -> metricsInview = new...
# Place all the behaviors and hooks related to the matching controller here. # All this logic will automatically be available in application.js. # You can use CoffeeScript in this file: http://coffeescript.org/ roundUpBy = (value, round_to) -> return round_to * Math.ceil(value / round_to) $ -> metricsInview = new...
Implement global selection in relations table from New Chapter
window.App ||= {} App.Visualization = require './visualization.js' App.Story = require './story.js' App.Trix = require 'script!trix' $(document).ready -> # Activate tooltips $('[data-toggle="tooltip"]').tooltip() $body = $('body') # visualizations if $body.hasClass 'visualizations' #...
window.App ||= {} App.Visualization = require './visualization.js' App.Story = require './story.js' App.Trix = require 'script!trix' $(document).ready -> $body = $('body') # visualizations if $body.hasClass 'visualizations' # /visualizations/:id # /visualizations/:id/edit appVisua...
Support for merging multiple properties into one
noflo = require "noflo" class DuplicateProperty extends noflo.Component constructor: -> @properties = {} @inPorts = property: new noflo.ArrayPort() in: new noflo.Port() @outPorts = out: new noflo.Port() @inPorts.property.on "data", (data) => ...
noflo = require "noflo" class DuplicateProperty extends noflo.Component constructor: -> @properties = {} @separator = '/' @inPorts = property: new noflo.ArrayPort() separator: new noflo.Port() in: new noflo.Port() @outPorts = out: new...
Throw an error if sending to an unattached port
events = require "events" class Port extends events.EventEmitter constructor: (name) -> @name = name @socket = null @from = null attach: (socket) -> throw new Error "#{@name}: Socket already attached #{@socket.getId()} - #{socket.getId()}" if @socket @socket = socket ...
events = require "events" class Port extends events.EventEmitter constructor: (name) -> @name = name @socket = null @from = null attach: (socket) -> throw new Error "#{@name}: Socket already attached #{@socket.getId()} - #{socket.getId()}" if @socket @socket = socket ...
Add to window when in the browser, listen for blur
$.fn.edit = -> form = new Phalange( el: @ ) @ class Phalange extends Backbone.View initialize: -> @text = @$el.text() events: "click": "append" "submit": "submit" "blur": "submit" submit: -> @text = @_input().val() @$el.trigger 'phalange:submit', @text @hideForm() @setText()...
$.fn.edit = -> form = new Phalange( el: @ ) @ class Phalange extends Backbone.View initialize: -> @text = @$el.text() events: "click": "append" "submit": "submit" "blur input": "submit" submit: -> @text = @_input().val() @$el.trigger 'phalange:submit', @text @hideForm() @set...
Use AceView which is bundled editor of Koding for EditorPane.
class EditorPane extends Pane constructor: (options = {}, data) -> options.cssClass = KD.utils.curry "editor-pane", options.cssClass super options, data @createEditor() createEditor: -> {file, content} = @getOptions() isLocalFile = no unless file instanceof FSFile return new ...
class EditorPane extends Pane constructor: (options = {}, data) -> options.cssClass = KD.utils.curry "editor-pane", options.cssClass super options, data @createEditor() createEditor: -> {file, content} = @getOptions() isLocalFile = no unless file instanceof FSFile return new ...
Fix for photo grid overlap
$(document).ready -> # Photo grid photoGrid = $(".photo-grid") photoGrid.on "reload:grid", -> opts = wookmarkOptions(calculateGridWidth()) photoGrid.find(".photo, .user-block").wookmark(opts) photoGrid.trigger "reload:grid" $(window).resize -> photoGrid.trigger "reload:grid" # Description siz...
$(document).ready -> # Photo grid photoGrid = $(".photo-grid") photoGrid.on "reload:grid", -> opts = wookmarkOptions(calculateGridWidth()) photoGrid.find(".photo, .user-block").wookmark(opts) photoGrid.imagesLoaded -> photoGrid.trigger "reload:grid" $(window).resize -> photoGrid.trigger "rel...
Use instance method instead static method.
CSV = require('csv') Q = require('q') argv = require('optimist') .usage('Usage: $0 --types product-types.csv --attributes product-types-attributes.csv') .demand(['types', 'attributes']) .argv ProductTypeGenerator = require('../main').ProductTypeGenerator ### Reads a CSV file by given path and returns a promise...
CSV = require('csv') Q = require('q') argv = require('optimist') .usage('Usage: $0 --types product-types.csv --attributes product-types-attributes.csv') .demand(['types', 'attributes']) .argv ProductTypeGenerator = require('../main').ProductTypeGenerator ### Reads a CSV file by given path and returns a promise...
Call https api if we are on https
import fetch from 'isomorphic-fetch'; port = (process.env.OPENSHIFT_NODEJS_PORT || process.env.PORT || '3000') ip = (process.env.OPENSHIFT_NODEJS_IP || '127.0.0.1') export API_URL = (if (typeof window == 'undefined') then ('http://' + ip + ':' + port) else '') + '/api/' export callApiWithBody = (endpoint, method, hea...
import fetch from 'isomorphic-fetch'; port = (process.env.OPENSHIFT_NODEJS_PORT || process.env.PORT || '3000') ip = (process.env.OPENSHIFT_NODEJS_IP || '127.0.0.1') protocol = (if process.env.FORCE_HTTPS then 'https' else 'http') export API_URL = (if (typeof window == 'undefined') then (protocol + '://' + ip + ':' + p...
Add link to home for 404 page.
goog.provide 'app.react.pages.NotFound' class app.react.pages.NotFound ###* @constructor ### constructor: -> {div,h1,p} = React.DOM @create = React.createClass render: -> div className: 'notfound', h1 null, "This page isn't available" p null, "The link may be brok...
goog.provide 'app.react.pages.NotFound' class app.react.pages.NotFound ###* @param {app.Routes} routes @param {app.react.Touch} touch @constructor ### constructor: (routes, touch) -> {div,h1,p} = React.DOM {a} = touch.none 'a' @create = React.createClass render: -> div cl...
Add handler to invoke feedback modal
openMultiPageModal = require '../../../components/multi_page_modal/index.coffee' SpecialistView = require '../../../components/contact/general_specialist.coffee' module.exports.init = -> $('.js-contact-specialist').click (e) -> e.preventDefault() new SpecialistView $('.js-multi-page-modal').click (e) -> ...
openMultiPageModal = require '../../../components/multi_page_modal/index.coffee' SpecialistView = require '../../../components/contact/general_specialist.coffee' FeebackView = require '../../../components/contact/feedback.coffee' module.exports.init = -> $('.js-contact-specialist').click (e) -> e.preventDefault(...
Adjust initialization for this being the matched element's ElementWrapper
# Copyright 2012 The Apache Software Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http:#www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
# Copyright 2012 The Apache Software Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http:#www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
Use jQuery "on" for event hook.
$ -> $('#currency').change -> $.ajax( type: 'POST' url: $(this).data('href') data: currency: $(this).val() ).done -> window.location.reload()
$ -> $('#currency').on 'change', -> $.ajax( type: 'POST' url: $(this).data('href') data: currency: $(this).val() ).done -> window.location.reload()
Update Validators to pass Instances instead of references
ValidationMixin = getInitialState: -> validationErrors: [] hasErrors: false componentDidMount: -> if @props.validators @loadValidators() loadValidators: -> @validators = _.map @props.validators, (options, name) => new window.validators[name].constructor(options) validate: (value, ...
ValidationMixin = getInitialState: -> validationErrors: [] hasErrors: false validate: (value, callback) -> if @props.validators newErrors = _.map @props.validators, (validator) => validator.validate value, @props.displayName # There is probably a better way to do this newErro...
Handle constructor.name being undefined in ViewBinding.
#= require ./abstract_binding class Batman.DOM.ViewBinding extends Batman.DOM.AbstractBinding skipChildren: true onlyObserve: Batman.BindingDefinitionOnlyObserve.Data constructor: (definition) -> @superview = definition.view super dataChange: (viewClassOrInstance) -> return unless viewClassOrIns...
#= require ./abstract_binding class Batman.DOM.ViewBinding extends Batman.DOM.AbstractBinding skipChildren: true onlyObserve: Batman.BindingDefinitionOnlyObserve.Data constructor: (definition) -> @superview = definition.view super dataChange: (viewClassOrInstance) -> return unless viewClassOrIns...
Update test instance AMI identifier
module.exports = current: 'ami-bf235ad5' # Ordered by creation date list: [ 'ami-5dd50436' 'ami-bf235ad5' ]
module.exports = current: 'ami-4d552d27' # Ordered by creation date list: [ 'ami-5dd50436' 'ami-bf235ad5' 'ami-4d552d27' ]
Fix options passed to microflo-emscripten
microflo = (target) -> build = [ "make -f ./node_modules/microflo-emscripten/Makefile" target "BUILD_DIR=build" "MICROFLO=./node_modules/.bin/microflo" "GRAPH=graph.fbp" "MICROFLO_SOURCE_DIR=`pwd`/node_modules/microflo/microflo" "LIBRARY=`pwd`/components/ardu...
microflo = (target) -> build = [ "make -f ./node_modules/microflo-emscripten/Makefile" target "BUILD_DIR=build" "MICROFLO=./node_modules/.bin/microflo" "GRAPH=graph.fbp" "MICROFLO_SOURCE_DIR=`pwd`/node_modules/microflo/microflo" "PROJECT_DIR=`pwd`/node_module...
Test duplicate prevention when copying
describe "Lanes.Models.Collection", -> it "it triggers promise on loading", (done) -> Model = Lanes.Test.defineModel props: { id: 'integer', title: 'string' } LT.syncSucceedWith([ { id: 1, title: 'first value' } { id: 2, title: 'second value' } ]) ...
describe "Lanes.Models.Collection", -> it "it triggers promise on loading", (done) -> Model = Lanes.Test.defineModel props: { id: 'integer', title: 'string' } LT.syncSucceedWith([ { id: 1, title: 'first value' } { id: 2, title: 'second value' } ]) ...
Store initial machine turn on state in AppStorage
kd = require 'kd' nick = require 'app/util/nick' Tracker = require 'app/util/tracker' module.exports = (machine) -> return unless analytics return unless typeof analytics.user is 'function' { initialTurnOn } = analytics.user().traits() return if initialTurnOn initialTurnOn = yes analytics.iden...
kd = require 'kd' nick = require 'app/util/nick' Tracker = require 'app/util/tracker' module.exports = (machine) -> fetchStorage (storage) -> turnedOnMachine = storage.getValue 'TurnedOnMachine' return if turnedOnMachine storage.setValue 'TurnedOnMachine', yes execute machine fetchStora...
Use Q nbind to make this cleaner
Q = require 'q' # Provides a set of methods for voting data CRUD operations class API constructor: (@db) -> throw "must provide db connection" unless @db createUser: (name) -> # Q.nfcall( # @db.models.User.create, # name: name # ) # @db.models.User.create({ # name: name # },...
Q = require 'q' # Provides a set of methods for voting data CRUD operations class API constructor: (@db) -> throw "must provide db connection" unless @db @models = @db.models createUser: (name) -> create = Q.nbind( @models.User.create, @models.User ) create name: name incrementV...
Use disposable returned from atom.commands.add
{toggleQuotes} = require 'toggle-quotes' {CompositeDisposable} = require 'atom' module.exports = config: quoteCharacters: type: 'string' default: '"\'' activate: -> @subscriptions.add atom.commands.add 'atom-text-editor', 'toggle-quotes:toggle', -> if editor = atom.workspace.getActiveTex...
{toggleQuotes} = require 'toggle-quotes' module.exports = config: quoteCharacters: type: 'string' default: '"\'' activate: -> @subscription = atom.commands.add 'atom-text-editor', 'toggle-quotes:toggle', -> if editor = atom.workspace.getActiveTextEditor() toggleQuotes(editor) ...
Fix problems with initial tooltip code
# tool tips d3panels.tooltip_create = (selection, options) -> selection.append("div") .attr("class", "d3panels-tooltip") .style("opacity", 0) d3panels.tooltip_activate = (objects, tipdiv, options) -> objects.on("mouseover", (d) -> tipdiv.html(d.tooltip) h = tipd...
# tool tips d3panels.tooltip_create = (selection, options) -> d3.select("body").append("div") .attr("class", "d3panels-tooltip #{options.tipclass}") .style("opacity", 1) d3panels.tooltip_activate = (objects, tipdiv, options, tooltip_func) -> objects.on("mouseover.d3panels-tooltip", ...
Remove whitespace and unnecessary parens
avatarResponder = require('./avatar_responder') Campfire.Transcript.messageTemplates = require('./message_templates') window.Chicisimo = Responders: [] Campfire.USER_ACTIONS = ['enter','leave','kick','conference_created','lock','unlock','topic_change','allow_guests','disallow_guests'] swizzle(Campfire.Message, { ...
avatarResponder = require('./avatar_responder') Campfire.Transcript.messageTemplates = require('./message_templates') window.Chicisimo = Responders: [] Campfire.USER_ACTIONS = ['enter','leave','kick','conference_created','lock','unlock','topic_change','allow_guests','disallow_guests'] swizzle(Campfire.Message, { ...
Remove id "card-element" as well
angular.module('admin.payments').directive "stripeElements", ($injector, AdminStripeElements) -> restrict: 'E' template: "<label for='card-element'>\ <div id='card-element' class='card-element'></div>\ <div class='error card-errors'></div>\ </label>" scope: selected: "="...
angular.module('admin.payments').directive "stripeElements", ($injector, AdminStripeElements) -> restrict: 'E' template: "<div >\ <div class='card-element'></div>\ <div class='error card-errors'></div>\ </div>" scope: selected: "=" link: (scope, elem, attr)-> if...
Add support for new inline code format
'name': 'Weave.jl markdown' scopeName: 'source.weave.md' 'fileTypes': [ 'jmd' 'jmdw' 'mdw' ] patterns: [ { 'include' : 'source.weave.noweb' } { 'begin': '^([`~]{3,})(\\{|\\{\\.|)(julia)(;|)\\s*(.*?)(\\}|)\\s*$' 'beginCaptures': '1': 'name': 'markup.heading.weave.md' '...
'name': 'Weave.jl markdown' 'scopeName' : 'source.weave.md' 'fileTypes': [ 'jmd' 'jmdw' 'mdw' ] 'patterns': [ { 'include' : 'source.weave.noweb' } { 'begin': '^([`~]{3,})(\\{|\\{\\.|)(julia)(;|)\\s*(.*?)(\\}|)\\s*$' 'beginCaptures': '1': 'name': 'markup.heading.weave.md' ...
Add list of 'batteries included' for demo page
Link = require('react-router').Link module.exports = React.createClass displayName: 'HelloWorld' render: -> <div> <h1>Hello world!</h1> <p>You're looking at the <a href="https://github.com/KyleAMathews/coffee-react-quickstart">Coffeescript React Quickstart</a> project by <a href="https://twitter.co...
Link = require('react-router').Link module.exports = React.createClass displayName: 'HelloWorld' render: -> <div> <h1>Hello world!</h1> <p>You're looking at the <a href="https://github.com/KyleAMathews/coffee-react-quickstart">Coffeescript React Quickstart</a> project by <a href="https://twitter.co...
Update document search usage in taxon concept's page
Species.TaxonConceptDocumentsRoute = Ember.Route.extend renderTemplate: -> @getDocuments() @render('taxon_concept/documents') getDocuments: -> model = this.modelFor("taxonConcept") $.ajax( url: "/api/v1/documents?taxon_concept_id=" + model.get('id'), success: (data) -> model.set...
Species.TaxonConceptDocumentsRoute = Ember.Route.extend renderTemplate: -> @getDocuments() @render('taxon_concept/documents') getDocuments: -> model = this.modelFor("taxonConcept") $.ajax( url: "/api/v1/documents?taxon-concepts-ids=" + model.get('id'), success: (data) -> model.s...
Use master map tile selection for sensor map
class Workbench.Views.SensorMapView extends Backbone.Marionette.ItemView template: false initialize: -> @zoom = 13 onDestroy: -> @map.remove() if @map onShow: -> if @el.id is "" console.warn "No Map Element" else @location = [@model.get("latitude"), @model.get("longitude")] ...
class Workbench.Views.SensorMapView extends Backbone.Marionette.ItemView template: false initialize: -> @zoom = 13 onDestroy: -> @map.remove() if @map onShow: -> if @el.id is "" console.warn "No Map Element" else @location = [@model.get("latitude"), @model.get("longitude")] ...
Fix an issue that '<' and '>' were not shown correctly
module.exports = class BroadcastTarget editor: null listener: null isMarkdownPreview: false constructor: -> @editor = atom.workspace.activePaneItem @isMarkdownPreview = @editor[0]? @editor.on 'markdown-preview:markdown-changed', => @listener?() setListener: (listener) -> @listener = ...
module.exports = class BroadcastTarget editor: null listener: null isMarkdownPreview: false constructor: -> @editor = atom.workspace.activePaneItem @isMarkdownPreview = @editor[0]? @editor.on 'markdown-preview:markdown-changed', => @listener?() setListener: (listener) -> @listener = ...
Add selectors for spell checking.
'exception-reporting': 'userId': 'ee24cf00-f793-9081-be2a-2cdae5536b7f' 'release-notes': 'viewedVersion': '0.64.0' 'welcome': 'showOnStartup': false 'metrics': 'userId': '51eeb6113c1ae801c9aade9b6d679aa5189ced25' 'editor': 'fontFamily': 'Source Code Pro' 'fontSize': 14 'preferredLineLength': 100 'showIn...
'exception-reporting': 'userId': 'ee24cf00-f793-9081-be2a-2cdae5536b7f' 'release-notes': 'viewedVersion': '0.64.0' 'welcome': 'showOnStartup': false 'metrics': 'userId': '51eeb6113c1ae801c9aade9b6d679aa5189ced25' 'editor': 'fontFamily': 'Source Code Pro' 'fontSize': 14 'preferredLineLength': 100 'showIn...
Disable 'exceptino-reporting' so userId GUID isn’t checked in
"*": core: telemetryConsent: "limited" themes: [ "one-light-ui" "one-light-syntax" ] editor: fontFamily: "'SF Mono', Menlo, Consolas, DejaVu Sans Mono, monospace" fontSize: 12 lineHeight: 1.7 "one-dark-ui": tabCloseButton: "Left" "one-light-ui": tabCloseButton: "Left"...
"*": core: disabledPackages: [ "exception-reporting" ] telemetryConsent: "limited" themes: [ "one-light-ui" "one-light-syntax" ] editor: fontFamily: "'SF Mono', Menlo, Consolas, DejaVu Sans Mono, monospace" fontSize: 12 lineHeight: 1.7 "one-dark-ui": tabCloseB...
Change camel case event names.
globals = require 'globals' module.exports = getOperation : (current, selected) -> arr = [ @planTitle.FREE @planTitle.HOBBYIST @planTitle.DEVELOPER @planTitle.PROFESSIONAL ] current = arr.indexOf current selected = arr.indexOf selected return switch when selecte...
globals = require 'globals' module.exports = getOperation : (current, selected) -> arr = [ @planTitle.FREE @planTitle.HOBBYIST @planTitle.DEVELOPER @planTitle.PROFESSIONAL ] current = arr.indexOf current selected = arr.indexOf selected return switch when selecte...
Tweak a few Atom settings
"*": "exception-reporting": userId: "30e6f2d0-42d3-ab77-4984-dde4c431f019" welcome: showOnStartup: false core: {} editor: invisibles: {} fontFamily: "Hack" autosave: enabled: true "git-diff": showIconsInEditorGutter: true "ruby-test": testFramework: "minitest" rspecAllComma...
"*": "exception-reporting": userId: "30e6f2d0-42d3-ab77-4984-dde4c431f019" welcome: showOnStartup: false core: projectHome: "/Users/randy/src" audioBeep: false editor: invisibles: {} fontFamily: "Hack" preferredLineLength: 100 showIndentGuide: true autosave: enabled: true ...
Clear mini editor base select list cancelled()
{$$} = require 'space-pen' SelectList = require 'select-list' $ = require 'jquery' _ = require 'underscore' module.exports = class CommandPaletteView extends SelectList @activate: (rootView) -> @instance = new CommandPaletteView(rootView) @viewClass: -> "#{super} command-palette" filterKey: 'eventDescr...
{$$} = require 'space-pen' SelectList = require 'select-list' $ = require 'jquery' _ = require 'underscore' module.exports = class CommandPaletteView extends SelectList @activate: (rootView) -> @instance = new CommandPaletteView(rootView) @viewClass: -> "#{super} command-palette" filterKey: 'eventDescr...
Fix running specs on Windows.
module.exports = (grunt) -> grunt.initConfig pkg: grunt.file.readJSON('package.json') coffee: glob_to_multiple: expand: true cwd: 'src' src: ['*.coffee'] dest: 'lib' ext: '.js' coffeelint: options: max_line_length: level: 'ignore' ...
module.exports = (grunt) -> grunt.initConfig pkg: grunt.file.readJSON('package.json') coffee: glob_to_multiple: expand: true cwd: 'src' src: ['*.coffee'] dest: 'lib' ext: '.js' coffeelint: options: max_line_length: level: 'ignore' ...
Enable the fair setup and pass in the fair to the layered search view
_ = require 'underscore' sd = require('sharify').data Backbone = require 'backbone' Artworks = require '../../../collections/artworks.coffee' LayeredSearchView = require('./layered-search.coffee').LayeredSearchView SaleView = require './sale.coffee' module.exports = class Below...
_ = require 'underscore' sd = require('sharify').data Backbone = require 'backbone' Artworks = require '../../../collections/artworks.coffee' LayeredSearchView = require('./layered-search.coffee').LayeredSearchView SaleView = require './sale.coffee' module.exports = class Below...
Add basic methods to PanelView
class PanelView extends HTMLElement constructor: -> module.exports = PanelView
class PanelView extends HTMLElement constructor: -> registerModel: (Model)-> @Model = Model @Model.View = this createdCallback: -> this.id = 'linter-panel' render: (Messages)-> module.exports = PanelView
Format search query to display authorID with author's full name
define (require) -> Backbone = require('backbone') settings = require('cs!settings') SEARCH_URI = "#{location.protocol}//#{settings.cnxarchive.host}:#{settings.cnxarchive.port}/search" return class SearchResults extends Backbone.Model url: () -> "#{SEARCH_URI}#{@query}" defaults: query: ...
define (require) -> Backbone = require('backbone') settings = require('cs!settings') SEARCH_URI = "#{location.protocol}//#{settings.cnxarchive.host}:#{settings.cnxarchive.port}/search" return class SearchResults extends Backbone.Model url: () -> "#{SEARCH_URI}#{@query}" defaults: query: ...
Add a fallback for Safari copy-to-clipboard
#= require clipboard $ -> clipboard = new Clipboard '.js-clipboard-trigger', text: (trigger) -> $target = $(trigger.nextElementSibling || trigger.previousElementSibling) $target.data('clipboard-text') || $target.text().trim() clipboard.on 'success', (e) -> $(e.trigger). tooltip(trigger: ...
#= require clipboard $ -> clipboard = new Clipboard '.js-clipboard-trigger', text: (trigger) -> $target = $(trigger.nextElementSibling || trigger.previousElementSibling) $target.data('clipboard-text') || $target.text().trim() clipboard.on 'success', (e) -> $(e.trigger). tooltip(trigger: ...
Add editor settings for adjusting indent/outdent
".source.viml": editor: commentStart: '" '
".source.viml": editor: commentStart: '" ' increaseIndentPattern: "(?:^|\\s)(?:if|else|elseif|for|function!?|while)(?:\\s|$)" decreaseIndentPattern: "(?:^|\\s)(?:endif|endfor|endfunction|endwhile)(?:\\s|$)"
Set default vebosity to 3
$ -> $("#slider").slider value: 1 min: 1 max: 3 slide: (event, ui) -> num = ui.value+1 verbosity = while num -= 1 then 'v' $("#job_verbosity").val verbosity.join('') if $('#job-results').size() > 0 div = $ '#job-results' project_id = div.data 'project_id' job...
$ -> $("#slider").slider value: 3 min: 1 max: 3 slide: (event, ui) -> num = ui.value+1 verbosity = while num -= 1 then 'v' $("#job_verbosity").val verbosity.join('') if $('#job-results').size() > 0 div = $ '#job-results' project_id = div.data 'project_id' job...
Hide useful and personal supplies when there's no hash in the url.
$( -> $('a.pdf-languages-trigger').click -> $(this).toggleClass 'active' $('.download-languages').toggleClass 'active' categories = [ { href: '#tab-essentials-content', contentSelector: '.tab-essentials-content', anchorSelector: '[href="#tab-essentials-content"]' } { href: '#tab-useful-content', conten...
categories = [ { href: '#tab-essentials-content', contentSelector: '.tab-essentials-content', anchorSelector: '[href="#tab-essentials-content"]' } { href: '#tab-useful-content', contentSelector: '.tab-useful-content', anchorSelector: '[href="#tab-useful-content"]' } { href: '#tab-personal-content', contentSelector: ...
Fix secure store get keys
# Secure version of the ledger.storage.ChromeStore. This store uses AES encryption for storing keys and data class @ledger.storage.SecureStore extends ledger.storage.ChromeStore # @param [String] name The store name # @param [String] key The secure key used to encrypt and decrypt data with AES constructor: (name...
# Secure version of the ledger.storage.ChromeStore. This store uses AES encryption for storing keys and data class @ledger.storage.SecureStore extends ledger.storage.ChromeStore # @param [String] name The store name # @param [String] key The secure key used to encrypt and decrypt data with AES constructor: (name...
Add menu and Win32/Linux keybindings
'atom-workspace': 'cmd-shift-c': 'git:toggle-git-panel' '.git-StagingView': 'left': 'git:focus-diff-view' '.git-CommitView-editor atom-text-editor:not([mini])': 'cmd-enter': 'git:commit' 'ctrl-enter': 'git:commit' '.git-FilePatchView': '/': 'git:toggle-patch-selection-mode' 'tab': 'git:select-next-hunk' ...
'.platform-darwin': 'cmd-shift-c': 'git:toggle-git-panel' '.platform-win32, .platform-linux': 'alt-shift-c': 'git:toggle-git-panel' '.git-StagingView': 'left': 'git:focus-diff-view' '.git-CommitView-editor atom-text-editor:not([mini])': 'cmd-enter': 'git:commit' 'ctrl-enter': 'git:commit' '.git-FilePatchV...
Fix pan tool on retina
{Tool} = require './base' {createShape} = require '../core/shapes' module.exports = class Pan extends Tool name: 'Pan' iconName: 'pan' usesSimpleAPI: false didBecomeActive: (lc) -> unsubscribeFuncs = [] @unsubscribe = => for func in unsubscribeFuncs func() unsubscribeFuncs.push lc...
{Tool} = require './base' {createShape} = require '../core/shapes' module.exports = class Pan extends Tool name: 'Pan' iconName: 'pan' usesSimpleAPI: false didBecomeActive: (lc) -> unsubscribeFuncs = [] @unsubscribe = => for func in unsubscribeFuncs func() unsubscribeFuncs.push lc...
Remove superflous additions to Jony's regex per @tombell.
# Description: # To create something that's… that's genuinely new, # you have to… to start again. # # Dependencies: # None # # Configuration: # None # # Commands: # <anything Ivey> - Display an Ive # # Author: # arbales ives = [ "http://www.blogcdn.com/www.engadget.com/media/2012/03/jony-ive-10-20-09.jpg...
# Description: # To create something that's… that's genuinely new, # you have to… to start again. # # Dependencies: # None # # Configuration: # None # # Commands: # <anything Ivey> - Display an Ive # # Author: # arbales ives = [ "http://www.blogcdn.com/www.engadget.com/media/2012/03/jony-ive-10-20-09.jpg...
Set metrics to zero for now
Page = require 'controllers/page' Api = require 'zooniverse/lib/api' class HomePage extends Page el: $('.home') className: 'home' template: require 'views/home' elements: '.participants': 'participants' '.images': 'images' constructor: -> super @html @template Api.current.get '/proj...
Page = require 'controllers/page' Api = require 'zooniverse/lib/api' FILMING = true class HomePage extends Page el: $('.home') className: 'home' template: require 'views/home' elements: '.participants': 'participants' '.images': 'images' constructor: -> super @html @template Api.cu...
Send name and version as user agent.
Import = require '../lib/import' CONS = require '../lib/constants' fs = require 'fs' argv = require('optimist') .usage('Usage: $0 --projectKey key --clientId id --clientSecret secret --csv file --language lang --publish') .default('lang', 'en') .describe('projectKey', 'your SPHERE.IO project-key') .describe('cl...
Import = require '../lib/import' package_json = require '../package.json' CONS = require '../lib/constants' fs = require 'fs' argv = require('optimist') .usage('Usage: $0 --projectKey key --clientId id --clientSecret secret --csv file --language lang --publish') .default('lang', 'en') .describe('projectKey', 'you...
Remove explicit variable declaration as its done by cs anyhow.
FS = require 'fs' Q = require 'q' ### Class for generating JSON product type representations from CSV files. ### class ProductTypeGenerator _options = {} constructor: (options = {}) -> @_options = options ### Creates sphere product type representation files using JSON format. @param {array} types En...
FS = require 'fs' Q = require 'q' ### Class for generating JSON product type representations from CSV files. ### class ProductTypeGenerator constructor: (options = {}) -> @_options = options ### Creates sphere product type representation files using JSON format. @param {array} types Entire types CSV ...
Remove call to deprecated method
MinimapSelectionView = require './minimap-selection-view' module.exports = active: false views: {} activate: (state) -> try atom.packages.activatePackage('minimap').then (minimapPackage) => @minimap = minimapPackage.mainModule return @deactivate() unless @minimap.versionMatch('>= 3.5....
MinimapSelectionView = require './minimap-selection-view' module.exports = active: false views: {} activate: (state) -> try atom.packages.activatePackage('minimap').then (minimapPackage) => @minimap = minimapPackage.mainModule return @deactivate() unless @minimap.versionMatch('>= 3.5....
Rename normal users to logged-in users, loading now ...
data = metrics: anon: colour: 'orange', number: 'loading...', title: 'Anonymous Visitors' , normal: colour: 'blue', number: 'loading...', title: 'Normal Visitors' , premium: colour: 'green', number: 'loading...', title: 'Premium Visitors' source = $('#metric-block-template').htm...
data = metrics: anon: colour: 'orange', number: '...', title: 'Anonymous Visitors' , normal: colour: 'blue', number: '...', title: 'Logged-in Visitors' , premium: colour: 'green', number: '...', title: 'Premium Visitors' source = $('#metric-block-template').html() template = Han...
Add comment heading to document ready
# ************************************* # # Application # -> Manifest # # ************************************* # ------------------------------------- # Namespace # ------------------------------------- #= require presenter # ------------------------------------- # Routes # ----------------------------------...
# ************************************* # # Application # -> Manifest # # ************************************* # ------------------------------------- # Namespace # ------------------------------------- #= require presenter # ------------------------------------- # Routes # ----------------------------------...
Set messages to correct phrases
React = require 'react' BS = require 'react-bootstrap' MESSAGES = { student: [ <p key='s1'>Tutor shows your weakest topics so you can practice to improve.</p> <p key='s2'>Try to get all of your topics to green!</p> ] teacher: [ <p key='t1'>Tutor shows the weakest topics for each period.</p> ...
React = require 'react' BS = require 'react-bootstrap' MESSAGES = { student: [ <p key='s1'>The performance forecast is an estimate of your understanding of a topic.</p> <p key='s2'> It is personalized display based on your answers to reading questions, homework problems, and previous prac...
Adjust selection when inserting gallery block breaks
Trix.galleryFilter = (snapshot) -> filter = new Filter snapshot filter.perform() filter.getSnapshot() class Filter constructor: (snapshot) -> {@document, @selectedRange} = snapshot perform: -> @removeGalleryAttribute() @applyGalleryAttribute() getSnapshot: -> {@document, @selectedRange} ...
Trix.galleryFilter = (snapshot) -> filter = new Filter snapshot filter.perform() filter.getSnapshot() class Filter constructor: (snapshot) -> {@document, @selectedRange} = snapshot perform: -> @removeGalleryAttribute() @applyGalleryAttribute() getSnapshot: -> {@document, @selectedRange} ...
Switch to using in so coffeescript can optimize
#= require ./abstract_binding class Batman.DOM.RouteBinding extends Batman.DOM.AbstractBinding onAnchorTag: false onlyObserve: Batman.BindingDefinitionOnlyObserve.Data @accessor 'dispatcher', -> @view.lookupKeypath('dispatcher') || Batman.App.get('current.dispatcher') bind: -> if (@node.nodeName is '...
#= require ./abstract_binding class Batman.DOM.RouteBinding extends Batman.DOM.AbstractBinding onAnchorTag: false onlyObserve: Batman.BindingDefinitionOnlyObserve.Data @accessor 'dispatcher', -> @view.lookupKeypath('dispatcher') || Batman.App.get('current.dispatcher') bind: -> if @node.nodeName in ['...
Reset mask height on close
class @Overlay constructor: (contentSelector, options) -> @contentSelector = contentSelector @options = options || {} defaults = domType: OverlayDomWrapper dimensionsType: OverlayDimensions @options = $.extend(defaults, @options) @dom = new @options.domType() $('body').append(@dom....
class @Overlay constructor: (contentSelector, options) -> @contentSelector = contentSelector @options = options || {} defaults = domType: OverlayDomWrapper dimensionsType: OverlayDimensions @options = $.extend(defaults, @options) @dom = new @options.domType() $('body').append(@dom....
Change default local for JS I18n.
#= require env #= require jquery #= require jquery/jquery-migrate #= require jquery/jquery.cookies.js #= require i18n.js #= require bootstrap #= require bootstrap-select #= require custom-bootstrap.js.coffee #= require function #= require map-overlay.js #= require handlebars #= require ember #= require ember-data #= re...
#= require env #= require jquery #= require jquery/jquery-migrate #= require jquery/jquery.cookies.js #= require i18n.js #= require bootstrap #= require bootstrap-select #= require custom-bootstrap.js.coffee #= require function #= require map-overlay.js #= require handlebars #= require ember #= require ember-data #= re...
Set finite timeout for framestream
express = require('express') module.exports = -> router = express.Router() router.get '/framestream', (req, res) -> req.socket.setTimeout Infinity messageCount = 1 subscriberCount = 0 subscriber = require('./redis_client')() subscriber.subscribe 'updates' subscriber.on 'error', (err) ->...
express = require('express') module.exports = -> router = express.Router() router.get '/framestream', (req, res) -> req.socket.setTimeout 1000*1000 messageCount = 1 subscriberCount = 0 subscriber = require('./redis_client')() subscriber.subscribe 'updates' subscriber.on 'error', (err) -...
Set left as number without px suffix
{View} = require 'space-pen' $ = require 'jquery' _ = require 'underscore' module.exports = class WrapGuideView extends View @activate: -> rootView.eachEditor (editor) => @appendToEditorPane(rootView, editor) if editor.attached @appendToEditorPane: (rootView, editor) -> if underlayer = editor.find('...
{View} = require 'space-pen' $ = require 'jquery' _ = require 'underscore' module.exports = class WrapGuideView extends View @activate: -> rootView.eachEditor (editor) => @appendToEditorPane(rootView, editor) if editor.attached @appendToEditorPane: (rootView, editor) -> if underlayer = editor.find('...
Add rename and delete menu items
'context-menu': '.tree-view': 'Add file': 'tree-view:add'
'context-menu': '.tree-view': 'Add File': 'tree-view:add' 'Rename': 'tree-view:move' 'Delete': 'tree-view:remove'
Split webadmin string recognizer into multiple tests.
define ['lib/amd/Backbone','neo4j/webadmin/modules/databrowser/views/PropertyContainerView'], (Backbone, PropertyContainerView) -> describe "PropertyContainerView", -> it "recognizes non-quoted strings as strings", -> pcv = new PropertyContainerView(template:null) expect(pcv.shouldBeConvertedToStri...
define ['lib/amd/Backbone','neo4j/webadmin/modules/databrowser/views/PropertyContainerView'], (Backbone, PropertyContainerView) -> # TODO: Refactor out the "shouldBeConvertedToString" into it's own class describe "PropertyContainerView", -> it "recognizes ascii characters as strings", -> pcv = new Prope...
Use ctrl-g for linux. Join selectors with the same keybinding.
'.platform-darwin': 'ctrl-g': 'go-to-line:toggle' '.platform-win32': 'ctrl-g': 'go-to-line:toggle' '.platform-linux': 'ctrl-i': 'go-to-line:toggle' '.go-to-line .mini.editor input': 'enter': 'core:confirm', 'escape': 'core:cancel' '.platform-darwin .go-to-line .mini.editor input': 'cmd-w': 'core:cancel'...
'.platform-darwin, .platform-win32, .platform-linux': 'ctrl-g': 'go-to-line:toggle' '.go-to-line .mini.editor input': 'enter': 'core:confirm', 'escape': 'core:cancel' '.platform-darwin .go-to-line .mini.editor input': 'cmd-w': 'core:cancel' '.platform-win32 .go-to-line .mini.editor input': 'ctrl-w': 'core:...
Add binding for moving left and right with tab
# Keybindings require three things to be fully defined: A selector that is # matched against the focused element, the keystroke and the command to # execute. # # Below is a basic keybinding which registers on all platforms by applying to # the root workspace element. # For more detailed documentation see # https://ato...
# Keybindings require three things to be fully defined: A selector that is # matched against the focused element, the keystroke and the command to # execute. # # Below is a basic keybinding which registers on all platforms by applying to # the root workspace element. # For more detailed documentation see # https://ato...
Use ComponentLoader to get instance
noflo = require 'noflo' unless noflo.isBrowser() chai = require 'chai' unless chai ReadFile = require '../components/ReadFile.coffee' else ReadFile = require 'noflo-browserfile/components/ReadFile.js' describe 'ReadFile component', -> c = null ins = null out = null beforeEach -> c = ReadFile.getCompo...
noflo = require 'noflo' unless noflo.isBrowser() chai = require 'chai' path = require 'path' baseDir = path.resolve __dirname, '../' else baseDir = 'noflo-browserfile' describe 'ReadFile component', -> c = null ins = null out = null before (done) -> @timeout 4000 loader = new noflo.ComponentLoa...
Fix workaround for new Preact 10 release
import * as Preact from 'preact' VNode = Preact.h('a', null).constructor export createElement = (element, props, children...) -> if props? && (Array.isArray(props) || typeof props != 'object' || props instanceof VNode) children.unshift props props = {} Preact.h element, props, ...children export class C...
import * as Preact from 'preact' export createElement = (element, props, children...) -> if props? && (Array.isArray(props) || typeof props != 'object' || props.props?) children.unshift props props = {} Preact.h element, props, ...children export class Component extends Preact.Component constructor: ->...
Add api getter for current game
# modules Game = require '../models/game' # CONTROLLER # ---------- module.exports = (app) -> # GET /api/games app.get '/api/games/', 'games.list', (req, res) -> list = [] Game.findAll().then (games) -> list.push formatGame(game) for game in games res.json list # ...
# modules Game = require '../models/game' gameController = require '../controllers/game_controller' # CONTROLLER # ---------- module.exports = (app) -> # GET /api/games app.get '/api/games/', 'games.list', (req, res) -> list = [] Game.findAll().then (games) -> list.push formatGame...
Add correct template URL to PDF viewer
angular.module("doubtfire.common.pdf-viewer", []) .directive('pdfViewer', -> restrict: 'E' templateUrl: 'common/pdf-panel/pdf-panel.tpl.html' scope: pdfUrl: '=' controller: ($scope, $sce, $timeout) -> $scope.isSafari = navigator.userAgent.indexOf("Safari") > 0 && navigator.userAgent.indexOf("Chrome") ==...
angular.module("doubtfire.common.pdf-viewer", []) # # Basic PDF viewer # .directive('pdfViewer', -> restrict: 'E' templateUrl: 'common/pdf-viewer/pdf-viewer.tpl.html' scope: pdfUrl: '=' controller: ($scope, $sce, $timeout) -> $scope.isSafari = navigator.userAgent.indexOf("Safari") > 0 && navigator.userA...
Add more specs for indie
describe 'Indie', -> Validate = require('../lib/validate') Indie = require('../lib/indie') indie = null beforeEach -> indie?.dispose() indie = new Indie({}) describe 'Validations', -> it 'just cares about a name', -> linter = {} Validate.linter(linter, true) expect(linter.name)...
describe 'Indie', -> Validate = require('../lib/validate') Indie = require('../lib/indie') indie = null beforeEach -> indie?.dispose() indie = new Indie({}) describe 'Validations', -> it 'just cares about a name', -> linter = {} Validate.linter(linter, true) expect(linter.name)...
Add a guard to pushState for friendly browsers only
# For more information see: http://emberjs.com/guides/routing/ ETahi.Router.map ()-> @route('flow_manager') @resource 'paper', { path: '/papers/:paper_id' }, -> @route('edit') @route('manage') @route('submit') @route('task', {path: '/papers/:paper_id/tasks/:task_id'}) @route('paper_new', { path: '/...
# For more information see: http://emberjs.com/guides/routing/ ETahi.Router.map ()-> @route('flow_manager') @resource 'paper', { path: '/papers/:paper_id' }, -> @route('edit') @route('manage') @route('submit') @route('task', {path: '/papers/:paper_id/tasks/:task_id'}) @route('paper_new', { path: '/...
Make the each metric animation finish at different times
# Place all the behaviors and hooks related to the matching controller here. # All this logic will automatically be available in application.js. # You can use CoffeeScript in this file: http://coffeescript.org/ $ -> animateMetric = $(".metric-box strong").each -> $this = $(this) starting_point = 0 $targe...
# Place all the behaviors and hooks related to the matching controller here. # All this logic will automatically be available in application.js. # You can use CoffeeScript in this file: http://coffeescript.org/ $ -> animateMetric = $(".metric-box strong").each (index) -> $this = $(this) starting_point = 0 ...
Fix bug to use fs
# Tub class YAML = require 'yamljs' class TubConfig constructor: (tub, appdir, yml) -> # body... @dir = appdir @tub = tub @file = "#{@dir}/.jakhu/#{@tub}tub_config.yml" @yml = yml @yaml = {} fs.openSync @file create: (args) -> # body... @yaml.name = @tub @yaml.language = @yml...
# Tub class YAML = require 'yamljs' fs = require 'fs' class TubConfig constructor: (tub, appdir, yml) -> # body... @dir = appdir @tub = tub @file = "#{@dir}/.jakhu/#{@tub}tub_config.yml" @yml = yml @yaml = {} fs.openSync @file create: (args) -> # body... @yaml.name = @tub @ya...
Move function body to same line as .on() call
fs = require 'fs' path = require 'path' module.exports = list: (archivePath, callback) -> switch path.extname(archivePath) when '.tar' then @listTar(archivePath, callback) when '.gz' then @listGzip(archivePath, callback) when '.zip' then @listZip(archivePath, callback) else callback([]) ...
fs = require 'fs' path = require 'path' module.exports = list: (archivePath, callback) -> switch path.extname(archivePath) when '.tar' then @listTar(archivePath, callback) when '.gz' then @listGzip(archivePath, callback) when '.zip' then @listZip(archivePath, callback) else callback([]) ...
Fix bug detaching on pane close
{View} = require 'atom' ImageEditor = require './image-editor' module.exports = class ImageEditorStatusView extends View @content: -> @div class: 'status-image inline-block', => @span class: 'image-size', outlet: 'imageSizeStatus' initialize: (filePath, image) -> @filePath = filePath @image = im...
{View} = require 'atom' ImageEditor = require './image-editor' module.exports = class ImageEditorStatusView extends View @content: -> @div class: 'status-image inline-block', => @span class: 'image-size', outlet: 'imageSizeStatus' initialize: (filePath, image) -> @filePath = filePath @image = im...
Update documentation to current standards
{View} = require 'atom' # Status bar view for the soft wrap indicator. module.exports = class SoftWrapIndicatorView extends View @content: -> @div class: 'inline-block', => @a 'Wrap', class: 'soft-wrap-indicator', outlet: 'light' # Initializes the view by subscribing to various events. # # statusBar...
{View} = require 'atom' # Public: Status bar view for the soft wrap indicator. module.exports = class SoftWrapIndicatorView extends View @content: -> @div class: 'inline-block', => @a 'Wrap', class: 'soft-wrap-indicator', outlet: 'light' # Public: Initializes the view by subscribing to various events. ...
Remove default value for tags
path = require 'path' rek = require 'rekuire' module.exports.config = framework: 'custom' frameworkPath: require.resolve 'protractor-cucumber-framework' # Capabilities to be passed to the webdriver instance. capabilities: 'chromeOptions': args: ['--test-type'] # Disable the "unsupported flag" prom...
path = require 'path' rek = require 'rekuire' module.exports.config = framework: 'custom' frameworkPath: require.resolve 'protractor-cucumber-framework' # Capabilities to be passed to the webdriver instance. capabilities: 'chromeOptions': args: ['--test-type'] # Disable the "unsupported flag" prom...