commit
stringlengths
40
40
old_file
stringlengths
4
264
new_file
stringlengths
4
264
old_contents
stringlengths
0
4.24k
new_contents
stringlengths
1
5.44k
subject
stringlengths
14
778
message
stringlengths
15
9.92k
lang
stringclasses
277 values
license
stringclasses
13 values
repos
stringlengths
5
127k
6093ada5a44b733a04c216c4babf6c0f88a60ef5
lib/generators/utensils/utensil/templates/behavior.coffee
lib/generators/utensils/utensil/templates/behavior.coffee
#= require utensils/utensils #= require utensils/bindable class utensils.<%= file_name.camelize %> constructor: (@el, data) -> @data = if data then data else @el.data() @options() @initialize() @addListeners() options: -> initialize: -> # PUBLIC # dispose: -> # PROTECTED # addListen...
#= require utensils/utensils #= require utensils/bindable class utensils.<%= file_name.camelize %> constructor: (@el, data) -> @data = if data then data else @el.data() @options() @initialize() @addListeners() options: -> initialize: -> # PUBLIC # dispose: -> @removeListeners() # P...
Add the call to removeListeners for the generator
Add the call to removeListeners for the generator
CoffeeScript
mit
modeset/utensils,modeset/utensils,modeset/utensils
0e5c9e741ac2da96f6e1b0f2dd1de03f50a19b90
lib/assets/javascripts/cable/subscriber_manager.js.coffee
lib/assets/javascripts/cable/subscriber_manager.js.coffee
class Cable.SubscriberManager constructor: (@cable) -> @subscribers = {} add: (subscriber) -> {identifier} = subscriber @subscribers[identifier] = subscriber @notify(subscriber, "initialized") if @sendCommand("subscribe", identifier) @notify(subscriber, "connected") reload: -> for ...
class Cable.SubscriberManager constructor: (@cable) -> @subscribers = [] add: (subscriber) -> @subscribers.push(subscriber) @notify(subscriber, "initialized") if @sendCommand(subscriber, "subscribe") @notify(subscriber, "connected") reload: -> for subscriber in @subscribers if @s...
Manage an array of subscribers since there may be more than one subscription to a channel
Manage an array of subscribers since there may be more than one subscription to a channel
CoffeeScript
mit
ledestin/rails,smellsblue/actioncable,kaspth/rails,illacceptanything/illacceptanything,rushingfitness/actioncable,gfvcastro/rails,inf1k/actioncable,kachick/rails,yahonda/rails,felipecvo/rails,illacceptanything/illacceptanything,illacceptanything/illacceptanything,sergey-alekseev/rails,rossta/rails,esparta/rails,yalab/r...
5545b659d3507cee4fe89169427d095470f078e7
lib/snippets-provider.coffee
lib/snippets-provider.coffee
{Range} = require('atom') fuzzaldrin = require('fuzzaldrin') module.exports = class SnippetsProvider selector: '*' constructor: -> @showIcon = atom.config.get('autocomplete-plus.defaultProvider') is 'Symbol' getSuggestions: ({scopeDescriptor, prefix}) -> return unless prefix?.length scopeSnippets ...
{Range} = require('atom') fuzzaldrin = require('fuzzaldrin') module.exports = class SnippetsProvider selector: '*' constructor: -> @showIcon = atom.config.get('autocomplete-plus.defaultProvider') is 'Symbol' getSuggestions: ({scopeDescriptor, prefix}) -> return unless prefix?.length scopeSnippets ...
Use the description and URL when present
Use the description and URL when present
CoffeeScript
mit
atom/autocomplete-snippets
4b18961050aa96931d59c86da6efc4d523723fd0
app/assets/javascripts/data-tables-init.coffee
app/assets/javascripts/data-tables-init.coffee
$(document).on "page:change", -> $(".data-table").each -> table = $(@) return if $.fn.dataTable.isDataTable(table) options = responsive: true order: [[0, "desc"]] pageLength: 25 ascColumn = table.find("th.sort-asc").index() descColumn = table.find("th.sort-desc").index() ...
$(document).on "page:change", -> $(".data-table").each -> table = $(@) return if $.fn.dataTable.isDataTable(table) fnFooterCallback = (row, data, start, end, display) -> monetaryColumnIndex = 1 # Utility function to convert string dollar amount to a number intVal = (i) -> if...
Add footer callback in report data tables to recalculate & render table totals on filering event
Add footer callback in report data tables to recalculate & render table totals on filering event
CoffeeScript
mit
on-site/StockAid,on-site/StockAid,on-site/StockAid
61803968af0e3a2eaa8e63ee58c5e72bcc27cd89
highlights/highlight-filename-from-stdin.coffee
highlights/highlight-filename-from-stdin.coffee
#!highlights/node_modules/coffee-script/bin/coffee Highlights = require 'highlights' fs = require 'fs' path = require 'path' highlighter = new Highlights() highlighter.requireGrammarsSync modulePath: require.resolve('./atom-language-perl6/package.json') stdin = process.openStdin() stdin.setEncoding 'utf8' mystderr...
#!highlights/node_modules/coffee-script/bin/coffee Highlights = require 'highlights' fs = require 'fs' path = require 'path' highlighter = new Highlights() highlighter.requireGrammarsSync modulePath: require.resolve('./atom-language-perl6/package.json') stdin = process.openStdin() stdin.setEncoding 'utf8' mystderr ...
Make highlights async, use process.stdout.write not console.log
Make highlights async, use process.stdout.write not console.log console.log can do formatting of javascript data structures Hopefully will be faster printing that way. Not sure if making it async will make it faster, the same, or slowing though.
CoffeeScript
artistic-2.0
gfldex/doc,jonathanstowe/doc,tbrowder/doc,antquinonez/doc,MasterDuke17/doc,perl6/doc,jonathanstowe/doc,MasterDuke17/doc,stmuk/doc,dmaestro/doc,perl6/doc,antquinonez/doc,stmuk/doc,MasterDuke17/doc,dmaestro/doc,jonathanstowe/doc,jonathanstowe/doc,antquinonez/doc,gfldex/doc,jonathanstowe/doc,perl6/doc,gfldex/doc,perl6/doc...
f9d29549882355900901dca0274279d564776632
app/assets/javascripts/lib/forms/input_validator.js.coffee
app/assets/javascripts/lib/forms/input_validator.js.coffee
define ["jquery", "lib/forms/validators", "lib/forms/error_messages"], ($, Validators, ErrorMessages) -> class InputValidator constructor: (input, label, validator) -> @input = input @label = label @validator = validator @_initialize() if @input and @label and @validator isValid: ->...
define ["jquery", "lib/forms/validators", "lib/forms/error_messages"], ($, Validators, ErrorMessages) -> class InputValidator constructor: (input, label, validator) -> @input = input @label = label @validator = validator @_initialize() if @input and @label and @validator isValid: ->...
Make the match for the braces non greedy to allow for regex grouping in validator rules.
Make the match for the braces non greedy to allow for regex grouping in validator rules.
CoffeeScript
mit
lonelyplanet/rizzo,lonelyplanet/rizzo,Lostmyname/rizzo,Lostmyname/rizzo,lonelyplanet/rizzo,Lostmyname/rizzo,Lostmyname/rizzo,Lostmyname/rizzo,lonelyplanet/rizzo,lonelyplanet/rizzo
828bc9294d442c86e593edcb5604ac270bd8bc26
test/src/specs/app/Helpers/ElementWrapSpec.coffee
test/src/specs/app/Helpers/ElementWrapSpec.coffee
describe "ElementWrapSpec", -> describe "Get Tree Structure", -> it "should get a tree Structure of all 'components' from the passed in element", -> startElement = $j(" <div id='tree_test' style='display: none;'> <div id='p1' class='ae-comp'> <div id='p2' class='ae-comp'> ...
describe "ElementWrap specs", -> describe "Get Tree Structure", -> it "should get a tree Structure of all 'components' from the passed in element", -> startElement = $j(" <div id='tree_test' style='display: none;'> <div id='p1' class='ae-comp'> <div id='p2' class='ae-comp'> ...
Change name of ElementWrap Specs
Change name of ElementWrap Specs
CoffeeScript
mit
jono-tt/App-Engine
611abc5ec9ed484319e3a018e0cf74c886ea88f7
app/assets/javascripts/admin/neuron_form.js.coffee
app/assets/javascripts/admin/neuron_form.js.coffee
selector = "form.neuron-form" formHasChanged = false $(document).on "page:load", -> formHasChanged = false $(document).on "change", "#{selector} input", -> formHasChanged = true $(document).on "page:before-change", -> confirm( "La información no ha sido guardada. ¿Estás seguro de continuar?" ) if formHas...
selector = "form.neuron-form" formHasChanged = false $(document).on "page:load", -> formHasChanged = false $(document).on "change", "#{selector} input, #{selector} textarea", -> formHasChanged = true $(document).on "page:before-change", -> confirm( "La información no ha sido guardada. ¿Estás seguro de cont...
Add textarea to listen changes in neuron form
Add textarea to listen changes in neuron form
CoffeeScript
mit
GrowMoi/moi,GrowMoi/moi,GrowMoi/moi
13dfaedf06e6be95e5f6951cbe351d64085e9aa8
app/assets/javascripts/foundation_extras.js.coffee
app/assets/javascripts/foundation_extras.js.coffee
App.FoundationExtras = initialize: -> $(document).foundation() $(window).trigger "load.zf.sticky" $(window).trigger "resize" clearSticky = -> $("[data-sticky]").foundation("destroy") if $("[data-sticky]").length $(document).on("page:before-unload", clearSticky) window.addEventListene...
App.FoundationExtras = initialize: -> $(document).foundation() $(window).trigger "init.zf.sticky" $(window).trigger "resize" clearSticky = -> $("[data-sticky]").foundation("destroy") if $("[data-sticky]").length $(document).on("page:before-unload", clearSticky) window.addEventListene...
Replace load to init sticky
Replace load to init sticky
CoffeeScript
agpl-3.0
usabi/consul_san_borondon,usabi/consul_san_borondon,consul/consul,consul/consul,consul/consul,usabi/consul_san_borondon,usabi/consul_san_borondon,AyuntamientoPuertoReal/decidePuertoReal,consul/consul,consul/consul,AyuntamientoPuertoReal/decidePuertoReal,AyuntamientoPuertoReal/decidePuertoReal
c6ae9e48b78f00685e1a01f25ec8fbbe1b42787b
src/widgets/components/datetime-picker.coffee
src/widgets/components/datetime-picker.coffee
Menglifang.Widgets.DatetimePicker = Ember.TextField.extend resetable: true format: 'yyyy-mm-dd hh:ii' autoclose: true todayBtn: true startDate: '1949-10-01' minuteStep: 10 minView: 0 maxView: 4 language: 'zh-CN' didInsertElement: -> options = format: @get('format') autoclose: @get(...
Menglifang.Widgets.DatetimePicker = Ember.TextField.extend resetable: true format: 'yyyy-mm-dd hh:ii' autoclose: true todayBtn: false startDate: '1949-10-01' minuteStep: 10 minView: 0 maxView: 4 language: 'zh-CN' didInsertElement: -> options = format: @get('format') autoclose: @get...
Set default value of todayBtn to false.
Set default value of todayBtn to false.
CoffeeScript
mit
emberjs-cn/ember-menglifang
542231825fbd6fe1c9515b07bfaf4bac8f5bea21
core/htdocs_source/src/pods/oxisection-keyvalue/component.coffee
core/htdocs_source/src/pods/oxisection-keyvalue/component.coffee
`import Em from "vendor/ember"` Component = Em.Component.extend click: (evt) -> if evt.target.tagName is "A" and evt.target.target != '_blank' evt.stopPropagation() evt.preventDefault() @container.lookup("route:openxpki").sendAjax data: ...
`import Em from "vendor/ember"` Component = Em.Component.extend click: (evt) -> if evt.target.tagName is "A" and evt.target.target != '_blank' evt.stopPropagation() evt.preventDefault() @container.lookup("route:openxpki").sendAjax data: ...
Fix property calculation in absence of buttons.
Fix property calculation in absence of buttons.
CoffeeScript
apache-2.0
oliwel/openxpki,aleibl/openxpki,oliwel/openxpki,openxpki/openxpki,aleibl/openxpki,stefanomarty/openxpki,oliwel/openxpki,stefanomarty/openxpki,openxpki/openxpki,stefanomarty/openxpki,stefanomarty/openxpki,openxpki/openxpki,aleibl/openxpki,oliwel/openxpki,aleibl/openxpki,aleibl/openxpki,aleibl/openxpki,openxpki/openxpki,...
7f7e84bf0f21a85c403a9c2830e1edf44960146a
spec/helpers-spec.coffee
spec/helpers-spec.coffee
Helpers = require '../lib/helpers' describe "The Results Validation Helper", -> it "should throw an exception when nothing is passed.", -> expect( -> Helpers.validateResults()).toThrow() it "should throw an exception when a String is passed.", -> expect( -> Helpers.validateResults('String')).toThrow() des...
Helpers = require '../lib/helpers' describe "The Results Validation Helper", -> it "should throw an exception when nothing is passed.", -> expect( -> Helpers.validateResults()).toThrow() it "should throw an exception when a String is passed.", -> expect( -> Helpers.validateResults('String')).toThrow() des...
Add test for proper validated linter.
Add test for proper validated linter.
CoffeeScript
mit
elkeis/linter,e-jigsaw/Linter,kaeluka/linter,Arcanemagus/linter,blakeembrey/linter,UltCombo/linter,mdgriffith/linter,levity/linter,shawninder/linter,iam4x/linter,AtomLinter/Linter,JohnMurga/linter,AsaAyers/linter,DanPurdy/linter,atom-community/linter,steelbrain/linter
1c6e58a8379eb35cc6601cac28452f2a0012e378
tutor/src/components/course-calendar/past-assignments.cjsx
tutor/src/components/course-calendar/past-assignments.cjsx
React = require 'react' BS = require 'react-bootstrap' {CloneAssignmentLink} = require './task-dnd' isEmpty = require 'lodash/isEmpty' partial = require 'lodash/partial' {PastTaskPlansActions, PastTaskPlansStore} = require '../../flux/past-task-plans' LoadableItem = require '../loadable-item' EmptyWarning = (pro...
React = require 'react' BS = require 'react-bootstrap' {CloneAssignmentLink} = require './task-dnd' isEmpty = require 'lodash/isEmpty' partial = require 'lodash/partial' {PastTaskPlansActions, PastTaskPlansStore} = require '../../flux/past-task-plans' LoadableItem = require '../loadable-item' PastAssignmentsLoa...
Hide empty warning on past assignments
Hide empty warning on past assignments
CoffeeScript
agpl-3.0
openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js
5cce6a9ed0940aa4282908519715cba6f4f547d8
src/components/Split.coffee
src/components/Split.coffee
noflo = require "../../lib/NoFlo" class Split extends noflo.Component description: "This component receives data on a single input port and sends the same data out to all connected output ports" constructor: -> @inPorts = in: new noflo.Port() @outPorts = out: new noflo.ArrayPort() @inPort...
noflo = require "../../lib/NoFlo" class Split extends noflo.Component description: "This component receives data on a single input port and sends the same data out to all connected output ports" constructor: -> @inPorts = in: new noflo.Port() @outPorts = out: new noflo.ArrayPort() @inPort...
Connect when getting upstream connection
Connect when getting upstream connection
CoffeeScript
mit
saurabhsood91/noflo,jonnor/noflo,noflo/noflo,npmcomponent/noflo-noflo,lxfschr/noflo,trustmaster/noflo,lxfschr/noflo,trustmaster/noflo,saurabhsood91/noflo,jonnor/noflo
39fede0686183e082752c8408154ab7e4ff600ef
scripts/do-you.coffee
scripts/do-you.coffee
# Description # @lefay do you ...? # # Author: # lcaro module.exports = (robot) -> robot.respond /do you (.+)$/i, (msg) -> msg.reply "yes I do in fact " + msg.match[1]
# Description # @lefay do you ...? # # Author: # lcaro module.exports = (robot) -> robot.respond /do you (.+)\??$/i, (msg) -> msg.reply "yes I do in fact " + msg.match[1]
Allow question marks in do you
Allow question marks in do you
CoffeeScript
mit
RiotGamesMinions/lefay,RiotGamesMinions/lefay
771c5a86ea0e871b6805f0653b37f6bbd98df16b
src/coffee/run.coffee
src/coffee/run.coffee
Config = require '../config' argv = require('optimist') .usage('Usage: $0 --projectKey key --clientId id --clientSecret secret') .demand(['projectKey','clientId', 'clientSecret']) .argv MarketPlaceStockUpdater = require('../main').MarketPlaceStockUpdater Config.timeout = 60000 Config.showProgress = true updater...
Config = require '../config' argv = require('optimist') .usage('Usage: $0 --projectKey key --clientId id --clientSecret secret') .demand(['projectKey','clientId', 'clientSecret']) .argv MarketPlaceStockUpdater = require('../main').MarketPlaceStockUpdater updater = new MarketPlaceStockUpdater(Config, argv.project...
Remove config as it shoud be set outside.
Remove config as it shoud be set outside.
CoffeeScript
mit
sphereio/sphere-stock-sync,sphereio/sphere-stock-sync
c3cce3f2c7ec1b36416bf70f0db005d47575f6a3
SingularityUI/app/utils.coffee
SingularityUI/app/utils.coffee
class Utils @getHTMLTitleFromHistoryFragment: (fragment) -> _.capitalize(fragment.split('\/').join(' ')) @getShortTaskID: (taskId) -> split = taskId.split(/\-|\:|\./) if split.length > 1 return "#{ split[0] }..." else if taskId.length > 20 ...
class Utils @getHTMLTitleFromHistoryFragment: (fragment) -> _.capitalize(fragment.split('\/').join(' ')) @getShortTaskID: (taskId) -> split = taskId.split(/\-|\:|\./) if split.length > 1 return "#{ split[0] }..." else return _.truncate(taskId, 20) ...
Use _.string's `truncate` here instead
Use _.string's `truncate` here instead
CoffeeScript
apache-2.0
tejasmanohar/Singularity,tejasmanohar/Singularity,calebTomlinson/Singularity,nvoron23/Singularity,acbellini/Singularity,calebTomlinson/Singularity,hs-jenkins-bot/Singularity,grepsr/Singularity,mjball/Singularity,tejasmanohar/Singularity,acbellini/Singularity,mjball/Singularity,evertrue/Singularity,andrhamm/Singularity,...
523b83f19ccd5b3a75f661b9664bc137928d0718
apps/helpers.coffee
apps/helpers.coffee
helpers = (app) -> # dynamic helpers are given request and response as parameters app.dynamicHelpers flash: (req, res) -> req.flash() logged_in: -> true # static helpers take any parametes and usually format data app.helpers # Object is a mongoose model object urlFor: (object) -> if obje...
helpers = (app) -> # dynamic helpers are given request and response as parameters app.dynamicHelpers flash: (req, res) -> req.flash() logged_in: -> true # static helpers take any parametes and usually format data app.helpers # Object is a mongoose model object urlFor: (object, path) -> i...
Add the option to pass a path into the urlFor helper method
Add the option to pass a path into the urlFor helper method
CoffeeScript
mit
EverFi/Sash,EverFi/Sash,EverFi/Sash
6f92d51bb03f3ebf827a19fb7bb2614075caa048
app/classifier/tasks/crop/index.cjsx
app/classifier/tasks/crop/index.cjsx
React = require 'react' CropInitializer = require './initializer' GenericTask = require '../generic' module.exports = React.createClass displayName: 'CropTask' statics: getSVGProps: ({workflow, classification, annotation}) -> tasks = require '../index' [previousCropAnnotation] = classification.ann...
React = require 'react' CropInitializer = require './initializer' GenericTask = require '../generic' module.exports = React.createClass displayName: 'CropTask' statics: getSVGProps: ({workflow, classification, annotation}) -> tasks = require '../index' [previousCropAnnotation] = classification.ann...
Disable Clear button when there's no crop
Disable Clear button when there's no crop
CoffeeScript
apache-2.0
edpaget/Panoptes-Front-End,edpaget/Panoptes-Front-End,edpaget/Panoptes-Front-End
5bd3f0119ab81b6eee13ff180d487a6017e4cf48
lib/rich-description.coffee
lib/rich-description.coffee
marked = require 'marked' renderer = new marked.Renderer() renderer.code = -> '' renderer.blockquote = -> '' renderer.heading = -> '' renderer.html = -> '' renderer.image = -> '' renderer.list = -> '' markdown = (text) -> marked(text, renderer: renderer).replace(/<p>(.*)<\/p>/, "$1").trim() module.expo...
marked = require 'marked' renderer = new marked.Renderer() renderer.code = -> '' renderer.blockquote = -> '' renderer.heading = -> '' renderer.html = -> '' renderer.image = -> '' renderer.list = -> '' markdown = (text) -> marked(text, renderer: renderer).replace(/<p>(.*)<\/p>/, "$1").trim() module.exports = getS...
Make simple functions more tidy
:art: Make simple functions more tidy
CoffeeScript
mit
atom/settings-view
311a97eb74cb99ae92edeeed66aaa8d175ea9371
client/lanes/models/ChangeSet.coffee
client/lanes/models/ChangeSet.coffee
class Lanes.Models.ChangeSet extends Lanes.Models.Base constructor: -> super this.created_at = new Date session: update: 'object' by: 'object' created_at: { type: 'date', setOnce: true } derived: record: { deps: ['collection'], fn: -> @collection.parent } ...
class Lanes.Models.ChangeSet extends Lanes.Models.Base constructor: -> super this.created_at = new Date session: update: 'object' by: 'object' created_at: { type: 'date', setOnce: true } derived: record: { deps: ['collection'], fn: -> @collection.parent } ...
Deal with change sets that are not arrays
Deal with change sets that are not arrays
CoffeeScript
mit
argosity/lanes,argosity/lanes,argosity/hippo,argosity/hippo,argosity/lanes,argosity/hippo
b57404084005da4ff48390c11ef8ad005d00e2f2
scripts/arnie-quotes.coffee
scripts/arnie-quotes.coffee
# Description: # Listens for words and sometimes replies with an Arnie quote # # Dependencies: # None # # Commands: # None # # Author: # Casey Lawrence <cjlaw@users.noreply.github.com> # odds = [1...100] arnie_quotes = [ 'GET TO THE CHOPPA! :arnold:', 'Your clothes, give them to me, now! :arnold:', ...
# Description: # Listens for words and sometimes replies with an Arnie quote # # Dependencies: # None # # Commands: # None # # Author: # Casey Lawrence <cjlaw@users.noreply.github.com> # odds = [1...100] arnie_quotes = [ 'GET TO THE CHOPPA!', 'Your clothes, give them to me, now!', 'Hasta La Vista...
Remove the Arnold emoji since it's not displaying
Remove the Arnold emoji since it's not displaying
CoffeeScript
mit
traviskroberts/superbestbot
1418c123a994204d908b5196286d122c68a5c00a
components/notifications_menu/client/notifications_view.coffee
components/notifications_menu/client/notifications_view.coffee
Backbone = require 'backbone' DropdownView = require '../../dropdown/client/dropdown_view.coffee' mediator = require '../../../lib/mediator.coffee' template = -> require('../templates/_dropdown_content.jade') arguments... module.exports = class NotificationsView extends DropdownView initialize: -> super m...
Backbone = require 'backbone' DropdownView = require '../../dropdown/client/dropdown_view.coffee' mediator = require '../../../lib/mediator.coffee' template = -> require('../templates/_dropdown_content.jade') arguments... module.exports = class NotificationsView extends DropdownView initialize: -> super m...
Fix notification class, clear on hover
Fix notification class, clear on hover
CoffeeScript
mit
aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell,broskoski/ervell,aredotna/ervell,arenahq/ervell,arenahq/ervell,broskoski/ervell
f528f61ec11c7a51eef157c21f42d1c494ad5b2b
common/static/coffee/spec/logger_spec.coffee
common/static/coffee/spec/logger_spec.coffee
describe 'Logger', -> it 'expose window.log_event', -> expect(window.log_event).toBe Logger.log describe 'log', -> it 'send a request to log event', -> spyOn $, 'getWithPrefix' Logger.log 'example', 'data' expect($.getWithPrefix).toHaveBeenCalledWith '/event', event_type: 'example...
describe 'Logger', -> it 'expose window.log_event', -> expect(window.log_event).toBe Logger.log describe 'log', -> it 'send event to Segment.io if event is whitelisted', -> spyOn 'analytics.track' Logger.log 'seq_goto', 'data' expect(analytics.track).toHaveBeenCalledWith 'seq_goto', 'data...
Add new Jasmine test to ensure Segment.io is called when appropriate
Add new Jasmine test to ensure Segment.io is called when appropriate
CoffeeScript
agpl-3.0
edry/edx-platform,WatanabeYasumasa/edx-platform,kalebhartje/schoolboost,naresh21/synergetics-edx-platform,DefyVentures/edx-platform,peterm-itr/edx-platform,dkarakats/edx-platform,zerobatu/edx-platform,IONISx/edx-platform,amir-qayyum-khan/edx-platform,valtech-mooc/edx-platform,shubhdev/edx-platform,hamzehd/edx-platform,...
a6ee42d91e750973b21461e72aeab35964bcfe89
src/state.coffee
src/state.coffee
class Game.State extends Game.TwoWay constructor: () -> @objects = {} @eventCounters = {} super onEvent: (e) -> # Add timestamped instance to the event counters object if e.type not of @eventCounters @eventCounters[e.type] = [] @eventCounters[e.type].push new Date() # relay the eve...
class Game.State extends Game.TwoWay constructor: () -> @objects = {} @eventCounters = {} @eventHandlers = {} super onEvent: (e) -> # Add timestamped instance to the event counters object if e.type not of @eventCounters @eventCounters[e.type] = [] @eventCounters[e.type].push new Da...
Add custom event handlers to Game.State
Add custom event handlers to Game.State
CoffeeScript
mit
eugene-bulkin/game-library,eugene-bulkin/game-library
6cce31310437c3f4656a1adbc44b1cdf86d71643
client/landing/app/MainApp/filetree/itemsubviews/copyurlview.coffee
client/landing/app/MainApp/filetree/itemsubviews/copyurlview.coffee
class NCopyUrlView extends JView constructor: -> super @path = FSHelper.plainPath @getData().path @publicPath = @path.replace \ ///.*\/(.*\.#{KD.config.userSitesDomain})\/(.*)///, 'http://$1/$2' @inputUrlLabel = new KDLabelView cssClass : 'public-url-label' title : '...
class NCopyUrlView extends JView constructor: -> super @path = FSHelper.plainPath @getData().path @publicPath = @path.replace \ ////home/(.*)/Web/(.*)///, "http://$1.#{KD.config.userSitesDomain}/$2" @inputUrlLabel = new KDLabelView cssClass : 'public-url-label' title ...
Fix copy file url issue
Fix copy file url issue
CoffeeScript
agpl-3.0
kwagdy/koding-1,mertaytore/koding,acbodine/koding,rjeczalik/koding,acbodine/koding,alex-ionochkin/koding,drewsetski/koding,szkl/koding,koding/koding,rjeczalik/koding,alex-ionochkin/koding,koding/koding,acbodine/koding,usirin/koding,rjeczalik/koding,jack89129/koding,drewsetski/koding,szkl/koding,szkl/koding,gokmen/kodin...
e65f08ed532b372e416af230732993cc183b8e04
spec/sort-lines-spec.coffee
spec/sort-lines-spec.coffee
{sortLines} = require '../lib/sort-lines' describe "SortLines", -> describe "sortLines(editor)", -> [editor, buffer] = [] beforeEach -> editor = atom.project.openSync() buffer = editor.getBuffer() editor.setText """ Hydrogen Helium Lithium Beryllium ...
{sortLines} = require '../lib/sort-lines' describe "SortLines", -> describe "sortLines(editor)", -> [editor] = [] beforeEach -> editor = atom.project.openSync() editor.setText """ Hydrogen Helium Lithium Beryllium Boron """ describe "when no lin...
Remove extraneous variable from specs
Remove extraneous variable from specs
CoffeeScript
mit
atom/sort-lines,garethbjohnson/sort-css
62b681557e312db302ce5e0e5a67bfd2b677fc1e
atom.symlink/config.cson
atom.symlink/config.cson
"*": editor: fontFamily: "Menlo" fontSize: 15 showIndentGuide: true invisibles: {} core: ignoredNames: [ ".DS_Store" ".bundle" ".git" ] disabledPackages: [ "preview-tabs" "script" ] projectHome: "/Users/justas/Projects" "spell-check": grammars:...
"*": editor: fontFamily: "Menlo" fontSize: 15 showIndentGuide: true invisibles: {} core: ignoredNames: [ ".DS_Store" ".bundle" ".git" ] disabledPackages: [ "preview-tabs" "script" ] projectHome: "/Users/justas/Projects" "spell-check": grammars:...
Update Atom RuboCop Linter command path
Update Atom RuboCop Linter command path
CoffeeScript
mit
jpalumickas/dotfiles,jpalumickas/dotfiles
b5aa0b900c8de79ab6a567600551e7ec33f9993a
src/packages/collaboration/lib/session-utils.coffee
src/packages/collaboration/lib/session-utils.coffee
Peer = require './peer' Guid = require 'guid' module.exports = createPeer: -> id = Guid.create().toString() new Peer(id, host: 'ec2-54-218-51-127.us-west-2.compute.amazonaws.com', port: 8080) connectDocument: (doc, connection) -> doc.outputEvents.on 'changed', (event) -> console.log 'sending eve...
Peer = require './peer' Guid = require 'guid' module.exports = createPeer: -> id = Guid.create().toString() new Peer(id, host: 'ec2-54-218-51-127.us-west-2.compute.amazonaws.com', port: 8080) connectDocument: (doc, connection) -> outputListener = (event) -> console.log 'sending event', event ...
Remove output listener when connection is closed
Remove output listener when connection is closed
CoffeeScript
mit
gisenberg/atom,vhutheesing/atom,gzzhanghao/atom,basarat/atom,jtrose2/atom,sebmck/atom,rsvip/aTom,dannyflax/atom,mdumrauf/atom,dannyflax/atom,johnrizzo1/atom,medovob/atom,yalexx/atom,Jandersolutions/atom,mnquintana/atom,rsvip/aTom,dijs/atom,kdheepak89/atom,Abdillah/atom,johnhaley81/atom,AlisaKiatkongkumthon/atom,me6iato...
9484fb41ccf4b0181622ed94806a8a9c88890b7b
doc/src/main.coffee
doc/src/main.coffee
Vue = require 'vue' hljs = require 'highlight.js' path = require 'path' vmdl = require '../../src/vue-mdl' require './style/mdl.scss' require 'highlight.js/styles/tomorrow.css' require 'material-design-lite/material.min.js' context = require.context './partials', false, /.vue$/ vmdl.registerAll Vue Vue.component 'tit...
Vue = require 'vue' hljs = require 'highlight.js/lib/highlight' path = require 'path' vmdl = require '../../src/vue-mdl' require './style/mdl.scss' require 'highlight.js/styles/tomorrow.css' require 'material-design-lite/material.min.js' context = require.context './partials', false, /.vue$/ vmdl.registerAll Vue Vue....
Include only what we need for syntax highlighting
Include only what we need for syntax highlighting
CoffeeScript
mit
posva/vue-mdl,posva/vue-mdl,posva/vue-mdl
d6dd52c487f638c455e5d952d33df9c577d6f565
client/landing/app/MainApp/filetree/itemviews/folderitem.coffee
client/landing/app/MainApp/filetree/itemviews/folderitem.coffee
class NFolderItemView extends NFileItemView constructor:(options = {},data)-> options.cssClass or= "folder" super options, data data.on "fs.chmod.finished", (recursive)=> warn "todo : refresh folder" if recursive if data.getExtension() is "kdapp" data.on "fs.delete.finished", => ...
class NFolderItemView extends NFileItemView constructor:(options = {},data)-> options.cssClass or= "folder" super options, data # data.on "fs.chmod.finished", (recursive)=> # warn "todo : refresh folder" if recursive # FIXME GG Remove that here use watcher features instead {nickname} =...
Refresh apps whenever Applications directory removed
Refresh apps whenever Applications directory removed
CoffeeScript
agpl-3.0
rjeczalik/koding,mertaytore/koding,gokmen/koding,usirin/koding,acbodine/koding,sinan/koding,sinan/koding,sinan/koding,koding/koding,szkl/koding,kwagdy/koding-1,kwagdy/koding-1,rjeczalik/koding,mertaytore/koding,cihangir/koding,alex-ionochkin/koding,koding/koding,alex-ionochkin/koding,cihangir/koding,gokmen/koding,jack8...
8b37193bc4964d17ae930feb7128df52ec9ed6e3
app/assets/javascripts/feeds.js.coffee
app/assets/javascripts/feeds.js.coffee
# 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://jashkenas.github.com/coffee-script/ $(document).ready -> # Dynamic styling when clicking on the sidebar folders $(".menu-...
# 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://jashkenas.github.com/coffee-script/ $(document).ready -> ########################################################## # DYNAMIC...
Use jquery function load() instead of get() when refreshing a feed. Instead of inserting new new entries, the whole list of entries for the feed is inserted, replacing the previous list.
Use jquery function load() instead of get() when refreshing a feed. Instead of inserting new new entries, the whole list of entries for the feed is inserted, replacing the previous list. This has several advantages: - cleaner code. - ensure that when refreshing always the current list of entries is displayed, even if...
CoffeeScript
mit
jmwenda/feedbunch,amatriain/feedbunch,jmwenda/feedbunch,jmwenda/feedbunch,amatriain/feedbunch,amatriain/feedbunch,amatriain/feedbunch
083597ef0d398e40ac23ea5e2423730538d3ad9f
lib/minimap-find-results-view.coffee
lib/minimap-find-results-view.coffee
{CompositeDisposable} = require 'event-kit' module.exports = (findAndReplace, minimapPackage) -> class MinimapFindResultsView constructor: (@model) -> @subscriptions = new CompositeDisposable @subscriptions.add @model.onDidUpdate @markersUpdated @decorationsByMarkerId = {} destroy: -> ...
{CompositeDisposable} = require 'event-kit' module.exports = (findAndReplace, minimapPackage) -> class MinimapFindResultsView constructor: (@model) -> @subscriptions = new CompositeDisposable @subscriptions.add @model.onDidUpdate @markersUpdated @decorationsByMarkerId = {} destroy: -> ...
Fix markers persisting after disabling the plugin
:bug: Fix markers persisting after disabling the plugin
CoffeeScript
mit
atom-minimap/minimap-find-and-replace
35de9077daad36cb2def095c6bc1b8488a8bd514
app/assets/javascripts/admin/enterprises/enterprises.js.coffee
app/assets/javascripts/admin/enterprises/enterprises.js.coffee
angular.module("admin.enterprises", [ "admin.paymentMethods", "admin.utils", "admin.shippingMethods", "admin.users", "textAngular", "admin.side_menu", "admin.taxons", 'admin.indexUtils', 'admin.tagRules', 'admin.dropdown', 'ngSanitize'] )
angular.module("admin.enterprises", [ "admin.paymentMethods", "admin.utils", "admin.shippingMethods", "admin.users", "textAngular", "admin.side_menu", "admin.taxons", 'admin.indexUtils', 'admin.tagRules', 'admin.dropdown', 'ngSanitize'] ) .config [ '$provide', ($provide) -> $prov...
Add config for taTranslations (no functional change)
Add config for taTranslations (no functional change)
CoffeeScript
agpl-3.0
mkllnk/openfoodnetwork,lin-d-hop/openfoodnetwork,openfoodfoundation/openfoodnetwork,lin-d-hop/openfoodnetwork,mkllnk/openfoodnetwork,openfoodfoundation/openfoodnetwork,Matt-Yorkley/openfoodnetwork,lin-d-hop/openfoodnetwork,Matt-Yorkley/openfoodnetwork,Matt-Yorkley/openfoodnetwork,lin-d-hop/openfoodnetwork,mkllnk/openfo...
88274a8a656ec4e9d2fd7cb99dc7459ff9cac239
lib/package-keymap-view.coffee
lib/package-keymap-view.coffee
{$$, $$$, _, View} = require 'atom' # Displays the keybindings for a package namespace module.exports = class PackageKeymapView extends View @content: -> @div class: 'package-keymap', => @div class: 'package-keymap-heading icon icon-keyboard', 'Keybindings' @table outlet: 'keymapTable', class: 'packa...
{$$, $$$, _, View} = require 'atom' # Displays the keybindings for a package namespace module.exports = class PackageKeymapView extends View @content: -> @section class: 'package-keymap', => @div class: 'section-heading package-keymap-heading icon icon-keyboard', 'Keybindings' @table outlet: 'keymapT...
Use section element in package keymap view
Use section element in package keymap view
CoffeeScript
mit
atom/settings-view
d64fd58732ed67738ddf5a797c02ba78cf44542e
app/assets/javascripts/modules/timelet/models/timelet.js.coffee
app/assets/javascripts/modules/timelet/models/timelet.js.coffee
# A model for a timelet # class Essence.Models.Timelet extends Backbone.Model localStorage: new Backbone.LocalStorage 'Timelets' defaults: running: false duration: 30 name: 'My Timelet'
# A model for a timelet # class Essence.Models.Timelet extends Backbone.Model localStorage: new Backbone.LocalStorage 'Timelets' defaults: running: false duration: '--' name: 'New timelet'
Use default attributes that make it clear that it is a new record.
Use default attributes that make it clear that it is a new record.
CoffeeScript
mit
kaethorn/essence
6803b9425a28415d14a28508746d05fb1de65864
apps/apply/client/modes.coffee
apps/apply/client/modes.coffee
module.exports = initial: value: 'initial' slug: '' copy: 'Select Organization Type' type: null gallery: value: 'gallery' slug: 'gallery' copy: 'Gallery' type: 'Gallery' institution: value: 'institution' slug: 'institution' copy: 'Institution' type: 'Museum/Institut...
module.exports = initial: value: 'initial' slug: '' copy: 'Select Organization Type' type: 'Other' gallery: value: 'gallery' slug: 'gallery' copy: 'Gallery' type: 'Gallery' institution: value: 'institution' slug: 'institution' copy: 'Institution' type: 'Museum/Insti...
Send unset type as "Other"
Send unset type as "Other"
CoffeeScript
mit
cavvia/force-1,erikdstock/force,yuki24/force,eessex/force,dblock/force,izakp/force,kanaabe/force,dblock/force,damassi/force,damassi/force,erikdstock/force,joeyAghion/force,cavvia/force-1,artsy/force-public,anandaroop/force,yuki24/force,xtina-starr/force,artsy/force,cavvia/force-1,artsy/force-public,mzikherman/force,iza...
752a3828429a329e7ba3f3a31b6ade9bf3b03076
www/webapp/static/webapp/js/app/views/tenants/tenantsShow.coffee
www/webapp/static/webapp/js/app/views/tenants/tenantsShow.coffee
Vosae.TenantsShowView = Vosae.PageTenantView.extend classNames: ["outlet-tenants", "page-show-tenants"] didInsertElement: -> @_super() # If user already selected or tenant or has only one tenant # he will be automaticaly redirected to the tenant's dashboard preselectedTenant = @get 'controller.ses...
Vosae.TenantsShowView = Vosae.PageTenantView.extend classNames: ["outlet-tenants", "page-show-tenants"] ### If user already selected or tenant or has only one tenant he will be automaticaly redirected to the tenant's dashboard, otherwise we hide the loader. ### checkTenants: (-> preselectedTena...
Fix a bug which prevent to see tenants because of the loader
Fix a bug which prevent to see tenants because of the loader
CoffeeScript
agpl-3.0
Naeka/vosae-web,Naeka/vosae-web,Naeka/vosae-web,Naeka/vosae-web
dbf2d83fdade699e3535f85de30854f79ca5f28e
app/classifier/tasks/survey/annotation-view.cjsx
app/classifier/tasks/survey/annotation-view.cjsx
React = require 'react' module.exports = React.createClass displayName: 'SurveyAnnotationView' getDefaultProperties: -> task: null classification: null annotation: null render: -> <div> {for identification, i in @props.annotation.value identification._key ?= Math.random() ...
React = require 'react' module.exports = React.createClass displayName: 'SurveyAnnotationView' getDefaultProperties: -> task: null classification: null annotation: null render: -> <div> {for identification, i in @props.annotation.value identification._key ?= Math.random() ...
Remove classification.update from survey task
Remove classification.update from survey task
CoffeeScript
apache-2.0
amyrebecca/Panoptes-Front-End,zooniverse/Panoptes-Front-End,amyrebecca/Panoptes-Front-End,amyrebecca/Panoptes-Front-End
6a799f7d3027e532d3b614a4aa9181df9ef54803
js/ab_test_definitions.coffee
js/ab_test_definitions.coffee
# 1. Don't define a test with null as one of the options # 2. If you change a test's options, you must also change the test's name # 3. Record your tests here: https://docs.google.com/a/circleci.com/spreadsheet/ccc?key=0AiVfWAkOq5p2dE1MNEU3Vkw0Rk9RQkJNVXIzWTAzUHc&usp=sharing # # You can add overrides, which will set th...
# 1. Don't define a test with null as one of the options # 2. If you change a test's options, you must also change the test's name # 3. Record your tests here: https://docs.google.com/a/circleci.com/spreadsheet/ccc?key=0AiVfWAkOq5p2dE1MNEU3Vkw0Rk9RQkJNVXIzWTAzUHc&usp=sharing # # You can add overrides, which will set th...
Revert "add ab tests for home button"
Revert "add ab tests for home button" This reverts commit d9c43403f18cbcab5d508a2c493683fa285d51e2.
CoffeeScript
epl-1.0
prathamesh-sonpatki/frontend,RayRutjes/frontend,prathamesh-sonpatki/frontend,RayRutjes/frontend,circleci/frontend,circleci/frontend,circleci/frontend
ffc6ed4da1021972aac7849c999527f5d0b3a41a
app/client/js/songs/edit/react/page.coffee
app/client/js/songs/edit/react/page.coffee
goog.provide 'app.songs.edit.react.Page' goog.require 'goog.ui.Textarea' class app.songs.edit.react.Page ###* @param {app.Routes} routes @constructor ### constructor: (routes) -> {div,form,input,textarea,a} = React.DOM @create = React.createClass render: -> div className: 'new-s...
goog.provide 'app.songs.edit.react.Page' goog.require 'goog.ui.Textarea' class app.songs.edit.react.Page ###* @param {app.Routes} routes @constructor ### constructor: (routes) -> {div,form,input,textarea,button,a} = React.DOM @create = React.createClass render: -> div className:...
Add on new song submit handler.
Add on new song submit handler.
CoffeeScript
mit
steida/songary
7721bd1dab6b59fa9df5aac77e7c2369ea997bb4
core/app/backbone/factlink/text_area_view.coffee
core/app/backbone/factlink/text_area_view.coffee
#= require jquery.autosize #we're using jquery autosize rather than jquery elastic since this works #even if initialized before the element is in the DOM. Backbone.Factlink ||= {} class Backbone.Factlink.TextAreaView extends Backbone.Marionette.ItemView template: 'generic/text_area' events: 'click': 'focusInp...
#= require jquery.autosize #we're using jquery autosize rather than jquery elastic since this works #even if initialized before the element is in the DOM. Backbone.Factlink ||= {} class Backbone.Factlink.TextAreaView extends Backbone.Marionette.ItemView template: 'generic/text_area' events: # 'click': 'focusI...
Tweak textarea input control; trimming unnecessary events, better layout when animating.
Tweak textarea input control; trimming unnecessary events, better layout when animating.
CoffeeScript
mit
Factlink/factlink-core,Factlink/factlink-core,daukantas/factlink-core,daukantas/factlink-core,daukantas/factlink-core,Factlink/factlink-core,Factlink/factlink-core,daukantas/factlink-core
4886e8ba0ec9bdcb66219cbd21d1c5a77e1937f0
services/web/app/coffee/Features/Analytics/AnalyticsManager.coffee
services/web/app/coffee/Features/Analytics/AnalyticsManager.coffee
Settings = require "settings-sharelatex" logger = require "logger-sharelatex" _ = require "underscore" if !Settings.analytics?.postgres? module.exports = recordEvent: (user_id, event, metadata, callback = () ->) -> logger.log {user_id, event, metadata}, "no event tracking configured, logging event" callback()...
Settings = require "settings-sharelatex" logger = require "logger-sharelatex" _ = require "underscore" if !Settings.analytics?.postgres? module.exports = recordEvent: (user_id, event, segmentation, callback = () ->) -> logger.log {user_id, event, segmentation}, "no event tracking configured, logging event" ca...
Rename metadata -> segmentation in Events table to play well with metabase
Rename metadata -> segmentation in Events table to play well with metabase
CoffeeScript
agpl-3.0
sharelatex/sharelatex
c8749d9b2a1fffa5a2d833fdab90170564d39302
client/admin/lib/views/stacks/editors/variableseditorview.coffee
client/admin/lib/views/stacks/editors/variableseditorview.coffee
BaseStackEditorView = require './basestackeditorview' module.exports = class VariablesEditorView extends BaseStackEditorView constructor: (options = {}, data) -> super options, data
BaseStackEditorView = require './basestackeditorview' module.exports = class VariablesEditorView extends BaseStackEditorView constructor: (options = {}, data) -> unless options.content options.content = """ { "variables": { } } """ super options, data
Set default content to variables editor
Set default content to variables editor
CoffeeScript
agpl-3.0
usirin/koding,jack89129/koding,mertaytore/koding,rjeczalik/koding,alex-ionochkin/koding,sinan/koding,jack89129/koding,szkl/koding,andrewjcasal/koding,jack89129/koding,sinan/koding,mertaytore/koding,andrewjcasal/koding,drewsetski/koding,mertaytore/koding,rjeczalik/koding,rjeczalik/koding,kwagdy/koding-1,szkl/koding,sina...
ed9b2dddb56c9993fe224155410484bd9e936fcb
test/e2e/collectionDetailSpec.coffee
test/e2e/collectionDetailSpec.coffee
expect = require('./helpers/expect')() Page = require './helpers/page' describe 'E2E Testing Collection Detail', -> page = null beforeEach -> page = new Page '/quip/breast?project=QIN_Test' it 'should load the page', -> expect(page.content, 'The page was not loaded') .to.eventually.exist
#_ = require 'lodash' #webdriver = require 'selenium-webdriver' expect = require('./helpers/expect')() Page = require './helpers/page' describe 'E2E Testing Collection Detail', -> page = null before -> page = new collectionDetailPage() it 'should load the page', -> expect(page.content, 'The page was...
Add collection detail E2E test cases.
Add collection detail E2E test cases.
CoffeeScript
bsd-2-clause
ohsu-qin/qiprofile,ohsu-qin/qiprofile,ohsu-qin/qiprofile,ohsu-qin/qiprofile
285361f044934f4cf9719b81d15e3fe6f66c4491
components/__tests__/ProgressBar.spec.cjsx
components/__tests__/ProgressBar.spec.cjsx
React = require('react/addons') expect = require('expect') utils = require('./utils') TestUtils = React.addons.TestUtils ProgressBar = require('../progress_bar') describe 'ProgressBar', -> describe '#props', -> it 'has the right default properties', -> progress = TestUtils.renderIntoDoc...
expect = require('expect') utils = require('./utils') TestUtils = React.addons.TestUtils ProgressBar = require('../progress_bar') describe 'ProgressBar', -> describe '#props', -> it 'has the right default properties', -> progress = TestUtils.renderIntoDocument(<ProgressBar />) expect(pr...
Remove react explicit dependency in progressbar test
Remove react explicit dependency in progressbar test
CoffeeScript
mit
jasonleibowitz/react-toolbox,rubenmoya/react-toolbox,Magneticmagnum/react-atlas,jasonleibowitz/react-toolbox,rubenmoya/react-toolbox,soyjavi/react-toolbox,KerenChandran/react-toolbox,react-toolbox/react-toolbox,react-toolbox/react-toolbox,showings/react-toolbox,rubenmoya/react-toolbox,react-toolbox/react-toolbox,Digita...
35100991e28d9d42815dab248da100c05c4259d8
examples/basic/server.coffee
examples/basic/server.coffee
exists = require('fs').exists app = module.exports = require('express')() JFUM = require '../../src/index.coffee' jfum = new JFUM() app.options '/upload', jfum.optionsHandler.bind(jfum) app.post '/upload', jfum.postHandler.bind(jfum), (req, res, next) -> console.log req.jfum return res.json foo: 'bar' if req.jfum ...
exists = require('fs').exists app = module.exports = require('express')() JFUM = require '../../src/index.coffee' jfum = new JFUM minFileSize: 0 maxFileSize: 10000000000 acceptFileTypes: /\.(gif|jpe?g|png)$/i app.options '/upload', jfum.optionsHandler.bind(jfum) app.post '/upload', jfum.postHandler.bind(jfum), (...
Add JFUM options to example
Add JFUM options to example
CoffeeScript
mit
Turistforeningen/node-jfum,Turistforeningen/node-jfum
ce91f3391f6ac59777d39611115c02d20041542f
app/assets/javascripts/components/league.js.coffee
app/assets/javascripts/components/league.js.coffee
{div, button} = React.DOM LeagueButton = React.createFactory @LeagueButton PlayerTable = React.createFactory @PlayerTable TeamTable = React.createFactory @TeamTable @League = React.createClass getInitialState: -> activeView: "Player Stats" handleViewChange: (view) -> @setState activeView: view render: -> di...
{div, button} = React.DOM LeagueButton = React.createFactory @LeagueButton PlayerTable = React.createFactory @PlayerTable TeamTable = React.createFactory @TeamTable @League = React.createClass getInitialState: -> activeView: "Player Stats" handleViewChange: (view) -> @setState activeView: view render: ...
Fix indentation issues question mark
Fix indentation issues question mark
CoffeeScript
mit
maxkohl88/fantasy_tracker,maxkohl88/fantasy_tracker,maxkohl88/fantasy_tracker
635440021bd3ae4e8aa09e785b67dc53a8321356
test/integration/helper.coffee
test/integration/helper.coffee
# Shared before/after functions for all integration tests {wd40, browser} = require 'wd40' cleaner = require '../cleaner' request = require 'request' base_url = 'http://localhost:3001' login_url = "#{base_url}/login" prepIntegration = -> before (done) -> cleaner.clear_and_set_fixtures -> wd40.init -> ...
# Shared before/after functions for all integration tests {wd40, browser} = require 'wd40' cleaner = require '../cleaner' request = require 'request' test_server = process.env.CU_TEST_SERVER ? 'localhost' base_url = "http://#{test_server}:3001" login_url = "#{base_url}/login" prepIntegration = -> before (done) -> ...
Use CU_TEST_SERVER environment variable when creating URL to contact custard on. Allows for running Selenium on a different computer.
Use CU_TEST_SERVER environment variable when creating URL to contact custard on. Allows for running Selenium on a different computer.
CoffeeScript
agpl-3.0
scraperwiki/custard,scraperwiki/custard,scraperwiki/custard
c8977ab9d62150ad8411882cdb4f43545fd83c52
services/web/app/coffee/models/Subscription.coffee
services/web/app/coffee/models/Subscription.coffee
mongoose = require 'mongoose' Settings = require 'settings-sharelatex' Schema = mongoose.Schema ObjectId = Schema.ObjectId SubscriptionSchema = new Schema admin_id : {type:ObjectId, ref:'User', index: {unique: true, dropDups: true}} member_ids : [ type:ObjectId, ref:'User' ] invited_emails: [ String ] ...
mongoose = require 'mongoose' Settings = require 'settings-sharelatex' Schema = mongoose.Schema ObjectId = Schema.ObjectId SubscriptionSchema = new Schema admin_id : {type:ObjectId, ref:'User', index: {unique: true, dropDups: true}} member_ids : [ type:ObjectId, ref:'User' ] invited_emails: [ String ] ...
Add overleaf id to user schema
Add overleaf id to user schema
CoffeeScript
agpl-3.0
sharelatex/sharelatex
e221584b38e5c3d30881d554d8f481268e93115e
lib/open-last-project.coffee
lib/open-last-project.coffee
FS = require('fs') module.exports = Save:-> try Files = [] ActiveEditor = atom.workspace.getActiveEditor() atom.workspace.eachEditor (editor)-> File = editor.getPath() return unless File Files.push File CurrentFile = ActiveEditor && ActiveEditor.getPath() || null;...
FS = require('fs') module.exports = Save:-> try Files = [] ActiveEditor = atom.workspace.getActiveEditor() atom.workspace.eachEditor (editor)-> File = editor.getPath() return unless File Files.push File CurrentFile = ActiveEditor && ActiveEditor.getPath() || null;...
Fix for scenarios where the localStorage item has old version's value
:bug: Fix for scenarios where the localStorage item has old version's value
CoffeeScript
mit
danielmahon/atom-open-last-project
400a939136c5e11d08dbab48b35c7bad96e07581
app/assets/javascripts/sprangular/directives/addressSelection.coffee
app/assets/javascripts/sprangular/directives/addressSelection.coffee
Sprangular.directive 'addressSelection', -> restrict: 'E' templateUrl: 'addresses/selection.html' scope: address: '=' addresses: '=' countries: '=' controller: ($scope) -> $scope.existingAddress = false $scope.$watch 'addresses', (addresses) -> return unless addresses if addres...
Sprangular.directive 'addressSelection', -> restrict: 'E' templateUrl: 'addresses/selection.html' scope: address: '=' addresses: '=' countries: '=' controller: ($scope) -> $scope.existingAddress = false $scope.$watch 'addresses', (addresses) -> return unless addresses if addres...
Initialize $scope.address when switching to existing address mode
Initialize $scope.address when switching to existing address mode
CoffeeScript
mit
sprangular/sprangular,sprangular/sprangular,sprangular/sprangular
be404fd4e9032e459f9f2b7220aa8279cc013dd6
assets/javascripts/mac_auth.js.coffee
assets/javascripts/mac_auth.js.coffee
class TentStatus.MacAuth constructor: (@options) -> @options = _.extend { time: parseInt((new Date * 1) / 1000) nonce: Math.random().toString(16).substring(3) }, @options signRequest: => request_string = @buildRequestString() signature = CryptoJS.enc.Base64.stringify(CryptoJS.HmacSHA256...
class TentStatus.MacAuth constructor: (@options) -> @options = _.extend { time: parseInt((new Date * 1) / 1000) nonce: Math.random().toString(16).substring(3) }, @options signRequest: => request_string = @buildRequestString() signature = CryptoJS.enc.Base64.stringify(CryptoJS.HmacSHA256...
Remove body from mac signature
Remove body from mac signature
CoffeeScript
bsd-3-clause
tent/tent-status,tent/tent-status
676302084aae2e434ec68e202d62e2d2ae94f93f
app/components/user-search.cjsx
app/components/user-search.cjsx
React = require 'react' Select = require 'react-select' PromiseRenderer = require './promise-renderer' apiClient = require '../api/client' debounce = require 'debounce' module.exports = React.createClass displayName: 'UserSearch' searchUsers: (value, callback) -> unless value is '' apiClient.type('users...
React = require 'react' Select = require 'react-select' PromiseRenderer = require './promise-renderer' apiClient = require '../api/client' debounce = require 'debounce' module.exports = React.createClass displayName: 'UserSearch' searchUsers: (value, callback) -> unless value is '' apiClient.type('users...
Add asterisk to display_name to trigger search
Add asterisk to display_name to trigger search I made a small backend change. This fixes user search for it
CoffeeScript
apache-2.0
camallen/Panoptes-Front-End,camallen/Panoptes-Front-End,alexbfree/Panoptes-Front-End,tfmorris/Panoptes-Front-End,edpaget/Panoptes-Front-End,mrniaboc/Panoptes-Front-End,parrish/Panoptes-Front-End,edpaget/Panoptes-Front-End,mrniaboc/Panoptes-Front-End,zooniverse/Panoptes-Front-End,CKrawczyk/Panoptes-Front-End,parrish/Pan...
9157372b0e43d9f097af01f588c88d0f2746b6f1
app/stores/subject-store.coffee
app/stores/subject-store.coffee
Reflux = require 'reflux' {api} = require '../api/client' config = require '../lib/config' classifierActions = require '../actions/classifier-actions' module.exports = Reflux.createStore subjects: [] subject: null init: -> @next() @listenTo classifierActions.moveToNextSubject, @next getInitialState: ...
Reflux = require 'reflux' {api} = require '../api/client' config = require '../lib/config' classifierActions = require '../actions/classifier-actions' module.exports = Reflux.createStore subjects: [] subject: null init: -> @next() @listenTo classifierActions.moveToNextSubject, @next getInitialState: ...
Replace resource URLs with https versions
Replace resource URLs with https versions This modifies the Subject resource to use an HTTPS url for the image location. Previously, it was doing a secure prefetch, but an insecure load on the classifier interface
CoffeeScript
apache-2.0
zooniverse/wildcam-gorongosa,conneelyb/wildcam-gorongosa,conneelyb/wildcam-gorongosa,zooniverse/wildcam-gorongosa
3f3d1c05c49d91ff28dead34b8915d0375070ed4
apps/home/client/index.coffee
apps/home/client/index.coffee
{ DEMO_BLOCKS } = require('sharify').data imagesLoaded = require 'imagesloaded' slides = require './slides.coffee' loggedOutNav = require '../../../components/logged_out_nav/client/index.coffee' blockTemplate = -> require('../../../components/block_v2/templates/block.jade') arguments... { mountWithApolloProvider } =...
{ DEMO_BLOCKS } = require('sharify').data imagesLoaded = require 'imagesloaded' { default: Player } = require '@vimeo/player'; slides = require './slides.coffee' loggedOutNav = require '../../../components/logged_out_nav/client/index.coffee' blockTemplate = -> require('../../../components/block_v2/templates/block.ja...
Set up js for swapping video for image
Set up js for swapping video for image
CoffeeScript
mit
aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell
39c8a6a1939d2b2da75a1fb61c35df382331a552
services/web/public/coffee/ide/AutoCompileOnboardingController.coffee
services/web/public/coffee/ide/AutoCompileOnboardingController.coffee
define [ "base" ], (App) -> App.controller "AutoCompileOnboardingController", ($scope) -> recompileBtn = angular.element('#recompile') popover = angular.element('.onboarding__autocompile') { top, left } = recompileBtn.offset() # If pdf panel smaller than recompile button + popover, show to left. # Otherwis...
define [ "base" ], (App) -> App.controller "AutoCompileOnboardingController", ($scope) -> recompileBtn = angular.element('#recompile') popover = angular.element('.onboarding__autocompile') { top, left } = recompileBtn.offset() # If pdf panel smaller than recompile button + popover, show to left. # Otherwis...
Send analytics data when onboarding dismissed
Send analytics data when onboarding dismissed
CoffeeScript
agpl-3.0
sharelatex/sharelatex
e1535f79c248c4fa27013b77b7f1dbc21b723541
src/Lidsys/Application/Controller/assets/lidsys/app-models.js.coffee
src/Lidsys/Application/Controller/assets/lidsys/app-models.js.coffee
window.ActiveService = class ActiveService constructor: -> @user = null setUser: (@user) -> getUser: -> @user isLoggedIn: -> !!(@user && @user.userId) window.User = class User constructor: -> @userId = null @permissions = {} isAuthorized: (permission) -> i...
window.ActiveService = class ActiveService constructor: -> @user = null setUser: (@user) -> getUser: -> @user isLoggedIn: -> !!(@user && @user.userId) window.User = class User constructor: -> @userId = null @username = null @name = nul...
Add user's name and background color to User JS model
Add user's name and background color to User JS model
CoffeeScript
bsd-3-clause
lightster/lidsys-web,lightster/lidsys-web,lightster/lidsys-web,lightster/lidsys-web
d04b6fb4e5dbc2d0d0a4bc312a35b8f4dc50ce58
app/assets/javascripts/projects.js.coffee
app/assets/javascripts/projects.js.coffee
$ -> projects = $('#projects').clone() languages = [] $('#languages a').click (e) -> clicked_language = $(this).data().language unless clicked_language? resetLanguage() return unless e.ctrlKey or e.metaKey languages = [].concat(clicked_language) else unless clicked_langu...
$ -> projects = $('#projects').clone() languages = [] $('#languages a').click (e) -> clicked_language = $(this).data().language unless clicked_language? resetLanguage() return false unless e.ctrlKey or e.metaKey languages = [].concat(clicked_language) else unless clicked...
Disable default link behaviour on project filter links
Disable default link behaviour on project filter links
CoffeeScript
mit
arumoy-shome/24pullrequests,24pullrequests/24pullrequests,wadtech/24pullrequests,jasnow/24pullrequests,acrogenesis-lab/24pullrequests,tegon/24pullrequests,vyorkin-forks/24pullrequests,24pullrequests/24pullrequests,wadtech/24pullrequests,pimterry/24pullrequests,tegon/24pullrequests,pimterry/24pullrequests,pimterry/24pul...
2658d9e6663f892064da5ff904c2b85fd863f2d0
app/assets/javascripts/hyper_admin/angularjs/controllers/form_ctrl.js.coffee
app/assets/javascripts/hyper_admin/angularjs/controllers/form_ctrl.js.coffee
angular.module("hyperadmin") .controller "FormCtrl", ($scope, $state, Restangular, Flash) -> @resource = { } mode = $state.current.data.mode if mode == "new" method = "post" target = "admin/#{$scope.resourceClass.plural}" successMessage = "#{$scope.resourceClass.singular_human} created ...
angular.module("hyperadmin") .controller "FormCtrl", ($scope, $state, Restangular, Flash) -> @resource = { } mode = $state.current.data.mode if mode == "new" method = "post" target = "admin/#{$scope.resourceClass.plural}" successMessage = "#{$scope.resourceClass.singular_human} created ...
Convert dates to actual JS dates for form
Convert dates to actual JS dates for form
CoffeeScript
mit
hyperoslo/hyper_admin,hyperoslo/hyper_admin,hyperoslo/hyper_admin
d3bf5db8c5d60e70b6a563611fd80b505f8fa658
apps/about/client/index.coffee
apps/about/client/index.coffee
loggedOutNav = require '../../../components/logged_out_nav/client/index.coffee' module.exports = -> $html = $('html, body') $el = $('.js-about') $links = $el.find('a[href*=#]') $sections = $el.find('.js-section[id]') loggedOutNav $sections: $sections scrollToId = (id) -> $target = $sections.filte...
loggedOutNav = require '../../../components/logged_out_nav/client/index.coffee' module.exports = -> $html = $('html, body') $el = $('.js-about') $links = $el.find('a[href]') $sections = $el.find('.js-section[id]') loggedOutNav $sections: $sections scrollToId = (id) -> $target = $sections.filter("...
Fix about page mobile menu selector
Fix about page mobile menu selector
CoffeeScript
mit
aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell
157ae5b3ad42caed57591e2d5e637fbd65244d57
app/scripts/app.coffee
app/scripts/app.coffee
App = window.App = Ember.Application.create() App.ApplicationSerializer = DS.RESTSerializer.extend DS.EmbeddedRecordsMixin, keyForAttribute: (key, relationship) -> return Ember.String.capitalize(key) extract: (store, type, payload, id, requestType) -> normalizedPayload = {} normalizedPayload[Ember.St...
App = window.App = Ember.Application.create() App.ApplicationSerializer = DS.RESTSerializer.extend DS.EmbeddedRecordsMixin, serializeIntoHash: (hash, type, record, options) -> Ember.merge(hash, this.serialize(record, options)) keyForAttribute: (key, relationship) -> return Ember.String.capitalize(key) ...
Change json payload to not have root element to align with what server expects.
Change json payload to not have root element to align with what server expects.
CoffeeScript
apache-2.0
intervention-engine/frontend,intervention-engine/frontend,intervention-engine/frontend
f2006eebeebb8a5e51cd316080849431fef5d2fe
src/provider/twitch-vod.coffee
src/provider/twitch-vod.coffee
urlparse = require 'url' request = require '../request' Media = require '../media' exports.lookup = (id) -> return request.getJSON("https://api.twitch.tv/kraken/videos/#{id}").then((result) -> media = new Media( id: id title: result.title duration: result.length ...
urlparse = require 'url' request = require '../request' Media = require '../media' CLIENT_ID = null exports.lookup = (id) -> if not CLIENT_ID return Promise.reject(new Error('Client ID not set for Twitch API')) return request.getJSON("https://api.twitch.tv/kraken/videos/#{id}", headers: ...
Add Client-ID header for Twitch API
Add Client-ID header for Twitch API
CoffeeScript
mit
CyTube/mediaquery
b34d27e0b45ed4654e8a5453c4c63a24cb832f7f
app/scripts/components/entities/Mine.coffee
app/scripts/components/entities/Mine.coffee
Crafty.c 'Mine', init: -> @requires 'Color, Enemy' drone: (attr = {}) -> @attr _.defaults(attr, w: 25, h: 25, health: 200) @origin 'center' @color '#999999' @enemy() this
Crafty.c 'Mine', init: -> @requires 'Color, Enemy' drone: (attr = {}) -> @attr _.defaults(attr, w: 25, h: 25, health: 200) @origin 'center' @color '#666666' @enemy() this
Make mine more visible in daylight
Make mine more visible in daylight
CoffeeScript
mit
matthijsgroen/game-play,matthijsgroen/game-play,matthijsgroen/game-play
81c3a581c553f0604d3f5f1915a5ff0961618237
src/desktop/components/split_test/running_tests.coffee
src/desktop/components/split_test/running_tests.coffee
# Centralizes configuration for currently running split tests # # eg. # header_design: # key: 'header_design' # outcomes: # old: 8 # new: 2 # # Or, `outcomes` can be an array, when you specify `weighting: 'equal'. # weighting: 'equal' # outcomes: [ # 'old' # 'new' # ] # edge: 'new' # dimen...
# Centralizes configuration for currently running split tests # # eg. # header_design: # key: 'header_design' # outcomes: # old: 8 # new: 2 # # Or, `outcomes` can be an array, when you specify `weighting: 'equal'. # weighting: 'equal' # outcomes: [ # 'old' # 'new' # ] # edge: 'new' # dimen...
Set up A/B test for Collection Hubs (for now admin-only)
Set up A/B test for Collection Hubs (for now admin-only) Signed-off-by: Myk Bilokonsky <75f49cdf1693dcb6c4be1fd9678ee266e958b7d5@gmail.com>
CoffeeScript
mit
cavvia/force-1,anandaroop/force,eessex/force,yuki24/force,oxaudo/force,joeyAghion/force,erikdstock/force,izakp/force,joeyAghion/force,oxaudo/force,artsy/force,joeyAghion/force,eessex/force,izakp/force,artsy/force,cavvia/force-1,artsy/force,izakp/force,damassi/force,eessex/force,cavvia/force-1,artsy/force-public,oxaudo/...
0ca51951ba4a9ad9c0fbfbf8f72a441bd6ec283b
app/assets/javascripts/oxalis/controller/abstract_tree_controller.coffee
app/assets/javascripts/oxalis/controller/abstract_tree_controller.coffee
### define ../view/skeletontracing/abstract_tree_view : AbstractTreeView ### class AbstractTreeController model : null view : null constructor : (@model) -> container = $("#abstractTreeViewer") @view = new AbstractTreeView(container.width(), container.height()) container.append(@view.canva...
### define ../view/skeletontracing/abstract_tree_view : AbstractTreeView ### class AbstractTreeController model : null view : null constructor : (@model) -> container = $("#abstractTreeViewer") @view = new AbstractTreeView(container.width(), container.height()) container.append(@view.canvas) ...
Remove trailing spaces, trigger jenkins
Remove trailing spaces, trigger jenkins
CoffeeScript
agpl-3.0
scalableminds/webknossos,scalableminds/webknossos,scalableminds/webknossos,scalableminds/webknossos,scalableminds/webknossos,scalableminds/webknossos
900fb9299968c543f0621a993026911163ac3878
src/kato-http-api.coffee
src/kato-http-api.coffee
# Description: # Enable Hubot to post messages to Kato rooms using the HTTP API, allowing for messages with a coloured background and varying poster name. # # Dependencies: # None # # Configuration: # None # # Commands: # Emit event "kato-http-message" from your script, after setting room name-id matches in Hub...
# Description: # Enable Hubot to post messages to Kato rooms using the HTTP API, allowing for messages with a coloured background and varying poster name. # # Dependencies: # None # # Configuration: # None # # Commands: # Emit event "kato-http-message" from your script, after setting Kato "All" room URL in envi...
Set up environment variable to hold Kato "All" room HTTP POST URL.
Set up environment variable to hold Kato "All" room HTTP POST URL.
CoffeeScript
mit
ocean/hubot-kato-http-api
f8d080fa7747a1f94eb45e87f6d051502734336c
app/assets/javascripts/hyper_admin/angularjs/directives/form/form_actions.js.coffee
app/assets/javascripts/hyper_admin/angularjs/directives/form/form_actions.js.coffee
angular.module("hyperadmin") .directive "formActions", -> template: """ <div class="form-group"> <div class="col-sm-offset-2 col-sm-10"> <md-button type="submit" class="md-primary md-raised" ng-disabled="form.$invalid">Submit</md-button> <md-button class="md-warn" ui-sref="^">Cancel</a> </div> <...
angular.module("hyperadmin") .directive "formActions", -> template: """ <div class="form-group"> <div class="col-sm-offset-2 col-sm-10" layout="row"> <md-button type="submit" class="md-primary md-raised" ng-disabled="form.$invalid">Submit</md-button> <md-button class="md-warn" ui-sref="^">Cancel</...
Fix form button alignment issue
Fix form button alignment issue
CoffeeScript
mit
hyperoslo/hyper_admin,hyperoslo/hyper_admin,hyperoslo/hyper_admin
7024add83730916c02d5fc08fd6bb98de66f9f38
app/assets/javascripts/static.js.coffee
app/assets/javascripts/static.js.coffee
# 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 ...
# 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/ roundUpToThousand = (value) -> return 1000 * Math.ceil(value / 1000) $ -> animateMetric = $(".metric-bo...
Increment number by 1000s until almost at target
Increment number by 1000s until almost at target
CoffeeScript
agpl-3.0
otherchirps/morph,otherchirps/morph,openaustralia/morph,otherchirps/morph,openaustralia/morph,otherchirps/morph,openaustralia/morph,openaustralia/morph,otherchirps/morph,openaustralia/morph,otherchirps/morph,openaustralia/morph,otherchirps/morph,openaustralia/morph
2e63d2a4a76011969fcbfbc2f7bcebedc82e2d9c
app/src/wallet/sweep_private_key.coffee
app/src/wallet/sweep_private_key.coffee
@ledger.wallet ?= {} _.extend ledger.wallet, sweepPrivateKey: ({privateKey, account, txFee: 10000}, callback) -> completion = new CompletionClosure(callback) recipientAddress = account.getHDAccount().getCurrentPublicAddress() ecKey = new window.bitcoin.ECKey.fromWIF(privateKey) publicKey = e...
@ledger.wallet ?= {} _.extend ledger.wallet, sweepPrivateKey: ({privateKey, account, txFee}, callback) -> txFee ?= 10000 completion = new CompletionClosure(callback) recipientAddress = account.getHDAccount().getCurrentPublicAddress() ecKey = new window.bitcoin.ECKey.fromWIF(privateKey) ...
Fix bad parameter in sweepPrivateKey
Fix bad parameter in sweepPrivateKey
CoffeeScript
mit
Morveus/ledger-wallet-doge-chrome,LedgerHQ/ledger-wallet-chrome,LedgerHQ/ledger-wallet-chrome,Morveus/ledger-wallet-doge-chrome
dbb7853b3d9543871cf01c0f80d221b02dbc9fe0
app/views/admin/update_paypal.js.coffee
app/views/admin/update_paypal.js.coffee
$(".club-admin-status-text").html "<%= escape_javascript(render :partial => 'admin/club_live_status', :formats => [ :html ]) %>" $(".club-promote-text").html "<%= escape_javascript(render :partial => 'admin/club_promote', :locals => { :club => @club }, :formats => [ :html ]) %>" $(".modal").removeClass "paypal-confirm-...
$(".verified-status-tag").html "<%= escape_javascript(render :partial => 'shared/verified_status_tag', :formats => [ :html ]) %>" $(".club-admin-status-text").html "<%= escape_javascript(render :partial => 'admin/club_live_status', :formats => [ :html ]) %>" $(".club-promote-text").html "<%= escape_javascript(render :p...
Fix Admin PayPal Verified Tag Update
Fix Admin PayPal Verified Tag Update Fix the Admin page to ensure that when a User verifies their account, the corresponding PayPal verified tag in the header is updated.
CoffeeScript
mit
jekhokie/IfSimply,jekhokie/IfSimply,jekhokie/IfSimply
b5a42140935b20b2f3f959988eea4fb51c3e3ebc
src/scripts/helpers/backbone/views/base.coffee
src/scripts/helpers/backbone/views/base.coffee
define [ 'jquery' 'underscore' 'backbone' ], ($, _, Backbone) -> class Region constructor: (el, parent) -> @parent = parent @el = el show: (view) -> @$el = @$el or @parent.$el.find(@el) view.parent = @parent @view = view @view.setElement(@$el).render() close: (...
define [ 'jquery' 'underscore' 'backbone' ], ($, _, Backbone) -> class Region constructor: (el, parent) -> @parent = parent @el = el show: (view) -> @close() @append(view) append: (view) -> @$el = @$el or @parent.$el.find(@el).eq(0) view.parent = @parent ...
Allow views to be appended
Allow views to be appended
CoffeeScript
agpl-3.0
dak/webview,katalysteducation/webview,katalysteducation/webview,Connexions/webview,dak/webview,Connexions/webview,Connexions/webview,katalysteducation/webview,Connexions/webview,dak/webview,katalysteducation/webview,carolinelane10/webview
b80a1e10797ed34e6bc6457f4169ad7fd1ae8277
src/scripts/index.coffee
src/scripts/index.coffee
run = () -> ReactDOM = require 'react-dom' cookie = require 'cookie' { XmlEntities } = require 'html-entities' init = require './init.coffee' { store } = require './store.coffee' userActions = require './actions/user-actions.coffee' routes = require './views/routes.coffee' createFactory = require './create-fac...
require('es6-promise').polyfill() assign = require 'object-assign' ReactDOM = require 'react-dom' cookie = require 'cookie' { XmlEntities } = require 'html-entities' init = require './init.coffee' { store } = require './store.coffee' userActions = require './actions/user-actions.coffee' routes = require './views/route...
Remove conditional polyfilling again. es6-promise should always be included since native Promise in Chrome is buggy. object-assign is so small it makes no sense to conditionally load on its own. fetch is a bit unfinished, and doesn't support cookies, so giving up on that for now.
Remove conditional polyfilling again. es6-promise should always be included since native Promise in Chrome is buggy. object-assign is so small it makes no sense to conditionally load on its own. fetch is a bit unfinished, and doesn't support cookies, so giving up on that for now.
CoffeeScript
mit
thirdhand/3rdhand.info,thirdhand/3rdhand.info
e05b149a0e81b646d5f3083aa3baf0afe39755b6
lib/models/application.coffee
lib/models/application.coffee
Promise = require('bluebird') canvas = require('./_canvas') exports.getAll = -> return canvas.get resource: 'application' options: orderby: 'app_name asc' expand: 'device' exports.get = (id) -> return canvas.get resource: 'application' id: id .then (application) -> if not application? Promise.r...
Promise = require('bluebird') canvas = require('./_canvas') exports.getAll = -> return canvas.get resource: 'application' options: orderby: 'app_name asc' expand: 'device' exports.get = (id) -> return canvas.get resource: 'application' id: id .then (application) -> if not application? return Pr...
Return promise rejection to prevent Bluebird from complaining
Return promise rejection to prevent Bluebird from complaining
CoffeeScript
apache-2.0
resin-io/resin-cli,resin-io/resin-cli,resin-io/resin-cli,resin-io/resin-cli
ccfcd04ab2e722006daabf0547fe049fd42640e9
web/js/views/search_input_view.coffee
web/js/views/search_input_view.coffee
define ['jquery', 'underscore', 'backbone', 'bootstrap', 'plugins/select_range'], ($, _, Backbone) -> class SearchInputView extends Backbone.View initialize: () -> @$el.typeahead source: @getTypeaheadAddresses updater: (item) => _.defer @afterTypeahead item minLe...
define ['jquery', 'underscore', 'backbone', 'bootstrap', 'plugins/select_range'], ($, _, Backbone) -> class SearchInputView extends Backbone.View initialize: () -> @$el.typeahead source: @getTypeaheadAddresses updater: (item) => _.defer @afterTypeahead item minLe...
Add blur method to SearchInputView.
Add blur method to SearchInputView.
CoffeeScript
mit
reitti/reittiopas,reitti/reittiopas
34897b8a18e92c31102b9504935a959260dd0ba7
bokehjs/gulp/tasks/default.coffee
bokehjs/gulp/tasks/default.coffee
gulp = require "gulp" defaultTasks = [ "scripts:minify:watch", "styles:minify:watch", "develop:watch", ] gulp.task "default", defaultTasks, ->
gulp = require "gulp" defaultTasks = [ "scripts:watch", "scripts:minify:watch", "styles:minify:watch", "develop:watch", ] gulp.task "default", defaultTasks, ->
Make sure that regular scripts are build too
Make sure that regular scripts are build too
CoffeeScript
bsd-3-clause
ptitjano/bokeh,maxalbert/bokeh,srinathv/bokeh,satishgoda/bokeh,clairetang6/bokeh,ericdill/bokeh,justacec/bokeh,percyfal/bokeh,ericdill/bokeh,caseyclements/bokeh,quasiben/bokeh,stonebig/bokeh,CrazyGuo/bokeh,roxyboy/bokeh,msarahan/bokeh,akloster/bokeh,timsnyder/bokeh,roxyboy/bokeh,roxyboy/bokeh,schoolie/bokeh,daodaoliang...
c519bad32b7a6128a2758969bafc457fed7ede4e
review_front/app/models/commit.coffee
review_front/app/models/commit.coffee
`import DS from 'ember-data'` Commit = DS.Model.extend remoteId: DS.attr('string') message: DS.attr('string') state: DS.attr('string') remoteUrl: DS.attr('string') project: DS.belongsTo('project') expiresAt: DS.attr('date') createdAt: DS.attr('date') authoredAt: DS.attr('date') author: DS.belongsTo('...
`import DS from 'ember-data'` Commit = DS.Model.extend remoteId: DS.attr('string') message: DS.attr('string') state: DS.attr('string') remoteUrl: DS.attr('string') project: DS.belongsTo('project') expiresAt: DS.attr('date') createdAt: DS.attr('date') authoredAt: DS.attr('date') author: DS.belongsTo('...
Add computed property for expiration display
Add computed property for expiration display [#98105252]
CoffeeScript
mit
Naturaily/review,Naturaily/review,Naturaily/review
871452bf242126e8fcf79c71f711305658853119
spec/color-scanner-spec.coffee
spec/color-scanner-spec.coffee
ColorScanner = require '../lib/color-scanner' {TextEditor} = require 'atom' describe 'ColorScanner', -> [scanner, editor, bufferColor] = [] withTextEditor = (fixture, block) -> describe "with #{fixture} buffer", -> beforeEach -> waitsForPromise -> atom.workspace.open(fixture) runs -> edi...
ColorScanner = require '../lib/color-scanner' {TextEditor} = require 'atom' describe 'ColorScanner', -> [scanner, editor, bufferColor] = [] withTextEditor = (fixture, block) -> describe "with #{fixture} buffer", -> beforeEach -> waitsForPromise -> atom.workspace.open(fixture) runs -> edi...
Add tests for buffer color properties
:white_check_mark: Add tests for buffer color properties
CoffeeScript
mit
peter1000/atom-pigments,peter1000/atom-pigments
19b100469bf65dfac80f3d350861e753db622e76
app/src/controllers/wallet/message/wallet_message_index_dialog_view_controller.coffee
app/src/controllers/wallet/message/wallet_message_index_dialog_view_controller.coffee
class @WalletMessageIndexDialogViewController extends ledger.common.DialogViewController view: derivationPath: '#derivation_path' message: '#message' confirmButton: '#confirm_button' error: "#error_container" onAfterRender: -> super @_isEditable = @params.editable || no chrome.app.wind...
class @WalletMessageIndexDialogViewController extends ledger.common.DialogViewController view: derivationPath: '#derivation_path' message: '#message' confirmButton: '#confirm_button' error: "#error_container" onAfterRender: -> super @_isEditable = @params.editable || no chrome.app.wind...
Fix Message signature via API
Fix Message signature via API
CoffeeScript
mit
LedgerHQ/ledger-wallet-chrome,LedgerHQ/ledger-wallet-chrome
86acddcebb3d1bf0d571c800d118ab06ec699b79
spec/skr/models/SalesOrderSpec.coffee
spec/skr/models/SalesOrderSpec.coffee
describe "Skr.Models.SalesOrder", -> xit "must have a customer to save", (done)-> model = new Skr.Models.SalesOrder() Lanes.Test.ModelSaver.perform(model, done).then (save)-> expect(save.error).toHaveBeenCalled() expect(model.errors.customer).toContain("is not set")
describe "Skr.Models.SalesOrder", -> it "it calculates total", -> so = new Skr.Models.SalesOrder() so.lines.add(sku_code: 'TEST', price: 2.12, qty:1) expect(so.total).toEqual(jasmine.any(_.bigDecimal)) expect(so.total.toString()).toEqual('2.12') so.order_total = 1.42 ...
Test that total is updated when lines change
Test that total is updated when lines change
CoffeeScript
agpl-3.0
argosity/stockor,argosity/stockor,argosity/stockor,argosity/stockor
c33ca508f717d81417e5e32359f92d49c8fd5f6a
app/assets/javascripts/admin/variant_overrides/filters/hub_permissions_filter.js.coffee
app/assets/javascripts/admin/variant_overrides/filters/hub_permissions_filter.js.coffee
angular.module("admin.variantOverrides").filter "hubPermissions", ($filter) -> return (products, hubPermissions, hub_id) -> return [] if !hub_id return $filter('filter')(products, ((product) -> hubPermissions[hub_id].indexOf(product.producer_id) > -1), true)
angular.module("admin.variantOverrides").filter "hubPermissions", ($filter) -> return (products, hubPermissions, hub_id) -> return [] if !hub_id return [] if !hubPermissions[hub_id] return $filter('filter')(products, ((product) -> hubPermissions[hub_id].indexOf(product.producer_id) > -1), true)
Add guard clause on variant overrides filter in case hub id is not present in the hubPermissions
Add guard clause on variant overrides filter in case hub id is not present in the hubPermissions
CoffeeScript
agpl-3.0
lin-d-hop/openfoodnetwork,mkllnk/openfoodnetwork,mkllnk/openfoodnetwork,openfoodfoundation/openfoodnetwork,Matt-Yorkley/openfoodnetwork,Matt-Yorkley/openfoodnetwork,openfoodfoundation/openfoodnetwork,lin-d-hop/openfoodnetwork,mkllnk/openfoodnetwork,lin-d-hop/openfoodnetwork,openfoodfoundation/openfoodnetwork,mkllnk/ope...
72179176d1d073c3bc0505fa4749684222896fe7
lib/views/panel.coffee
lib/views/panel.coffee
Message = require './message' class PanelView extends HTMLElement initialize:(@linter) -> @id = 'linter-panel' @_decorations = [] empty: -> return unless @_decorations.length @_decorations.forEach (decoration) -> try decoration.destroy() @_decorations = [] @innerHTML = '' update: ...
Message = require './message' class PanelView extends HTMLElement initialize:(@linter) -> @id = 'linter-panel' render: (messages) -> messages.forEach (message) => if @linter.views.scope is 'file' return unless message.currentFile if message.currentFile and message.position p = ...
Remove redundant part of PanelView
:fire: Remove redundant part of PanelView
CoffeeScript
mit
levity/linter,blakeembrey/linter,e-jigsaw/Linter,josa42/Linter,JohnMurga/linter,iam4x/linter,AtomLinter/Linter,DanPurdy/linter,AsaAyers/linter,atom-community/linter,elkeis/linter,UltCombo/linter,simurai/linter-plus,mdgriffith/linter,Arcanemagus/linter,shawninder/linter,steelbrain/linter,kaeluka/linter
5f15b46bd0a98282a8e995e44c07312c84dac9cc
src/script/EnemyManager.coffee
src/script/EnemyManager.coffee
enemies = null enemyList = [] class EnemyManager maxEnemies: 15 spawnFrequency: 3 #seconds constructor: -> @enemiesOnScreen = 0 enemies = game.add.group() enemies.enableBody = true game.time.events.loop(Phaser.Timer.SECOND * @spawnFrequency, @spawnWrapper, this) spawn: (x, y) -> @enemi...
enemies = null enemyList = [] class EnemyManager maxEnemies: 15 constructor: -> @enemiesOnScreen = 0 enemies = game.add.group() enemies.enableBody = true switch currentLevel when 'one' then @spawnFrequency = 4 #seconds when 'two' then @spawnFrequency = 3 #seconds when 'thre...
Add varying enemy spawn frequency depending on selected level
Add varying enemy spawn frequency depending on selected level
CoffeeScript
mit
MichaelReiter/RunJumpShoot,MichaelReiter/PhaserGame
cc7ddc59ffba0547df48793a0c263f6221093c03
src/app/pasteboard.coffee
src/app/pasteboard.coffee
crypto = nodeRequire 'crypto' module.exports = class Pasteboard signatureForMetadata: null md5: (text) -> crypto.createHash('md5').update(text).digest('hex') write: (text, metadata) -> @signatureForMetadata = @md5(text) @metadata = metadata $native.writeToPasteboard(text) read: -> text =...
crypto = nodeRequire 'crypto' module.exports = class Pasteboard signatureForMetadata: null md5: (text) -> crypto.createHash('md5').update(text, 'utf8').digest('hex') write: (text, metadata) -> @signatureForMetadata = @md5(text) @metadata = metadata $native.writeToPasteboard(text) read: -> ...
Set input encoding to utf8
Set input encoding to utf8
CoffeeScript
mit
originye/atom,n-riesco/atom,MjAbuz/atom,fredericksilva/atom,abcP9110/atom,sxgao3001/atom,amine7536/atom,Andrey-Pavlov/atom,RobinTec/atom,gontadu/atom,tjkr/atom,hpham04/atom,execjosh/atom,hagb4rd/atom,pombredanne/atom,h0dgep0dge/atom,n-riesco/atom,dsandstrom/atom,avdg/atom,GHackAnonymous/atom,toqz/atom,abcP9110/atom,sek...
9a07a2d407c95f3c7843b3443d231469f472672a
highlights/highlight-filename-from-stdin.coffee
highlights/highlight-filename-from-stdin.coffee
#!highlights/node_modules/coffee-script/bin/coffee Highlights = require 'highlights' fs = require 'fs' path = require 'path' split = require 'split' highlighter = new Highlights() highlighter.requireGrammarsSync modulePath: require.resolve('./atom-language-perl6/package.json') stdin = process.openStdin() stdin.set...
#!highlights/node_modules/coffee-script/bin/coffee Highlights = require 'highlights' fs = require 'fs' path = require 'path' highlighter = new Highlights() highlighter.requireGrammarsSync modulePath: require.resolve('./atom-language-perl6/package.json') stdin = process.openStdin() stdin.setEncoding 'utf8' stdin.o...
Remove split which isn't in the node package dependencies
Remove split which isn't in the node package dependencies
CoffeeScript
artistic-2.0
tbrowder/doc,stmuk/doc,MasterDuke17/doc,MasterDuke17/doc,gfldex/doc,tbrowder/doc,MasterDuke17/doc,stmuk/doc,antquinonez/doc,perl6/doc,MasterDuke17/doc,antquinonez/doc,tbrowder/doc,dmaestro/doc,antquinonez/doc,antquinonez/doc,tbrowder/doc,stmuk/doc,perl6/doc,gfldex/doc,gfldex/doc,antquinonez/doc,stmuk/doc,perl6/doc,gfld...
bd3f626872ac306095930768c1eaab70f976bf37
app/assets/javascripts/darkswarm/controllers/checkout/accordion_controller.js.coffee
app/assets/javascripts/darkswarm/controllers/checkout/accordion_controller.js.coffee
Darkswarm.controller "AccordionCtrl", ($scope, localStorageService, $timeout, $document, CurrentHub) -> key = "accordion_#{$scope.order.id}#{CurrentHub.hub.id}#{$scope.order.user_id}" value = if localStorageService.get(key) then {} else { details: true, billing: false, shipping: false, payment: false } localStora...
Darkswarm.controller "AccordionCtrl", ($scope, localStorageService, $timeout, $document, CurrentHub) -> key = "accordion_#{$scope.order.id}#{CurrentHub.hub.id}#{$scope.order.user_id}" value = if localStorageService.get(key) then {} else { details: true, billing: false, shipping: false, payment: false } localStora...
Call toScroll after any new panel is . Also added an actual delay as it still scrolled to the 'old' location.. 10 ms was too short to allow the location to update after the old panel closes (on Chrome), 50 ms seems ok.
Call toScroll after any new panel is . Also added an actual delay as it still scrolled to the 'old' location.. 10 ms was too short to allow the location to update after the old panel closes (on Chrome), 50 ms seems ok.
CoffeeScript
agpl-3.0
oeoeaio/openfoodnetwork,openfoodfoundation/openfoodnetwork,KateDavis/openfoodnetwork,lin-d-hop/openfoodnetwork,lin-d-hop/openfoodnetwork,Matt-Yorkley/openfoodnetwork,Matt-Yorkley/openfoodnetwork,lin-d-hop/openfoodnetwork,oeoeaio/openfoodnetwork,lin-d-hop/openfoodnetwork,KateDavis/openfoodnetwork,mkllnk/openfoodnetwork,...
d8b4eb64fe98294ca32c3abf465ab321e1ee11b6
spec/color-search-spec.coffee
spec/color-search-spec.coffee
require './spec-helper' ColorSearch = require '../lib/color-search' describe 'ColorSearch', -> [search, pigments, project] = [] beforeEach -> waitsForPromise -> atom.packages.activatePackage('pigments').then (pkg) -> pigments = pkg.mainModule project = pigments.getProject() waitsForPromise ->...
require './spec-helper' ColorSearch = require '../lib/color-search' describe 'ColorSearch', -> [search, pigments, project] = [] beforeEach -> atom.config.set 'pigments.sourceNames', [ '**/*.styl' '**/*.less' ] waitsForPromise -> atom.packages.activatePackage('pigments').then (pkg) -> ...
Fix missing config in search specs
:green_heart: Fix missing config in search specs
CoffeeScript
mit
peter1000/atom-pigments,peter1000/atom-pigments
3afc3096d11bbf5c54cbf3111adf6c9e08de892c
src/maps.coffee
src/maps.coffee
Q = require('q') class GeoCoder constructor: () -> @geocoder = new google.maps.Geocoder() code: (request) -> deferred = Q.defer() @geocoder.geocode request, (results, status) -> if status is google.maps.GeocoderStatus.OK deferred.resolve results.map (result) -> address: result.f...
$ = require('jquery') Bacon = require('bacon') class GeoCoder constructor: () -> @geocoder = new google.maps.Geocoder() code: (request) -> deferred = $.Deferred() @geocoder.geocode request, (results, status) -> if status is google.maps.GeocoderStatus.OK deferred.resolve results.map (resul...
Add a class for tracking current location
Add a class for tracking current location
CoffeeScript
bsd-3-clause
ck101000xx/ncn-web
74083ea29f679b48c55c825cf6c96fe93400d63f
app/assets/javascripts/routes/paper_edit_route.js.coffee
app/assets/javascripts/routes/paper_edit_route.js.coffee
ETahi.PaperEditRoute = ETahi.AuthorizedRoute.extend beforeModel: -> visualEditorScript = '/visual-editor.js' unless ETahi.LazyLoaderMixin.loaded[visualEditorScript] $.getScript(visualEditorScript).then -> ETahi.LazyLoaderMixin.loaded[visualEditorScript] = true model: (params) -> paper = @...
ETahi.PaperEditRoute = ETahi.AuthorizedRoute.extend beforeModel: -> visualEditorScript = '/visual-editor.js' unless ETahi.LazyLoaderMixin.loaded[visualEditorScript] $.getScript(visualEditorScript).then -> ETahi.LazyLoaderMixin.loaded[visualEditorScript] = true model: -> paper = @modelFor(...
Change Author filter criteria in PaperEditRoute.
Change Author filter criteria in PaperEditRoute. Don't filter using AuthorGroup.paper, the yet-to-be-hydrated paper model will clobber the reference and screw things up.
CoffeeScript
mit
johan--/tahi,johan--/tahi,johan--/tahi,johan--/tahi
bfe8ec07ca67ed1df2089ae29282f62d50c1c4b5
app/assets/javascripts/views/movies/index_view.js.coffee
app/assets/javascripts/views/movies/index_view.js.coffee
Shothere.Views.Movies ||= {} class Shothere.Views.Movies.IndexView extends Shothere.Views.MapView template: JST["templates/movies/index"] initialize: () -> @options.movies.bind('reset', @addAll) addAll: () => @options.movies.each(@addOne) addOne: (movie) => view = new Shothere.Views.Movies.Movie...
Shothere.Views.Movies ||= {} class Shothere.Views.Movies.IndexView extends Shothere.Views.MapView template: JST["templates/movies/index"] templatePopup: JST["templates/movies/popup"] initialize: () -> @options.movies.bind('reset', @addAll) addAll: () => @options.movies.each(@addOne) addOne: (movi...
Add popups to the index map
Add popups to the index map
CoffeeScript
mit
paulRbr/ShotHere,paulRbr/ShotHere,paulRbr/ShotHere
5be5645d161977f0d5ef1d0373790138336b4b75
app/assets/javascripts/segmentio.js.coffee
app/assets/javascripts/segmentio.js.coffee
if @Curri && @Curri.user userData = email: Curri.user.email classRole: Curri.user.classrole_type created: Curri.user.created_at firstName: Curri.user.first_name || '' lastName: Curri.user.last_name || '' analytics.identify(Curri.user.id, userData)
if @Curri && @Curri.user userData = email: Curri.user.email classRole: Curri.user.classrole_type created: Curri.user.created_at firstName: Curri.user.first_name || 'No' lastName: Curri.user.last_name || 'Name' analytics.identify(Curri.user.id, userData)
Fix for issue with blank names
Fix for issue with blank names
CoffeeScript
mit
aomra015/curri,aomran/curri
65dd571041408712ab2fb2efd0f4a0ae73a8df34
app/views/courses/StudentLogInModal.coffee
app/views/courses/StudentLogInModal.coffee
ModalView = require 'views/core/ModalView' template = require 'templates/courses/student-log-in-modal' auth = require 'core/auth' forms = require 'core/forms' User = require 'models/User' module.exports = class StudentSignInModal extends ModalView id: 'student-log-in-modal' template: template events: 'cli...
ModalView = require 'views/core/ModalView' template = require 'templates/courses/student-log-in-modal' auth = require 'core/auth' forms = require 'core/forms' User = require 'models/User' module.exports = class StudentSignInModal extends ModalView id: 'student-log-in-modal' template: template events: 'cli...
Fix StudentLoginModal when email or password is not included
Fix StudentLoginModal when email or password is not included
CoffeeScript
mit
javatlacati/codecombat,duybkict/codecombat,Minhir/codecombat,UltCombo/codecombat,jeremiahyan/codecombat,Minhir/codecombat,icodegame/codecombat,Minhir/codecombat,edtrist/codecombat,duybkict/codecombat,icodegame/codecombat,javatlacati/codecombat,nimda7/codecombat,weevilgenius/codecombat,codecombat/codecombat,codecombat/c...
7a247833aef4011efc495d4f8dfad003be5d7b1e
app/assets/javascripts/items.js.coffee
app/assets/javascripts/items.js.coffee
# 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/ ready = -> parseText = (text) -> # parsing markdown to html $('#item-preview-content').html(marked(text...
# 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/ ready = -> parseText = (text) -> # parsing markdown to html $('#item-preview-content').html(marked(text...
Fix error for parsing undefined
Fix error for parsing undefined
CoffeeScript
mit
nanonanomachine/radvent,nanonanomachine/radvent,nanonanomachine/radvent
bd633ea88151d91b95320024840cd4a4366cf325
app/assets/javascripts/components/moving_records/moving_volume_panel.js.coffee
app/assets/javascripts/components/moving_records/moving_volume_panel.js.coffee
## Key-value table panel without a table header ## Example # React.createElement TablePanel, # type: 'success' # title: "Volume for each room" # obj: { ocean: 23, air: 12, ... } @MovingVolumePanel = React.createClass getInitialState: -> data: @props.data render: -> $ = React.DOM $.div ...
## Key-value table panel without a table header ## Example # React.createElement TablePanel, # type: 'success' # title: "Volume for each room" # obj: { ocean: 23, air: 12, ... } @MovingVolumePanel = React.createClass getInitialState: -> data: @props.data render: -> $ = React.DOM $.div ...
Adjust table widths for table panels
Adjust table widths for table panels
CoffeeScript
mit
mnishiguchi/moving_estimator,mnishiguchi/moving_estimator,mnishiguchi/moving_estimator
00cb23cdf537aa252c3f1ac190326c53ec6080de
express/routes/collector.coffee
express/routes/collector.coffee
mongo = require '../models/connection' exports.collect = (req, res) -> if req.get('content-type').indexOf('application/json') == -1 throw new Error("Body request is not JSON.") jsonData = req.body mongo.db.collection('sensor').count( {sensor_id : jsonData.sensor_id}, (err, count) -> ...
mongo = require '../models/connection' exports.collect = (req, res) -> if req.get('content-type').indexOf('application/json') == -1 throw new Error("Body request is not JSON.") jsonData = req.body mongo.db.collection('sensors').count( {sensor_id : jsonData.sensor_id}, (err, count) -> ...
Save the hub_id from the HomePi
Save the hub_id from the HomePi
CoffeeScript
apache-2.0
HomeAgain/HomeAgainApi,HomeAgain/HomeAgainApi
af70ef0dc4a429d6c1da7761905fa5b5f19f7f6e
services/web/app/coffee/infrastructure/Features.coffee
services/web/app/coffee/infrastructure/Features.coffee
Settings = require 'settings-sharelatex' module.exports = Features = externalAuthenticationSystemUsed: -> Settings.ldap? or Settings.saml? or Settings.overleaf?.oauth? hasFeature: (feature) -> switch feature when 'homepage' return Settings.enableHomepage when 'registration' return not Features.ext...
Settings = require 'settings-sharelatex' module.exports = Features = externalAuthenticationSystemUsed: -> Settings.ldap? or Settings.saml? or Settings.overleaf?.oauth? hasFeature: (feature) -> switch feature when 'homepage' return Settings.enableHomepage when 'registration' return not Features.ext...
Add `templates` to the `hasFeature` function
Add `templates` to the `hasFeature` function
CoffeeScript
agpl-3.0
sharelatex/sharelatex
88ae78f80ec70c344eb87b02d3371e0b5f344c1f
src/smc-webapp/chat/store.coffee
src/smc-webapp/chat/store.coffee
# 3rd Party Libraries immutable = require('immutable') # Internal Libraries misc = require('smc-util/misc') {types} = misc exports.get_store_def = (name) -> name: name stateTypes: height : types.number # 0 means not rendered; otherwise is the height of the chat editor inpu...
# 3rd Party Libraries immutable = require('immutable') # Internal Libraries misc = require('smc-util/misc') {types} = misc exports.get_store_def = (name) -> name: name stateTypes: height : types.number # 0 means not rendered; otherwise is the height of the chat editor inpu...
Fix scroll save for chat
Fix scroll save for chat
CoffeeScript
agpl-3.0
sagemathinc/smc,DrXyzzy/smc,sagemathinc/smc,tscholl2/smc,DrXyzzy/smc,DrXyzzy/smc,sagemathinc/smc,sagemathinc/smc,tscholl2/smc,tscholl2/smc,tscholl2/smc,DrXyzzy/smc,tscholl2/smc
ff95b89d896f7013f19f057814daf8270e084f3c
test/support/test_helpers.coffee
test/support/test_helpers.coffee
Walrus = require '../../bin/walrus' TestHelpers = pass : ( specs, suffix='' ) -> fs = require 'fs' path = require 'path' exec = require( 'child_process' ).exec for file in fs.readdirSync specs when path.extname( file ) is '.wal' do ( file ) -> base = path.basename file, '.wal'...
Walrus = require '../../bin/walrus' fs = require 'fs' path = require 'path' TestHelpers = read : ( filename ) -> fs.readFileSync filename, 'utf8' if path.existsSync filename pass : ( specs, suffix='' ) -> fs = require 'fs' path = require 'path' exec = require( 'child_process' ).exec for...
Make test helpers smart about checking for suffixed tests
Make test helpers smart about checking for suffixed tests
CoffeeScript
mit
jeremyruppel/walrus
cda14c2be4df881163955cfb6787111c7feb340c
app/assets/javascripts/sprangular/controllers/checkout/deliveryAndPayment.coffee
app/assets/javascripts/sprangular/controllers/checkout/deliveryAndPayment.coffee
Sprangular.controller 'CheckoutDeliveryAndPaymentCtrl', ($scope, Account, Cart, Checkout) -> $scope.order = Cart.current $scope.processing = false $scope.user = Account.user $scope.$watch 'order.state', (state) -> $scope.done = state == 'confirm' $scope.active = _.contains(['delivery', 'payment'], stat...
Sprangular.controller 'CheckoutDeliveryAndPaymentCtrl', ($scope, Account, Cart, Checkout) -> $scope.order = Cart.current $scope.processing = false $scope.user = Account.user $scope.$watch 'order.state', (state) -> $scope.done = state == 'confirm' $scope.active = _.contains(['delivery', 'payment'], stat...
Check if CC is valid when setting payment
Check if CC is valid when setting payment
CoffeeScript
mit
sprangular/sprangular,sprangular/sprangular,sprangular/sprangular
997537250cd6d0212e933a781e3a65cf226786dc
lib/upnp.coffee
lib/upnp.coffee
uuid = require 'node-uuid' ssdp = require './ssdp' extend = require('./helpers').extend configDefaults = device: schema: prefix: 'urn:schemas-upnp-org:device' uuid: 'uuid:' + uuid() network: ssdp: timeout: 1800 address: '239.255.255.250' p...
uuid = require 'node-uuid' ssdp = require './ssdp' xmlServer = require './xml-server' upnp = {} upnp.createDevice = (type, version, callback) => for arg in arguments if typeof arg is 'Function' callback = arg @config = device: schema: prefix: 'urn:schema...
Initialize UPnP in a different way
Initialize UPnP in a different way
CoffeeScript
mit
Loghorn/node-upnp-device,jacobrask/node-upnp-device,sigma-random/node-upnp-device,bcaller/node-upnp-device