commit stringlengths 40 40 | old_file stringlengths 9 134 | new_file stringlengths 9 134 | old_contents stringlengths 0 2.21k | new_contents stringlengths 34 3.19k | subject stringlengths 14 340 | message stringlengths 15 1.43k | lang stringclasses 1
value | license stringclasses 13
values | repos stringlengths 9 29k |
|---|---|---|---|---|---|---|---|---|---|
cec35ed7c888fb5764804d887abd0a29ea178451 | src/theme-package.coffee | src/theme-package.coffee | Q = require 'q'
AtomPackage = require './atom-package'
module.exports =
class ThemePackage extends AtomPackage
getType: -> 'theme'
getStylesheetType: -> 'theme'
enable: ->
atom.config.unshiftAtKeyPath('core.themes', @metadata.name)
disable: ->
atom.config.removeAtKeyPath('core.themes', @metadata.nam... | Q = require 'q'
AtomPackage = require './atom-package'
module.exports =
class ThemePackage extends AtomPackage
getType: -> 'theme'
getStylesheetType: -> 'theme'
enable: ->
atom.config.unshiftAtKeyPath('core.themes', @name)
disable: ->
atom.config.removeAtKeyPath('core.themes', @name)
load: ->
... | Use name ivar instead of metadata.name | Use name ivar instead of metadata.name
| CoffeeScript | mit | Austen-G/BlockBuilder,Rodjana/atom,Ingramz/atom,deoxilix/atom,Galactix/atom,SlimeQ/atom,KENJU/atom,KENJU/atom,acontreras89/atom,githubteacher/atom,bolinfest/atom,vinodpanicker/atom,h0dgep0dge/atom,rookie125/atom,AlbertoBarrago/atom,hakatashi/atom,abe33/atom,johnhaley81/atom,einarmagnus/atom,ironbox360/atom,davideg/atom... |
1b4be18dd721dfba793210dfca44a328f91916c5 | src/atom-protocol-handler.coffee | src/atom-protocol-handler.coffee | path = require 'path'
protocol = require 'protocol'
# Private: Handles requests with 'atom' protocol.
#
# It's created by {AtomApplication} upon instantiation, and is used to create a
# custom resource loader by adding the 'atom' custom protocol.
module.exports =
class AtomProtocolHandler
constructor: (@resourcePath... | app = require 'app'
fs = require 'fs'
path = require 'path'
protocol = require 'protocol'
# Private: Handles requests with 'atom' protocol.
#
# It's created by {AtomApplication} upon instantiation, and is used to create a
# custom resource loader by adding the 'atom' custom protocol.
module.exports =
class AtomProtoco... | Add ~/.atom/packages to the resource load path. | Add ~/.atom/packages to the resource load path.
| CoffeeScript | mit | sebmck/atom,bolinfest/atom,beni55/atom,vinodpanicker/atom,SlimeQ/atom,dannyflax/atom,ali/atom,sekcheong/atom,jeremyramin/atom,davideg/atom,alexandergmann/atom,gabrielPeart/atom,andrewleverette/atom,Sangaroonaom/atom,efatsi/atom,kc8wxm/atom,atom/atom,AdrianVovk/substance-ide,pkdevbox/atom,me-benni/atom,elkingtonmcb/atom... |
91ae3d37041b36edf27b83005b7125541fd7f094 | src/components/ScrapeHtml.coffee | src/components/ScrapeHtml.coffee | noflo = require "noflo"
jsdom = require "jsdom"
class ScrapeHtml extends noflo.Component
constructor: ->
@html = ""
@textSelector = ""
@crapSelectors = []
@inPorts =
in: new noflo.Port()
textSelector: new noflo.Port()
crapSelector: new noflo.Arra... | noflo = require "noflo"
jsdom = require "jsdom"
class ScrapeHtml extends noflo.Component
constructor: ->
@html = ""
@textSelector = ""
@crapSelectors = []
@inPorts =
in: new noflo.Port()
textSelector: new noflo.Port()
crapSelector: new noflo.Arra... | Send text from each scraped element separately. | Send text from each scraped element separately.
| CoffeeScript | mit | saurabhsood91/noflo,lxfschr/noflo,trustmaster/noflo,npmcomponent/noflo-noflo,noflo/noflo,lxfschr/noflo,jonnor/noflo,trustmaster/noflo,saurabhsood91/noflo,jonnor/noflo |
62076545215a21305c74560df4d0d2929bfc7849 | src/reactGUI/StrokeWidthPicker.coffee | src/reactGUI/StrokeWidthPicker.coffee | DOM = require '../reactGUI/ReactDOMFactories-shim'
createReactClass = require '../reactGUI/createReactClass-shim'
createSetStateOnEventMixin = require '../reactGUI/createSetStateOnEventMixin'
{classSet} = require '../core/util'
module.exports = createReactClass
displayName: 'StrokeWidthPicker'
getState: (tool=@p... | DOM = require '../reactGUI/ReactDOMFactories-shim'
createReactClass = require '../reactGUI/createReactClass-shim'
createSetStateOnEventMixin = require '../reactGUI/createSetStateOnEventMixin'
{classSet} = require '../core/util'
module.exports = createReactClass
displayName: 'StrokeWidthPicker'
getState: (tool=@p... | Correct viewport attribute casing (runtime error) | Correct viewport attribute casing (runtime error)
| CoffeeScript | bsd-2-clause | literallycanvas/literallycanvas,irskep/literallycanvas |
1836731694abf131b7993efd876a5ecd016eaadc | app/static/script/app.coffee | app/static/script/app.coffee | 'use strict'
$(document).foundation()
angular
.module('app', [
'ngAnimate',
# 'ngAria',
'ngCookies',
'ngMessages',
'ngResource',
'ngRoute',
'ngSanitize',
# 'ngTouch',
'angular-growl',
'angularSpinner',
])
.config [
'$routeProvider',
'$httpProvider',
'$logProvi... | 'use strict'
$(document).foundation()
angular
.module('app', [
'ngAnimate',
# 'ngAria',
'ngCookies',
'ngMessages',
'ngResource',
'ngRoute',
'ngSanitize',
# 'ngTouch',
'angular-growl',
'angularSpinner',
])
.config [
'$routeProvider',
'$httpProvider',
'$logProvi... | Fix problem with template path | Fix problem with template path
| CoffeeScript | mit | peterhil/ninhursag,peterhil/ninhursag,peterhil/ninhursag,peterhil/ninhursag |
dda6a38c36a2e6316d7ba7237aaf60272e85909a | src/cli.coffee | src/cli.coffee | fs = require 'fs'
path = require 'path'
class Cli
constructor: ->
@error = null
buildOptions: (name) ->
options = {}
options.name = name
options
getValidators: ->
@validators = {}
for filename in fs.readdirSync(path.join(__dirname, 'validators'))
name = path.basename(filename, '.... | fs = require 'fs'
path = require 'path'
class Cli
constructor: ->
@exitCode = 0
getOptions: (name) ->
options = {}
options.name = name
options
getValidators: ->
@validators = {}
for filename in fs.readdirSync(path.join(__dirname, 'validators'))
name = path.basename(filename, '.co... | Change to more appropriate names | Change to more appropriate names
| CoffeeScript | mit | lee-dohm/package-validator |
4bb10365b320b64b8886d249dd831d44670fdf48 | src/server/server.coffee | src/server/server.coffee | express = require 'express'
session = require 'express-session'
body_parser = require 'body-parser'
app = express()
app.use express.static 'app/public'
app.use session secret: 'secret-TODO-change-me'
app.use body_parser.json()
app.use body_parser.urlencoded extended: true
app.get '/', (req, res) ->
res.sen... | express = require 'express'
session = require 'express-session'
body_parser = require 'body-parser'
app = express()
app.use express.static __dirname + '/public'
app.use session secret: 'secret-TODO-change-me'
app.use body_parser.json()
app.use body_parser.urlencoded extended: true
app.get '/', (req, res) ->
... | Use __dirname for script directory | Use __dirname for script directory
| CoffeeScript | mit | sortelli/jitterbug,sortelli/jitterbug |
47f34949d51acec8eec4814caba469e56676c4b4 | keymaps/image-view.cson | keymaps/image-view.cson | '.platform-darwin .image-view':
'cmd-+': 'image-view:zoom-in'
'cmd-=': 'image-view:zoom-in'
'cmd--': 'image-view:zoom-out'
'cmd-_': 'image-view:zoom-out'
'cmd-0': 'image-view:reset-zoom'
'.platform-win32 .image-view':
'ctrl-+': 'image-view:zoom-in'
'ctrl-=': 'image-view:zoom-in'
'ctrl--': 'image-view:z... | '.platform-darwin .image-view':
'cmd-+': 'image-view:zoom-in'
'cmd-=': 'image-view:zoom-in'
'cmd--': 'image-view:zoom-out'
'cmd-_': 'image-view:zoom-out'
'cmd-9': 'image-view:zoom-to-fit'
'cmd-0': 'image-view:reset-zoom'
'.platform-win32 .image-view':
'ctrl-+': 'image-view:zoom-in'
'ctrl-=': 'image-vie... | Add keybindings for "zoom to fit" | Add keybindings for "zoom to fit"
| CoffeeScript | mit | atom/image-view |
c18cc481b46a034ec2c77c14fca1634e2c83c60b | keymaps/fuzzy-finder.cson | keymaps/fuzzy-finder.cson | 'body':
'meta-t': 'fuzzy-finder:toggle-file-finder'
'meta-b': 'fuzzy-finder:toggle-buffer-finder'
'ctrl-.': 'fuzzy-finder:find-under-cursor'
'meta-T': 'fuzzy-finder:toggle-git-status-finder'
| 'body':
'meta-t': 'fuzzy-finder:toggle-file-finder'
'meta-b': 'fuzzy-finder:toggle-buffer-finder'
'ctrl-.': 'fuzzy-finder:find-under-cursor'
'meta-B': 'fuzzy-finder:toggle-git-status-finder'
| Update status finder keybinding to meta-B | Update status finder keybinding to meta-B
| CoffeeScript | mit | viddo/fuzzy-finder,segiddins/fuzzy-finder,viddo/fuzzy-finder,gvanderest/fuzzy-finder,nielsAD/fuzzy-finder,Spy-Seth/fuzzy-finder,pombredanne/fuzzy-finder,Spy-Seth/fuzzy-finder,toshi-saito/fuzzy-finder,gvanderest/fuzzy-finder,atom/fuzzy-finder,segiddins/fuzzy-finder,pombredanne/fuzzy-finder,Kerruba/fuzzy-finder,Kerruba/f... |
ea4caa2c96d82f26b6874c489a8edbfc45551914 | gulpfile.coffee | gulpfile.coffee | gulp = require 'gulp'
tsc = require 'gulp-typescript'
# Main task
gulp.task 'default', ['build']
gulp.task 'build', ['copy', 'typescript-build']
gulp.task 'copy', ()->
gulp.src 'src/html/**'
.pipe gulp.dest 'dest/html'
gulp.task 'watch', ['build'], ()->
gulp.watch 'src/**/*.html', ['copy']
gulp.wat... | gulp = require 'gulp'
tsc = require 'gulp-typescript'
# Main task
gulp.task 'default', ['build']
gulp.task 'build', ['copy', 'ts-build']
gulp.task 'copy', ()->
gulp.src 'src/html/**'
.pipe gulp.dest 'dest/html'
gulp.task 'watch', ['build'], ()->
gulp.watch 'src/**/*.html', ['copy']
gulp.watch 'src/... | Rename sub task : typescript-build -> ts-build | Rename sub task : typescript-build -> ts-build
| CoffeeScript | mit | yajamon/freedomWarsPlantSimulator,yajamon/freedomWarsPlantSimulator |
48dec56e150fd1f518248291bbe46ff8fe130782 | app/assets/javascripts/utils.js.coffee | app/assets/javascripts/utils.js.coffee | window.Tahi ||= {}
Tahi.utils =
toCamel: (string) ->
string.replace /(\-[a-z])/g, ($1) ->
$1.toUpperCase().replace "-", ""
windowHistory: ->
window.history
bindColumnResize: ->
$(window).off('resize.columns').on 'resize.columns', =>
@resizeColumnHeaders()
resizeColumnHeaders: ->
$... | window.Tahi ||= {}
Tahi.utils =
toCamel: (string) ->
string.replace /(\-[a-z])/g, ($1) ->
$1.toUpperCase().replace "-", ""
windowHistory: ->
window.history
bindColumnResize: ->
$(window).off('resize.columns').on 'resize.columns', =>
@resizeColumnHeaders()
resizeColumnHeaders: ->
$... | Fix mysterious teaspoon bug through try/catch. | Fix mysterious teaspoon bug through try/catch.
| CoffeeScript | mit | johan--/tahi,johan--/tahi,johan--/tahi,johan--/tahi |
008a405765669c74346aae9f5a6805419847be48 | core/app/backbone/views/react_user_search.coffee | core/app/backbone/views/react_user_search.coffee | window.ReactUserSearch = React.createBackboneClass
displayName: 'ReactUserSearch'
render: ->
_div [],
_a [rel:"backbone", href:@model().link()],
_img ["feed-activity-user-avatar image-30px", alt:" ", src: @model().avatar_url(30)]
_strong ['search-user-name'],
_a [rel:"backbone", hre... | window.ReactUserSearch = React.createBackboneClass
displayName: 'ReactUserSearch'
render: ->
_div ['feed-activity-heading'],
_a [' feed-activity-username', rel:"backbone", href:@model().link()],
_img ["avatar-image", alt:" ", src: @model().avatar_url(32), style: {height: '32px', width: '32px', ma... | Fix broken results of users in search results | Fix broken results of users in search results
| CoffeeScript | mit | daukantas/factlink-core,Factlink/factlink-core,Factlink/factlink-core,daukantas/factlink-core,Factlink/factlink-core,daukantas/factlink-core,Factlink/factlink-core,daukantas/factlink-core |
da3194784401182ab8fca77a014f71f261e08cb0 | .atom/config.cson | .atom/config.cson | "*":
core:
themes: [
"one-light-ui"
"solarized-dark-syntax"
]
editor:
fontFamily: "mononoki"
fontSize: 18
invisibles: {}
showIndentGuide: true
showInvisibles: true
"exception-reporting":
userId: "76d6bd0a-16fd-42b8-0163-bce5c8c7e379"
welcome:
showOnStartup: false
... | "*":
core:
telemetryConsent: "no"
themes: [
"one-light-ui"
"solarized-dark-syntax"
]
editor:
fontFamily: "mononoki"
fontSize: 18
invisibles: {}
showIndentGuide: true
showInvisibles: true
"exception-reporting":
userId: "76d6bd0a-16fd-42b8-0163-bce5c8c7e379"
welcome... | Set telementry consent to "no" for atom | Set telementry consent to "no" for atom
| CoffeeScript | mit | dreadwarrior/dotfiles,dreadwarrior/dotfiles |
4e915219ae474ae813a04c3cbf9f934db4649696 | src/coffee/choice.coffee | src/coffee/choice.coffee | class Choice
constructor: (@id, @title, @text, @visibleReqs, @activeReqs, @next) ->
Object.freeze @
reqsAreMet = (reqs, qualities) ->
for qualityName, predicate of reqs
quality = qualities.lookup qualityName
return false unless predicate quality
return true
isVisibleWith: (qualities) ->
... | angular.module 'qbn.choice', ['qbn.resolve']
.factory 'frontalChoices', () ->
library = []
api =
register: (choice) ->
library.push choice # Choices are stored in immutable form
return this # Allow Chaining
getAll: () ->
library.filter (choice) -> choice.isVisible()
ret... | Rework Requirements to Use Resolve | Rework Requirements to Use Resolve
| CoffeeScript | unlicense | arashikou/exper3-2015 |
83050d8598e9697ec77fe9e22f4f438987323ad9 | lib/link.coffee | lib/link.coffee | module.exports =
activate: ->
rootView.command 'link:open', ->
editSession = rootView.getActivePaneItem()
return unless editSession?
token = editSession.tokenForBufferPosition(editSession.getCursorBufferPosition())
return unless token?
unless @selector?
TextMateScopeSelecto... | module.exports =
activate: ->
rootView.command 'link:open', ->
editSession = rootView.getActivePaneItem()
return unless editSession?
token = editSession.tokenForBufferPosition(editSession.getCursorBufferPosition())
return unless token?
unless @selector?
{ScopeSelector} = re... | Use ScopeSelector class from first-mate | Use ScopeSelector class from first-mate
Begin migrating TextMate helpers out of src/ and into the first-mate
package.
| CoffeeScript | mit | atom/link |
f78225d05226be2736141e3fad00504fbec9d193 | app/assets/javascripts/rglossa/speech/components/centre/results/wfplayer.jsx.coffee | app/assets/javascripts/rglossa/speech/components/centre/results/wfplayer.jsx.coffee | ###* @jsx React.DOM ###
window.WFplayer = React.createClass
componentDidMount: ->
$node = $(@getDOMNode())
mediaObj = @props.mediaObj
$(document).tooltip
content: -> $node.prop('title')
corpus_id = mediaObj.corpus_id
line_key = mediaObj.mov.line_key
mov = mediaObj.mov.movie_loc
pa... | ###* @jsx React.DOM ###
window.WFplayer = React.createClass
componentDidMount: ->
$node = $(@getDOMNode())
mediaObj = @props.mediaObj
$(document).tooltip
content: -> $node.prop('title')
corpus_id = mediaObj.corpus_id
line_key = mediaObj.mov.line_key
mov = mediaObj.mov.movie_loc
pa... | Make the iframe large enough to show everything without scrolling | Make the iframe large enough to show everything without scrolling
| CoffeeScript | mit | textlab/glossa,textlab/rglossa,textlab/glossa,textlab/rglossa,textlab/glossa,textlab/glossa,textlab/rglossa,textlab/glossa,textlab/rglossa,textlab/rglossa |
2c4139d4ac25911ec8335980d81ebec25b2ade6b | app/assets/javascripts/tracks.js.coffee | app/assets/javascripts/tracks.js.coffee | App.Tracks =
tracking_enabled: ->
_paq?
set_custom_var: (id, name, value, scope) ->
_paq.push(['setCustomVariable', id, name, value, scope])
_paq.push(['trackPageView'])
track_event: ($this) ->
category = $this.data('track-event-category')
action = $this.data('track-event-action')
... | App.Tracks =
tracking_enabled: ->
_paq?
set_custom_var: (id, name, value, scope) ->
_paq.push(['setCustomVariable', id, name, value, scope])
_paq.push(['trackPageView'])
track_event: ($this) ->
category = $this.data('track-event-category')
action = $this.data('track-event-action')
_pa... | Remove trailing whitespace from tracks coffee file | Remove trailing whitespace from tracks coffee file
| CoffeeScript | agpl-3.0 | votedevin/consul,AyuntamientoMadrid/participacion,AyuntamientoMadrid/consul,deivid-rodriguez/participacion,usabi/consul_san_borondon,deivid-rodriguez/participacion,consul/consul,artofhuman/consul,lalibertad/consul,lalibertad/consul,AyuntamientoMadrid/participacion,amiedes/consul,CDJ11/CDJ,consul/consul,AyuntamientoMadr... |
f4360ebcb3e8e0c85af797ec7c98ba070ddb79a7 | atom/config.cson | atom/config.cson | "*":
core:
disabledPackages: [
"background-tips"
"exception-reporting"
"metrics"
"styleguide"
"timecop"
"welcome"
]
telemetryConsent: "no"
editor:
invisibles: {}
showIndentGuide: true
showInvisibles: true
"file-icons":
forceShow: true
onChanges: ... | "*":
core:
disabledPackages: [
"background-tips"
"exception-reporting"
"metrics"
"styleguide"
"timecop"
"welcome"
]
telemetryConsent: "no"
editor:
invisibles: {}
showIndentGuide: true
showInvisibles: true
"file-icons":
forceShow: true
onChanges: ... | Use "native-dot" marker type in Atom Pigments | Use "native-dot" marker type in Atom Pigments
| CoffeeScript | mit | jmlntw/dotfiles,jmlntw/dotfiles |
28a8435ab8277be6756611a6409692040fbdeb71 | lib/assets/javascripts/vendor-legacy.coffee | lib/assets/javascripts/vendor-legacy.coffee | #= require ./prototype/prototype
#= require ./prototype/scriptaculous
#= require ./prototype/effects
#= require_tree ./prototype
#= require ./cropper
#= require_tree ./moe-legacy
| #= require ./prototype/prototype
#= require ./prototype/scriptaculous
#= require ./prototype/effects
#= require_tree ./prototype
#= require ./cropper
| Remove application legacy imports from vendor | Remove application legacy imports from vendor
| CoffeeScript | isc | nanaya/moebooru,nanaya/moebooru,nanaya/moebooru,moebooru/moebooru,moebooru/moebooru,moebooru/moebooru,moebooru/moebooru,nanaya/moebooru,nanaya/moebooru,moebooru/moebooru |
b672636ed78a59cba2a4d252276962fae0e0e836 | controls/TypeAhead/Match.jsx.coffee | controls/TypeAhead/Match.jsx.coffee | ###* @jsx React.DOM ###
React = require('react/addons')
Match = React.createClass(
propTypes:
item: React.PropTypes.renderable.isRequired
active: React.PropTypes.bool.isRequired
onSelect: React.PropTypes.func
onSelect: ->
@props.onSelect(@props.item)
className: ->
React.addons.classSet
... | ###* @jsx React.DOM ###
React = require('react/addons')
Match = React.createClass(
propTypes:
item: React.PropTypes.node.isRequired
active: React.PropTypes.bool.isRequired
onSelect: React.PropTypes.func
onSelect: ->
@props.onSelect(@props.item)
className: ->
React.addons.classSet
'ac... | Use PropType.node instead of PropType.renderable for 0.13 compatibility | Use PropType.node instead of PropType.renderable for 0.13 compatibility
| CoffeeScript | mit | quri/react-form-builder |
0fac0d77352aac8dc21d5671149c972096ad4581 | bokehjs/src/coffee/models/annotations/label.coffee | bokehjs/src/coffee/models/annotations/label.coffee | _ = require "underscore"
Annotation = require "./annotation"
Renderer = require "../renderers/renderer"
p = require "../../core/properties"
class LabelView extends Renderer.View
initialize: (options) ->
super(options)
class Label extends Annotation.Model
default_view: LabelView
type: 'LabelAnnotation'
... | _ = require "underscore"
Annotation = require "./annotation"
Renderer = require "../renderers/renderer"
p = require "../../core/properties"
class LabelView extends Renderer.View
initialize: (options) ->
super(options)
@$el.appendTo(@plot_view.$el.find('div.bk-canvas-overlays'))
@$el.addClass('label')
... | Add basic canvas render method | Add basic canvas render method
| CoffeeScript | bsd-3-clause | ptitjano/bokeh,schoolie/bokeh,DuCorey/bokeh,ericmjl/bokeh,aiguofer/bokeh,percyfal/bokeh,aiguofer/bokeh,dennisobrien/bokeh,philippjfr/bokeh,philippjfr/bokeh,bokeh/bokeh,dennisobrien/bokeh,percyfal/bokeh,Karel-van-de-Plassche/bokeh,mindriot101/bokeh,draperjames/bokeh,aavanian/bokeh,dennisobrien/bokeh,dennisobrien/bokeh,K... |
c1dcaa2715c2b0de3fa526d0ca664e7d2d78e034 | assets/scripts/app/models/extensions.coffee | assets/scripts/app/models/extensions.coffee | Travis.DurationCalculations = Ember.Mixin.create
duration: (->
if duration = @get('_duration')
duration
else
Travis.Helpers.durationFrom(@get('startedAt'), @get('finishedAt'))
).property('_duration', 'finishedAt', 'startedAt')
updateTimes: ->
unless ['rootState.loaded.reloading', 'rootSta... | Travis.DurationCalculations = Ember.Mixin.create
duration: (->
if duration = @get('_duration')
duration
else
Travis.Helpers.durationFrom(@get('startedAt'), @get('finishedAt'))
).property('_duration', 'finishedAt', 'startedAt')
updateTimes: ->
unless ['rootState.loaded.reloading', 'rootSta... | Fix duration being incremented after a build/job is finished | Fix duration being incremented after a build/job is finished
| CoffeeScript | mit | Tiger66639/travis-web,travis-ci/travis-web,travis-ci/travis-web,mjlambert/travis-web,fauxton/travis-web,mjlambert/travis-web,fotinakis/travis-web,mjlambert/travis-web,Tiger66639/travis-web,Tiger66639/travis-web,2947721120/travis-web,fotinakis/travis-web,travis-ci/travis-web,fotinakis/travis-web,jlrigau/travis-web,29477... |
7f6db221f6bb016f07b3aad4e83e8cb126c7d89a | lib/engines/closure-compiler.coffee | lib/engines/closure-compiler.coffee | _ = require 'underscore'
module.exports = class ClosureCompiler extends (require './engine')
defaults:
compilation_level: 'advanced_optimizations'
language: 'ecmascript5'
compress: (str, cb) ->
try
url = 'https://closure-compiler.appspot.com/compile'
form = _.extend {}, @options,
j... | _ = require 'underscore'
module.exports = class ClosureCompiler extends (require './engine')
defaults:
compilation_level: 'SIMPLE_OPTIMIZATIONS'
compress: (str, cb) ->
try
url = 'https://closure-compiler.appspot.com/compile'
form = _.extend {}, @options,
js_code: str
output_for... | Use more relaxed closure defaults | Use more relaxed closure defaults
| CoffeeScript | mit | caseywebdev/cogs,caseywebdev/cogs |
c56802380538e192f3e92f3400faebee33cfdbe6 | vendor/assets/javascripts/form_backup.coffee | vendor/assets/javascripts/form_backup.coffee | $.fn.formBackup = ->
return false if !localStorage
forms = this
datas = {}
ls = false
datas.href = window.location.href
# Get localStorage informations
if localStorage['formBackup']
ls = JSON.parse localStorage['formBackup']
if ls.href == datas.href
for id of ls
if id != 'href'
... | $.fn.formBackup = ->
return false if !localStorage
forms = @
datas = {}
ls = false
datas.href = window.location.href
# Get localStorage informations
if localStorage['formBackup']
ls = JSON.parse localStorage['formBackup']
if ls.href == datas.href
for id of ls
if id != 'href'
... | Fix bug with ajax contact form not showing error validation after first submit | Fix bug with ajax contact form not showing error validation after first submit
| CoffeeScript | mit | lr-agenceweb/rails-starter,lr-agenceweb/rails-starter,lr-agenceweb/rails-starter,lr-agenceweb/rails-starter |
d81e7532679c855731b1bdc730ba3c759d15cffb | test/globalConfig.coffee | test/globalConfig.coffee | require('source-map-support').install handleUncaughtExceptions: false
| require('source-map-support').install handleUncaughtExceptions: false
mongoose = require 'mongoose'
config = require "../config/test.json"
dropTestDb = (done) ->
# ensure that we can only drop the test database
if config.mongo.url.indexOf('openhim-test') > -1
process.stdout.write 'Dropping test database...'
... | Clear test datbase before and after tests are run. | Clear test datbase before and after tests are run.
| CoffeeScript | mpl-2.0 | jembi/openhim-core-js,jembi/openhim-core-js |
37e5a9d3d1cce11c9c7bbd5fd1b5cd04a654e162 | app/assets/javascripts/admin/froala_editor.coffee | app/assets/javascripts/admin/froala_editor.coffee | #= require froala_editor.min.js
#= require plugins/lists.min.js
#= require plugins/char_counter.min.js
#= require langs/fr.js
$ ->
if $('.froala').length
froala_init()
$('.button.has_many_add').on 'click', (e) ->
setTimeout (->
froala_init()
return
), 150
froala_init = ->
$('.froala').e... | #= require froala_editor.min.js
#= require plugins/block_styles.min.js
#= require plugins/colors.min.js
#= require plugins/media_manager.min.js
#= require plugins/tables.min.js
#= require plugins/video.min.js
#= require plugins/font_family.min.js
#= require plugins/font_size.min.js
#= require plugins/file_upload.min.js... | Add all tools in toolbar for froala editor | Add all tools in toolbar for froala editor
| CoffeeScript | mit | lr-agenceweb/rails-starter,lr-agenceweb/rails-starter,lr-agenceweb/rails-starter,lr-agenceweb/rails-starter |
8b7a30e71654a0d0091e7918780c77d4d79dc4b9 | app/assets/javascripts/book.js.coffee | app/assets/javascripts/book.js.coffee | # 残高編集時に金額を計算する
class MoneyCounter
money_counting_fields: ['man', 'gosen', 'nisen', 'sen', 'gohyaku', 'hyaku', 'gojyu', 'jyu', 'go', 'ichi']
money_counting_amounts: [10000, 5000, 2000, 1000, 500, 100, 50, 10, 5, 1]
count: ->
amount = 0
for i in [0..@money_counting_fields.length-1]
v = jQuery(... | # 残高編集時に金額を計算する
class MoneyCounter
fields: ['man', 'gosen', 'nisen', 'sen', 'gohyaku', 'hyaku', 'gojyu', 'jyu', 'go', 'ichi']
amounts: [10000, 5000, 2000, 1000, 500, 100, 50, 10, 5, 1]
count: ->
amount = 0
for i in [0..@fields.length-1]
v = $('#' + @fields[i]).val()
if v != ''
... | Refactor MoenyCounter. Shorten variable names and remove 'jQuery'. | Refactor MoenyCounter. Shorten variable names and remove 'jQuery'.
| CoffeeScript | bsd-3-clause | everyleaf/kozuchi,everyleaf/kozuchi,everyleaf/kozuchi |
be5235d9190b6c7606601f0003be1efd2f347ddd | Gruntfile.coffee | Gruntfile.coffee | module.exports = (grunt) ->
path = require 'path'
require('time-grunt')(grunt)
require('jit-grunt')(grunt, {
express: 'grunt-express-server'
})
require('load-grunt-tasks')(grunt, {
pattern: ['main-bower-files']
})
require('load-grunt-config')(grunt, {
configPath: path.join __dirname, 'g... | module.exports = (grunt) ->
path = require 'path'
require('time-grunt')(grunt)
require('jit-grunt')(grunt, {
express: 'grunt-express-server'
})
require('load-grunt-tasks')(grunt, {
pattern: ['main-bower-files']
})
require('load-grunt-config')(grunt, {
configPath: path.join __dirname, 'g... | Configure basic Grunt test task. | Configure basic Grunt test task.
| CoffeeScript | agpl-3.0 | vaaralav/servicemap,City-of-Helsinki/servicemap,City-of-Helsinki/servicemap,vaaralav/servicemap,vaaralav/servicemap,City-of-Helsinki/servicemap |
1d31a10dc4c2fa4e76b574f73275ef183529293f | build/tasks/generate-license-task.coffee | build/tasks/generate-license-task.coffee | fs = require 'fs'
path = require 'path'
module.exports = (grunt) ->
grunt.registerTask 'generate-license', 'Generate the license, including the licenses of all dependencies', (mode) ->
legalEagle = require 'legal-eagle'
done = @async()
options =
path: process.cwd()
overrides: require './lice... | fs = require 'fs'
path = require 'path'
module.exports = (grunt) ->
grunt.registerTask 'generate-license', 'Generate the license, including the licenses of all dependencies', (mode) ->
legalEagle = require 'legal-eagle'
done = @async()
options =
path: process.cwd()
overrides: require './lice... | Include original LICENSE.md in generated file | Include original LICENSE.md in generated file
| CoffeeScript | mit | batjko/atom,wiggzz/atom,jjz/atom,RobinTec/atom,jtrose2/atom,Jandersoft/atom,acontreras89/atom,RobinTec/atom,sebmck/atom,palita01/atom,kc8wxm/atom,Ingramz/atom,beni55/atom,ezeoleaf/atom,originye/atom,NunoEdgarGub1/atom,nrodriguez13/atom,Jdesk/atom,charleswhchan/atom,basarat/atom,Ju2ender/atom,paulcbetts/atom,kittens/ato... |
3b72c7e17e66bb6ee9db286b7ccd0519c9556472 | app/js/jail_iframe/util/create.coffee | app/js/jail_iframe/util/create.coffee | getTextRange = ->
doc = window.document
if doc.getSelection
doc.getSelection()
else if doc.selection
doc.selection.createRange().text
else
''
FactlinkJailRoot.createFactFromSelection = ->
success = ->
FactlinkJailRoot.createButton.hide()
FactlinkJailRoot.off 'factlinkAdded', success
se... | getTextRange = ->
doc = window.document
if doc.getSelection
doc.getSelection()
else if doc.selection
doc.selection.createRange().text
else
''
FactlinkJailRoot.createFactFromSelection = ->
success = ->
FactlinkJailRoot.createButton.hide()
FactlinkJailRoot.off 'modalOpened', success
selI... | Revert "Don't depend on modalOpened events but on factlinkAdded events for hiding the loading button" | Revert "Don't depend on modalOpened events but on factlinkAdded events for hiding the loading button"
This reverts commit 5ba5108e925cde7082a0e1e837b2d28ae2388c7f.
| CoffeeScript | mit | Factlink/js-library,Factlink/js-library,Factlink/js-library |
3e394a7edd4afeae628e5d7ed3e84574f2204e97 | src/language/modules/setters.coffee | src/language/modules/setters.coffee | session = require '../session'
utils = require '../utils'
background = (color) ->
session.settings.bg = color
strokeColor = (color) ->
session.settings.stroke.color = color
session.ctx.strokeStyle = color
strokeWidth = (val) ->
session.settings.stroke.width = val
session.ctx.lineWidth = val * ses... | session = require '../session'
utils = require '../utils'
background = (color) ->
session.settings.bg = color
strokeColor = (color) ->
session.settings.stroke.color = color
session.ctx.strokeStyle = color
strokeWidth = (val) ->
session.settings.stroke.width = val
session.ctx.lineWidth = val * ses... | Remove obsolete argument in stroke function | Remove obsolete argument in stroke function
| CoffeeScript | mit | tancredi/draw,tancredi/draw,tancredi/draw |
cbf76da02be7b6737e2adaafa685ce9444f88bec | lib/eslint-view.coffee | lib/eslint-view.coffee | eslint = require('eslint').linter
{$, $$, SelectListView} = require 'atom'
module.exports =
class ESLintView extends SelectListView
initialize: (@editorView, @config) ->
super
@addClass('eslint-report overlay from-top')
@editor = @editorView.getEditor()
@buffer = @editor.getBuffer()
atom.worksp... | eslint = require('eslint').linter
{$, $$, SelectListView} = require 'atom'
module.exports =
class ESLintView extends SelectListView
initialize: (@editorView, @config) ->
super
@addClass('eslint-report overlay from-top')
@editor = @editorView.getEditor()
@buffer = @editor.getBuffer()
atom.worksp... | Use skinny arrow for toggle | Use skinny arrow for toggle
| CoffeeScript | mit | iancmyers/atom-eslint |
96517535866855eb1b90d0e56219661fd9a5729c | vendor/assets/javascripts/fustrate/components/tabs.coffee | vendor/assets/javascripts/fustrate/components/tabs.coffee | class Fustrate.Components.Tabs extends Fustrate.Components.Base
constructor: (@tabs) ->
@tabs.on 'click', 'li > a', (e) =>
@activateTab $(e.currentTarget)
false
if window.location.hash
@activateTab $("li > a[href='#{window.location.hash}']", @tabs).first()
else if $('li > a.active', @t... | class Fustrate.Components.Tabs extends Fustrate.Components.Base
constructor: (@tabs) ->
@tabs.on 'click', 'li > a', (e) =>
@activateTab $(e.currentTarget)
false
if window.location.hash
@activateTab $("li > a[href='#{window.location.hash}']", @tabs).first()
else if $('li > a.active', @t... | Change URL hash when a tab is clicked | Change URL hash when a tab is clicked | CoffeeScript | mit | Fustrate/fustrate-rails |
6be8415204265f1a42500da8bbca381111156e37 | keymaps/autocomplete.cson | keymaps/autocomplete.cson | '.editor':
'ctrl-space': 'autocomplete:toggle'
'.autocomplete .mini.editor input':
'enter': 'core:confirm'
'tab': 'core:confirm'
| '.editor':
'ctrl-space': 'autocomplete:toggle'
'.autocomplete .mini.editor':
'enter': 'core:confirm'
'tab': 'core:confirm'
| Make confirmation key binding work with shadow DOM | Make confirmation key binding work with shadow DOM
Fixes atom/atom#4251 | CoffeeScript | mit | atom-archive/autocomplete,atom/autocomplete |
4fa97dc64a6bdc1ac79979b90544708f02c5e9a3 | app/assets/javascripts/dashboard.coffee | app/assets/javascripts/dashboard.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/
$ ->
$("select#dashboard_filter_interval").on "change", (e) ->
this.form.submit()
| # 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/
$(document).on 'turbolinks:load', () ->
$("select#dashboard_filter_interval").on "change", (e) ->
this... | Use turbolinks for dom loading | Use turbolinks for dom loading
| CoffeeScript | mit | rubyforgood/diaper,rubyforgood/diaper,rubyforgood/diaper,rubyforgood/diaper |
1c388b558f24cbd93b2eb54790cb9a904f7ebfaa | atom/init.coffee | atom/init.coffee | # Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
fileTypes = {
"GitHub Markdown": (editor) ->
editor.setSoftWrap(true)
editor.setTabLength(4)
"Java": (editor) ->
... | # Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# Settings to assign based on grammar name.
fileTypes =
"GitHub Markdown": (editor) ->
editor.setSoftWrap(true)
edit... | Make configuration hash more magical | Make configuration hash more magical
CoffeeScript rules!
| CoffeeScript | mit | lee-dohm/dotfiles,lee-dohm/dotfiles,lee-dohm/dotfiles,lee-dohm/dotfiles |
ab0d3f886382bcc3f2789f68ac6c93d71f3a0b3e | scripts/test-instance/aws.coffee | scripts/test-instance/aws.coffee | AWS = require 'aws-sdk'
AWS.config.region = 'us-east-1'
AWS.config.update
accessKeyId : 'AKIAJDR2J6W5AT4KWS4A'
secretAccessKey : '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'
module.exports = AWS
| AWS = require 'aws-sdk'
AWS.config.region = 'us-east-1'
AWS.config.update
accessKeyId : 'AKIAJTAPKSDXI4FIXGJA'
secretAccessKey : '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'
module.exports = AWS
| Update test environment AWS access key | Update test environment AWS access key
| CoffeeScript | agpl-3.0 | rjeczalik/koding,koding/koding,sinan/koding,alex-ionochkin/koding,jack89129/koding,drewsetski/koding,andrewjcasal/koding,mertaytore/koding,mertaytore/koding,rjeczalik/koding,usirin/koding,mertaytore/koding,kwagdy/koding-1,alex-ionochkin/koding,alex-ionochkin/koding,drewsetski/koding,cihangir/koding,drewsetski/koding,ac... |
8b2bd53ad595505590b088b6914d7f9967be2276 | client/app/MainApp/VirtualizationController.coffee | client/app/MainApp/VirtualizationController.coffee | class VirtualizationController extends KDController
constructor:->
super
@kc = KD.singletons.kiteController
@lastState =
state : 'STOPPED'
run:(command, callback, emitStateChanged=yes)->
@kc.run
kiteName : 'os'
method : command
, @_cbWrapper callback, emitStateChanged
... | class VirtualizationController extends KDController
constructor:->
super
@kc = KD.singletons.kiteController
@lastState =
state : 'STOPPED'
run:(command, callback, emitStateChanged=yes)->
@kc.run
kiteName : 'os'
method : command
, @_cbWrapper callback, emitStateChanged
... | Add askToTurnOn helper method to turn VM on globally | Add askToTurnOn helper method to turn VM on globally
| CoffeeScript | agpl-3.0 | sinan/koding,mertaytore/koding,szkl/koding,mertaytore/koding,rjeczalik/koding,szkl/koding,gokmen/koding,andrewjcasal/koding,kwagdy/koding-1,andrewjcasal/koding,mertaytore/koding,usirin/koding,sinan/koding,acbodine/koding,cihangir/koding,koding/koding,acbodine/koding,gokmen/koding,koding/koding,jack89129/koding,usirin/k... |
ee42cd8952c55f5a2b756c5d4be0eb209f3e3995 | public/theme/portalshit/script.coffee | public/theme/portalshit/script.coffee | document.body.addEventListener "AutoPagerize_DOMNodeInserted", (e) ->
node = e.target
requestURL = e.newValue
parentNode = e.relatedNode
init node
, false
fitImageWidthToScreenWidth = ->
$('.body img').each ->
maxWidth = 900
deviceWidth = document.body.offsetWidth - 60
imageRatio = @nat... | document.body.addEventListener "AutoPagerize_DOMNodeInserted", (e) ->
node = e.target
requestURL = e.newValue
parentNode = e.relatedNode
init node
, false
fitImageWidthToScreenWidth = ->
$('.body img').each ->
maxWidth = 900
deviceWidth = document.body.offsetWidth
if window.orientation =... | Fix image width resizer bug | Fix image width resizer bug
| CoffeeScript | mit | morygonzalez/portalshit.net,morygonzalez/portalshit.net,morygonzalez/portalshit.net,morygonzalez/portalshit.net |
fe36137bd27aad566d35550b948b79ed496c3a07 | app/assets/javascripts/games.js.coffee | app/assets/javascripts/games.js.coffee | # Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
$(document).ready ->
ids = window.location.href.split('#')
if ids.length > 1
id = ids.pop(1)
$("#summaryTabs a[href=\"##{id}\"]").tab('show')
| # Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
$(document).ready ->
ids = window.location.href.split('#')
if ids.length > 1
id = ids.pop(1)
$("#summaryTabs a[href=\"##{id}\"]").tab('show')
$('#summaryTabs')... | Change URL based on what tab you click on summary page | Change URL based on what tab you click on summary page
| CoffeeScript | apache-2.0 | mitre-cyber-academy/registration-app,mitre-cyber-academy/ctf-scoreboard,mitre-cyber-academy/registration-app,mitre-cyber-academy/ctf-scoreboard,mitre-cyber-academy/ctf-scoreboard,mitre-cyber-academy/registration-app,mitre-cyber-academy/ctf-scoreboard |
ff5735b3b45c0ac868f5955509d36b00f1d71c4b | src/coffee/cilantro/setup.coffee | src/coffee/cilantro/setup.coffee | define [
'jquery'
], ($) ->
# Relies on the jquery-ajax-queue plugin to supply this method.
# This ensures data is not silently lost
$(window).on 'beforeunload', ->
if $.hasPendingRequest()
return "Wow, you're quick! Your data is being saved.
It will only take a moment.... | define [
'jquery'
], ($) ->
# Relies on the jquery-ajax-queue plugin to supply this method.
# This ensures data is not silently lost
$(window).on 'beforeunload', ->
if $.hasPendingRequest()
return "Wow, you're quick! Your data is being saved. " +
"It will only take a m... | Concatenate pending request message to remove excess whitespace | Concatenate pending request message to remove excess whitespace | CoffeeScript | bsd-2-clause | chop-dbhi/cilantro,chop-dbhi/cilantro,chop-dbhi/cilantro |
be5df29695930b10fd63cef8efcd66440fe0c3cd | client/landing/app/MainApp/localstorage.coffee | client/landing/app/MainApp/localstorage.coffee | class LocalStorageController extends KDController
idPrefix = 'koding-'
constructor:(options,data)->
super options,data
@storage = window["localStorage"]
# this even will only fire when a different window changes the LS
window.addEventListener 'storage', @storageEvent ,false
storageEvent:(even... | class LocalStorage extends AppStorage
fetchStorage:(callback=noop)->
callback window["localStorage"][@getSignature()]
KD.utils.defer => @emit "ready"
getSignature:(key, group)->
"koding-#{@_applicationID}-#{@_applicationVersion}-#{group}-#{key}"
setValue: (key, value, callback, group = 'bucket')->
... | Add new LocalStorage and LocalStorageController still WIP | Add new LocalStorage and LocalStorageController still WIP
| CoffeeScript | agpl-3.0 | alex-ionochkin/koding,mertaytore/koding,usirin/koding,szkl/koding,alex-ionochkin/koding,jack89129/koding,gokmen/koding,koding/koding,andrewjcasal/koding,rjeczalik/koding,rjeczalik/koding,mertaytore/koding,jack89129/koding,jack89129/koding,acbodine/koding,szkl/koding,sinan/koding,gokmen/koding,koding/koding,koding/kodin... |
f51f28f04c1f028bd66fbc890ba221584e114b39 | components/block_v2/queries/block.coffee | components/block_v2/queries/block.coffee | module.exports = """
fragment blockThumb on Connectable {
id
title
description
klass
created_at(relative: true)
updated_at(relative: true)
user {
name
}
href
kind {
__typename
... on Channel {
visibility
counts {
blocks
}
... | module.exports = """
fragment blockThumb on Connectable {
id
title
klass
created_at(relative: true)
updated_at(relative: true)
user {
name
}
href
kind {
__typename
... on Channel {
visibility
counts {
blocks
}
}
... on... | Remove unneeded description from query | Remove unneeded description from query
| CoffeeScript | mit | aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell |
5cdd852c4386e94cd2164c044bee036fe3acb14e | src/controllers/authenticate-controller.coffee | src/controllers/authenticate-controller.coffee | redis = require 'redis'
Authenticator = require '../models/authenticator'
MeshbluAuthParser = require '../helpers/meshblu-auth-parser'
class AuthenticateController
constructor: (options={}, dependencies={}) ->
{@authenticator} = dependencies
@authenticator ?= new Authenticator
client: ... | redis = require 'redis'
Authenticator = require '../models/authenticator'
MeshbluAuthParser = require '../helpers/meshblu-auth-parser'
debug = require('debug')('meshblu-http-server:authenticate-controller')
class AuthenticateController
constructor: (options={}, dependencies={}) ->
{@authenticator... | Add debug to auth controller | Add debug to auth controller
| CoffeeScript | mit | octoblu/meshblu-server-http,octoblu/meshblu-http-server,octoblu/meshblu-server-http,octoblu/meshblu-http-server |
ed0755f610ff1e3c55c282b155855a4673981bd9 | coffee/cilantro/models/exporter.coffee | coffee/cilantro/models/exporter.coffee | define [
'../core'
'./base'
], (c, base) ->
class ExporterModel extends base.Model
class ExporterCollection extends base.Collection
model: ExporterModel
minSerranoVersionProgressEnabled: [2, 0, 16]
url: ->
c.getSessionUrl('exporter')
initialize: ->
... | define [
'../core'
'./base'
], (c, base) ->
class ExporterModel extends base.Model
class ExporterCollection extends base.Collection
model: ExporterModel
# Versions greater than or equal to this version are considered to
# support notification on completion.
minSe... | Update mininum Serrano version supporting notifications in response | Update mininum Serrano version supporting notifications in response
| CoffeeScript | bsd-2-clause | chop-dbhi/cilantro,chop-dbhi/cilantro,chop-dbhi/cilantro |
e33b7b1a4925e0f2672d17d7b6d79c6826e00286 | services/web/public/coffee/ide/history/controllers/HistoryV2DiffController.coffee | services/web/public/coffee/ide/history/controllers/HistoryV2DiffController.coffee | define [
"base"
], (App) ->
App.controller "HistoryV2DiffController", ($scope, ide, event_tracking) ->
$scope.restoreState =
inflight: false
error: false
$scope.restoreDeletedFile = () ->
pathname = $scope.history.selection.pathname
return if !pathname?
version = $scope.history.selection.docs[path... | define [
"base"
], (App) ->
App.controller "HistoryV2DiffController", ($scope, ide, event_tracking) ->
$scope.restoreState =
inflight: false
error: false
$scope.restoreDeletedFile = () ->
pathname = $scope.history.selection.pathname
return if !pathname?
version = $scope.history.selection.docs[path... | Use `waitFor` when restoring a file in v2 history | Use `waitFor` when restoring a file in v2 history
| CoffeeScript | agpl-3.0 | sharelatex/sharelatex |
8fbbbb94398b3a4e6cba23cb1464f9d458639bcf | lib/sort-lines.coffee | lib/sort-lines.coffee | {_} = require 'atom'
RangeFinder = require './range-finder'
module.exports =
activate: (state) ->
atom.workspaceView.command 'sort-lines:sort', '.editor', =>
editor = atom.workspaceView.getActivePaneItem()
@sortLines(editor)
sortLines: (editor) ->
lineRanges = RangeFinder.rangesFor(editor)
... | RangeFinder = require './range-finder'
module.exports =
activate: (state) ->
atom.workspaceView.command 'sort-lines:sort', '.editor', =>
editor = atom.workspaceView.getActivePaneItem()
@sortLines(editor)
sortLines: (editor) ->
lineRanges = RangeFinder.rangesFor(editor)
lineRanges.forEach (... | Use native JS iteration (instead of _.each) | Use native JS iteration (instead of _.each)
| CoffeeScript | mit | garethbjohnson/sort-css,atom/sort-lines |
570e96bde1b753fb7629a8660888dc4df14dfeac | templates/project/widgets/graph/graph.coffee | templates/project/widgets/graph/graph.coffee | class Dashing.Graph extends Dashing.Widget
@accessor 'current', ->
return @get('displayedValue') if @get('displayedValue')
points = @get('points')
if points
points[points.length - 1].y
ready: ->
container = $(@node).parent()
# Gross hacks. Let's fix this.
width = (Dashing.widget_base... | class Dashing.Graph extends Dashing.Widget
@accessor 'current', ->
return @get('displayedValue') if @get('displayedValue')
points = @get('points')
if points
points[points.length - 1].y
ready: ->
container = $(@node).parent()
# Gross hacks. Let's fix this.
width = (Dashing.widget_base... | Update from pull request https://github.com/Shopify/dashing/pull/510/ | Update from pull request https://github.com/Shopify/dashing/pull/510/
| CoffeeScript | mit | Oliv4945/dashing-js,Oliv4945/dashing-js |
3dc62999bf1d2b41c0d7aa1bdf53254d199468ea | raw/newspring:core/lib/apollos.coffee | raw/newspring:core/lib/apollos.coffee | ###
Apollos.name
@example get a string with the name of this system
console.log Apollos.name
###
Apollos.name = "Apollos"
###
Apollos.user
@example get the currently logged in user
console.log Apollos.user()._id
###
Apollos.user = ->
user = Meteor.user()
return user or {}
###
Apollos.u... | ###
Apollos.name
@example get a string with the name of this system
console.log Apollos.name
###
Apollos.name = "Apollos"
###
Apollos.user
@example get the currently logged in user
console.log Apollos.user()._id
###
Apollos.user = ->
user = Meteor.user()
return user or {}
###
Apollos.p... | Fix incorrect comment about Apollos.person | Fix incorrect comment about Apollos.person
| CoffeeScript | mit | NewSpring/apollos-core,normajs/apollos-core,normajs/apollos-core |
a4db9d2e7121b8ac68b3016b4c170d867dc6b6a9 | src/coffee/cilantro/ui/context/actions.coffee | src/coffee/cilantro/ui/context/actions.coffee | define [
'../core'
'tpl!templates/context/actions.html'
], (c, templates...) ->
templates = c._.object ['actions'], templates
# Provides a set of actions for manipulating a ContextModel object
class ContextActions extends c.Marionette.ItemView
template: templates.actions
ui:
... | define [
'../core'
'tpl!templates/context/actions.html'
], (c, templates...) ->
templates = c._.object ['actions'], templates
# Provides a set of actions for manipulating a ContextModel object
class ContextActions extends c.Marionette.ItemView
template: templates.actions
ui:
... | Check if model is defined before cloning its attributes | Check if model is defined before cloning its attributes
Previously, if the context(@model) was empty then the `attrs = c._.clone(...)` line would fail with an error involving the attempt to access the attributes property of an undefined object. This code checks if the model is defined before cloning and updating the c... | CoffeeScript | bsd-2-clause | chop-dbhi/cilantro,chop-dbhi/cilantro,chop-dbhi/cilantro |
7c238365ad3fd5986fa59b9cc51465eff05d6deb | client/lanes/components/grid/Toolbar.cjsx | client/lanes/components/grid/Toolbar.cjsx | class Lanes.Components.Grid.Toolbar extends Lanes.React.Component
propTypes:
addRecord: React.PropTypes.func
addButton: ->
<BS.Button className="navbar-btn pull-right" onClick={@props.onAddRecord} bsSize='small'>
Add Row
</BS.Button>
render: ->
<BS.Navbar class... | class Lanes.Components.Grid.Toolbar extends Lanes.React.Component
propTypes:
addRecord: React.PropTypes.func
addButton: ->
<BS.Button className="navbar-btn add-row pull-right"
onClick={@props.onAddRecord} bsSize='small'
>
Add Row
</BS.Button>
render... | Set add-row css class for targeting during testing | Set add-row css class for targeting during testing
| CoffeeScript | mit | argosity/hippo,argosity/hippo,argosity/lanes,argosity/lanes,argosity/lanes,argosity/hippo |
8e9a22ed44df249394eff139ebefdea5ac9160ac | test/gozer_test.coffee | test/gozer_test.coffee | express = require('express')
Gozer = require('../src/gozer')
startServer = (options = {}) ->
app = express()
app.use(express.static(__dirname + '/app'))
app.listen(options.port || 80)
describe 'Gozer', ->
gozer = page = null
before ->
startServer(port: 3002)
gozer = new Gozer(port: 3002)
beforeE... | express = require('express')
Gozer = require('../src/gozer')
startServer = (options = {}) ->
app = express()
app.use(express.static(__dirname + '/app'))
app.listen(options.port || 80)
describe 'Gozer', ->
gozer = page = null
before ->
startServer(port: 3002)
gozer = new Gozer(port: 3002)
beforeE... | Split breakpoint assertions into two separate tests | Split breakpoint assertions into two separate tests
As noted in #11, using this style of chai-as-promised (without
explicitly synchronizing) can only perform one assertion per test, so
the first assertion was never being run.
| CoffeeScript | mit | adorableio/gozer |
90b23d5e351287ef585f465a798f0ecc52acf56f | src/spec/product-import.spec.coffee | src/spec/product-import.spec.coffee | {ProductImport} = require '../lib'
describe 'ProductImport', ->
beforeEach ->
@import = new ProductImport
it 'should initialize', ->
expect(@import).toBeDefined() | {ProductImport} = require '../lib'
Config = require('../config')
describe 'ProductImport', ->
beforeEach ->
@import = new ProductImport null, Config
it 'should initialize', ->
expect(@import).toBeDefined() | Update import for auth config. | MER-41: Update import for auth config.
| CoffeeScript | mit | sphereio/sphere-product-import |
b00d6e770683fe8d0998f6e3dbbacba814a6bee7 | app/assets/javascripts/models/paper.js.coffee | app/assets/javascripts/models/paper.js.coffee | a = DS.attr
ETahi.Paper = DS.Model.extend
shortTitle: a('string')
title: a('string')
assignees: DS.hasMany('assignee')
phases: DS.hasMany('phase')
declarations: DS.hasMany('declaration')
reviewers: DS.hasMany('user')
availableReviewers: Ember.computed.alias('journal.reviewers')
editors: DS.hasMany('user... | a = DS.attr
ETahi.Paper = DS.Model.extend
shortTitle: a('string')
title: a('string')
decision: a('string')
decisionLetter: a('string')
assignees: DS.hasMany('assignee')
phases: DS.hasMany('phase')
declarations: DS.hasMany('declaration')
reviewers: DS.hasMany('user')
availableReviewers: Ember.computed.... | Add decision and decision letter to ember paper model | Add decision and decision letter to ember paper model
| CoffeeScript | mit | johan--/tahi,johan--/tahi,johan--/tahi,johan--/tahi |
0bcf7bef7b6303e938c75dd981ff9b203a188645 | client/lanes/models/mixins/HasCodeField.coffee | client/lanes/models/mixins/HasCodeField.coffee | Lanes.Models.Mixins.HasCodeField = {
INVALID: /[^A-Z0-9a-z]/
included: (klass)->
klass::INVALID_CODE_CHARS ||= Lanes.Models.mixins.Lanes.sCodeField.INVALID
initialize: ->
this.on('change:code', this.upcaseCode)
upcaseCode: ->
this.set('code', this.get('code').toUpperCase())
}... | DEFAULT_INVALID = /[^A-Z0-9a-z]/
Lanes.Models.Mixins.HasCodeField = {
included: (klass) ->
klass::INVALID_CODE_CHARS ||= DEFAULT_INVALID
initialize: ->
this.on('change:code', this._cleanCodeAttr)
_cleanCodeAttr: ->
this.set(
'code', this.get('code').toUpperCase().rep... | Use regex to clean code strings | Use regex to clean code strings
| CoffeeScript | mit | argosity/hippo,argosity/hippo,argosity/lanes,argosity/lanes,argosity/lanes,argosity/hippo |
35ebe2656fe88126d502ec9e1bd84ec76524f0a7 | src/components/navbar/signout.cjsx | src/components/navbar/signout.cjsx | React = require 'react'
{CurrentUserStore} = require '../../flux/current-user'
LOGOUT_URL = '/accounts/logout'
CSRF_Token = CurrentUserStore.getCSRFToken()
module.exports = React.createClass
render: ->
{className, children} = @props
classes = []
classes.push(className) if className
classes = classe... | React = require 'react'
{CurrentUserStore} = require '../../flux/current-user'
LOGOUT_URL = '/accounts/logout'
CSRF_Token = CurrentUserStore.getCSRFToken()
module.exports = React.createClass
render: ->
{className, children} = @props
classes = []
classes.push(className) if className
classes = classe... | Use camelCase version of accept-charset | Use camelCase version of accept-charset
Silences warning about React not supporting dasherized prop names.
| CoffeeScript | agpl-3.0 | openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js |
59a78207230fc970b9486341ee73b002bd651458 | src/beautifiers/formatR/index.coffee | src/beautifiers/formatR/index.coffee | ###
Requires [formatR](https://github.com/yihui/formatR)
###
path = require("path")
"use strict"
Beautifier = require('../beautifier')
module.exports = class R extends Beautifier
name: "formatR"
link: "https://github.com/yihui/formatR"
executables: [
{
name: "Rscript"
cmd: "rscript"
homepa... | ###
Requires [formatR](https://github.com/yihui/formatR)
###
path = require("path")
"use strict"
Beautifier = require('../beautifier')
module.exports = class R extends Beautifier
name: "formatR"
link: "https://github.com/yihui/formatR"
executables: [
{
name: "Rscript"
cmd: "rscript"
homepa... | Fix formatR, do not pipe stdout to file, unnecessarily | Fix formatR, do not pipe stdout to file, unnecessarily
| CoffeeScript | mit | Glavin001/atom-beautify,prettydiff/atom-beautify,Glavin001/atom-beautify,Glavin001/atom-beautify,prettydiff/atom-beautify,prettydiff/atom-beautify,Glavin001/atom-beautify,prettydiff/atom-beautify,Glavin001/atom-beautify |
a6242529881745a4e2efd39b0bfb6b2a2acc80ac | src/dom_element/children_list.coffee | src/dom_element/children_list.coffee | 'use strict'
List = require '../nodes/list'
module.exports = class ChildrenList extends List
constructor: (@element) ->
set: (elementList) ->
while (el = @element.lastChild)?
@element.removeChild(el)
for el in elementList
@element.appendChild(el)
return this
get: ->
@element... | 'use strict'
List = require '../nodes/list'
module.exports = class ChildrenList extends List
constructor: (@element) ->
set: (elementList) ->
while (el = @element.lastChild)?
@element.removeChild(el)
for el in elementList
@element.appendChild(el)
return this
setAt: (el, pos) ->
... | Improve DOM node children list | Improve DOM node children list
| CoffeeScript | mit | valentin-nemcev/transmitter.js |
005f7b3a2ac55e094d0f6782b1344cf842e5d9e1 | test/time.spec.coffee | test/time.spec.coffee | {expect} = require 'chai'
{TimeActions, TimeStore} = require '../src/flux/time'
SERVER_TIME = new Date('2000-02-02')
LOCAL_TIME = new Date('2011-11-11')
describe 'Server Time', ->
it 'returns the server time', ->
TimeActions.setNow(SERVER_TIME, LOCAL_TIME)
time = TimeStore.getNow(LOCAL_TIME)
# Use str... | {expect} = require 'chai'
{TimeActions, TimeStore} = require '../src/flux/time'
SERVER_TIME = new Date('2000-02-02')
LOCAL_TIME = new Date('2011-11-11')
describe 'Server Time', ->
it 'returns the server time', ->
TimeActions.setNow(SERVER_TIME, LOCAL_TIME)
time = TimeStore.getNow(LOCAL_TIME)
# Use str... | Use ISO date string for setting date | Use ISO date string for setting date
And compare it against toDateString
| CoffeeScript | agpl-3.0 | openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js |
30de8059c153b4a7055e61bc15b6a9dc19463884 | app/coffee/utils.coffee | app/coffee/utils.coffee | # Copyright 2013 Andrey Antukh <niwi@niwi.be>
#
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | # Copyright 2013 Andrey Antukh <niwi@niwi.be>
#
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | Fix wrong call to debounce method. | Fix wrong call to debounce method.
| CoffeeScript | agpl-3.0 | taigaio/taiga-front-old |
1c078c728243411be3d9c6e9d0f12a1dbeb455fd | app/scripts/main.coffee | app/scripts/main.coffee | L.mapbox.accessToken = 'pk.eyJ1Ijoia25vY2siLCJhIjoiRVdjRFVjRSJ9.nIZeVnR6dJZ0hwNnKAiAlQ'
map = L.mapbox.map('map', 'knock.l5dpakki').
setView([47.61, -122.33], 13)
featureLayer = L.mapbox.featureLayer().addTo(map)
featureLayer.loadURL('http://zillowhack.hud.opendata.arcgis.com/datasets/2a462f6b548e4ab8bfd9b2523a3db4... | L.mapbox.accessToken = 'pk.eyJ1Ijoia25vY2siLCJhIjoiRVdjRFVjRSJ9.nIZeVnR6dJZ0hwNnKAiAlQ'
map = L.mapbox.map('map', 'knock.l5dpakki').
setView([47.61, -122.33], 13)
featureLayer = L.mapbox.featureLayer().addTo(map)
featureLayer.loadURL('/data/school_sites.json')
| Add school sites to the loaded data. | Add school sites to the loaded data.
| CoffeeScript | mit | harleyholt/hackhousing.knockX2,harleyholt/hackhousing.knockX2 |
117b4b85226e1c72bfa5c2aae9d00bd1bcb78002 | coffeescript/wordcount.coffee | coffeescript/wordcount.coffee | reader = require('readline').createInterface process.stdin, null
{XRegExp} = require 'xregexp'
counts = new Map()
reader.on 'line', (line) ->
wordPattern = XRegExp("[\\p{L}']+", 'g')
for word in (line.toLowerCase().match(wordPattern) or [])
counts.set word, (counts.get(word) or 0) + 1
reader.on 'close', ->
... | reader = require('readline').createInterface process.stdin, null
XRegExp = require 'xregexp'
counts = new Map()
reader.on 'line', (line) ->
wordPattern = XRegExp("[\\p{L}']+", 'g')
for word in (line.toLowerCase().match(wordPattern) or [])
counts.set word, (counts.get(word) or 0) + 1
reader.on 'close', ->
fo... | Support newer xregexp where XRegExp is imported as default | Support newer xregexp where XRegExp is imported as default
| CoffeeScript | mit | rtoal/polyglot,rtoal/ple,rtoal/polyglot,rtoal/polyglot,rtoal/polyglot,rtoal/polyglot,rtoal/ple,rtoal/ple,rtoal/ple,rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/ple,rtoal/ple,rtoal/ple,rtoal/ple,rtoal/polyglot,rtoal/polyglot,rtoal/polyglot,rtoal/polyglot,rtoal/polyglot,rtoal/ple,rtoal/ple,rtoal/polyglot,rtoal/polyglot,rtoal... |
bc15465636b4cae6f834a6a015b38721eaa0547b | coffee/src/util/test.coffee | coffee/src/util/test.coffee | goog.provide 'athena.lib.util.test'
test = athena.lib.util.test
# construct, render, and display view
test.view_with_options = (options, ViewClass, appendTo) ->
ViewClass = ViewClass || lib.View
appendTo = appendTo || 'body'
view = new ViewClass options
view.render()
$(appendTo).append view.$el
view
# co... | goog.provide 'athena.lib.util.test'
test = athena.lib.util.test
# construct, render, and display view
test.view_with_options = (options, ViewClass, appendTo) ->
ViewClass = ViewClass || lib.View
appendTo = appendTo || 'body'
view = new ViewClass options
view.render()
$(appendTo).append view.$el
view
# co... | Revert "utils: bugfix: eventSpy constructor returns self" | Revert "utils: bugfix: eventSpy constructor returns self"
This reverts commit 43d63c85f63f15587125d00aaafd5c2a930b425a.
Conflicts:
coffee/src/util/test.coffee
| CoffeeScript | mit | athenalabs/athena-lib-js |
e8784f83b6e8752ba17c483c4a3398d9fb474a62 | body-class.coffee | body-class.coffee | routeClasses = ->
ctrl = Router.current()
_.chain([ctrl._layout._template, ctrl.lookupTemplate()])
.compact()
.invoke('toLowerCase')
.value()
BodyClass =
settings:
element: 'body'
classes: []
config: (opts) ->
_.extend(@settings, opts)
return this
add: (fn) ->
unless Match.... | routeClasses = ->
ctrl = Router.current()
_.chain([ctrl._layout._template, ctrl.lookupTemplate()])
.compact()
.invoke('toLowerCase')
.value()
BodyClass =
settings:
element: 'body'
classes: []
config: (opts) ->
_.extend(@settings, opts)
return this
add: (fn) ->
unless Match.... | Use _.bind instead of Function.prototype.bind | Use _.bind instead of Function.prototype.bind
| CoffeeScript | mit | lookback/meteor-bodyclass,lookback/meteor-bodyclass |
38d51b19f9583b10c450d7bfef8dbfffbf4200c4 | src/extensions/resolve.coffee | src/extensions/resolve.coffee | urllite = require '../core'
require './normalize'
{URL} = urllite
oldParse = URL.parse
copyProps = (target, source, props...) ->
target[prop] = source[prop] for prop in props
target
URL.parse = (raw, opts) ->
if base = opts?.base
delete opts.base
url = oldParse raw, opts
if base then url.resolve bas... | urllite = require '../core'
require './normalize'
{URL} = urllite
oldParse = URL.parse
copyProps = (target, source, props...) ->
target[prop] = source[prop] for prop in props
target
URL.parse = (raw, opts) ->
if base = opts?.base
delete opts.base
url = oldParse raw, opts
if base then url.resolve bas... | Fix resolution for single-segment path-relative URLs | Fix resolution for single-segment path-relative URLs
| CoffeeScript | mit | hzdg/urllite.js |
23ac36fc2e28ff562f0cf928dc59e3ad80281f01 | menus/sort-lines.cson | menus/sort-lines.cson | 'menu': [
{
'label': 'Packages'
'submenu': [
'label': 'Sort Lines'
'submenu': [
{ 'label': 'Sort', 'command': 'sort-lines:sort' }
]
]
}
]
| 'menu': [
{
'label': 'Edit'
'submenu': [
'label': 'Lines'
'submenu': [
{ 'label': 'Sort', 'command': 'sort-lines:sort' }
]
]
}
]
| Move menu location to Edit > Lines > Sort | Move menu location to Edit > Lines > Sort
| CoffeeScript | mit | atom/sort-lines,garethbjohnson/sort-css |
d7408bcff45fdab6c0f491c28d73e12ec9b2c72d | src/cli/argv.coffee | src/cli/argv.coffee | parser = require 'nomnom'
judge = require '../judge'
module.exports = (argv) ->
parser.command 'install'
.callback (opts) ->
judge.install process.cwd(), opts[1], (err) ->
throw err if err
parser.command 'run'
.callback (opts) ->
judge.run opts[1], process.cwd(), opts[2], opts._[3..], (err) ->
throw er... | parser = require 'nomnom'
judge = require '../judge'
module.exports = (argv) ->
parser.command 'install'
.option 'overwrite',
flag: true
.callback (opts) ->
judge.install process.cwd(), opts[1], opts.overwrite, (err) ->
throw err if err
parser.command 'run'
.callback (opts) ->
judge.run opts[1], proces... | Add overwrite parameter to install command | Add overwrite parameter to install command
| CoffeeScript | bsd-2-clause | SonicHedgehog/judge |
da244a3efc5f3b4d89a755d6d56de7347d06d3f8 | src/coffee/app.coffee | src/coffee/app.coffee | # Initialize all namespaces
class SwanKiosk
@Interpreters: {}
@Components: {}
@Config: {}
@Store: {}
@Controllers:
_find: (name) ->
_.find this, (value, key) ->
key.split('Controller')[0].toLowerCase() == name.toLowerCase()
@create: (klass, args) ->
new klass args
_i... | # Initialize all namespaces
class SwanKiosk
@Interpreters: {}
@Components: {}
@Config: {}
@Store: {}
@Controllers:
_find: (name) ->
_.find this, (value, key) ->
key.split('Controller')[0].toLowerCase() == name.toLowerCase()
@create: (klass, args) ->
new klass args
_i... | Make tooltips work on ios | Make tooltips work on ios
| CoffeeScript | mit | TheSwanFactory/self-service-kiosk,TheSwanFactory/self-service-kiosk |
571a6c69038e48c39427316f299a705d9ffb8404 | app/assets/javascripts/tryEvalGD.coffee | app/assets/javascripts/tryEvalGD.coffee | $ ->
$('textarea').keydown (event) =>
if (event.keyCode == 10 or event.keyCode == 13) and event.ctrlKey
$('#result').text("Loading...")
$.ajax {
"url": "/jsontest",
"type": "POST",
"data": JSON.stringify({
"language": "ruby",
"code": $('textarea').val()
... | $ ->
$('textarea').keydown (event) =>
if (event.keyCode == 10 or event.keyCode == 13) and event.ctrlKey
$('#result').text("Loading...")
$.ajax {
"url": "/jsontest",
"type": "POST",
"data": JSON.stringify({
"language": "ruby",
"code": $('textarea').val()
... | Handle errors on /try, rather than appearing to 'Load' forever. | Handle errors on /try, rather than appearing to 'Load' forever.
| CoffeeScript | apache-2.0 | eval-so/frontend,eval-so/frontend |
1a57a93239efa921313cd0e9030cffe07875010e | 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?
$('#languages li').removeClass('disabled')
$('#projects').html(projects.find('.project'))
projects = $('#projects').clone()
$('... | $ ->
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... | Return to 'Everything' when none of languages are selected | Return to 'Everything' when none of languages are selected
| CoffeeScript | mit | 24pullrequests/24pullrequests,pimterry/24pullrequests,tarebyte/24pullrequests,arumoy-shome/24pullrequests,nateberkopec/24pullrequests,tarebyte/24pullrequests,acrogenesis-lab/24pullrequests,tarebyte/24pullrequests,24pullrequests/24pullrequests,acrogenesis-lab/24pullrequests,davefp/24pullrequests,24pullrequests/24pullreq... |
0a85ad2c5b275f31b16e4eb1fc2f5f1d6591d120 | scripts/poo-tracker.coffee | scripts/poo-tracker.coffee | Redis = require 'redis'
Url = require 'url'
POO_TRACKER_KEY = "poops"
POO_LATEST_KEY = "poops:latest_message"
info = Url.parse process.env.POO_REDIS_URL or "redis://localhost:6379/0"
redis_client = Redis.createClient(info.port, info.hostname)
redis_client.auth info.auth.split(":")[1] if info.auth
module.exports = (r... | Redis = require 'redis'
Url = require 'url'
POO_TRACKER_KEY = "poops"
POO_LATEST_KEY = "poops:latest_message"
info = Url.parse process.env.POO_REDIS_URL or "redis://localhost:6379/0"
redis_client = Redis.createClient(info.port, info.hostname)
redis_client.auth info.auth.split(":")[1] if info.auth
module.exports = (r... | Switch this to a straight up say | Switch this to a straight up say
| CoffeeScript | mit | skalnik/hayt,drobati/hayt,n1ckn4m3/hayt,pmn/hayt,desert-planet/hayt |
6360db117c62801818c908181f0e53fef975dc81 | server/test/integration/indicator_index.coffee | server/test/integration/indicator_index.coffee | assert = require('chai').assert
helpers = require '../helpers'
request = require('request')
async = require('async')
url = require('url')
_ = require('underscore')
suite('Indicator index')
test("With a series of indicators, I should see their titles", (done) ->
helpers.createIndicatorModels([
{
title: 'in... | assert = require('chai').assert
helpers = require '../helpers'
request = require('request')
async = require('async')
url = require('url')
_ = require('underscore')
suite('Indicator index')
test("With a series of indicators, I should see their titles", (done) ->
themeAttributes = [{
title: 'Theme 1'
external... | Fix indicator index test by adding them to themes | Fix indicator index test by adding them to themes
Indicators are now displayed per theme, so we need indicators with
themes to list them
| CoffeeScript | bsd-3-clause | unepwcmc/NRT,unepwcmc/NRT |
43f59ffaaeead14d8505c575ba1074762c7dc7af | scripts/models/Subject.coffee | scripts/models/Subject.coffee | Spine = require 'Spine'
Classification = require 'models/Classification'
class Subject extends Spine.Model
@configure 'Subject', 'image', 'audio', 'latitude', 'longitude', 'location', 'habitat', 'datetime'
@next: ->
subjects = Subject.all()
random = Math.floor Math.random() * subjects.length
subjects[r... | Spine = require 'Spine'
Classification = require 'models/Classification'
class Subject extends Spine.Model
@configure 'Subject', 'image', 'audio', 'latitude', 'longitude', 'location', 'habitat', 'captured'
@next: ->
subjects = Subject.all()
random = Math.floor Math.random() * subjects.length
subjects[r... | Update my local subject's ID | Update my local subject's ID | CoffeeScript | apache-2.0 | powolnymarcel/Bat-Detective,zooniverse/Bat-Detective,powolnymarcel/Bat-Detective,powolnymarcel/Bat-Detective,zooniverse/Bat-Detective,zooniverse/Bat-Detective |
35dd37f6602178cc24c9a33076838e6e066a734c | src/scripts/store.coffee | src/scripts/store.coffee | Redux = require 'redux'
promiseMiddleware = require 'redux-promise-middleware'
thunkMiddleware = require 'redux-thunk'
Router = require 'react-router'
createHistory = require 'history/lib/createMemoryHistory' # aliased in webpack
ReduxRouter = require 'redux-simple-router'
routes = require './views/routes.coffee'
red... | Redux = require 'redux'
promiseMiddleware = require 'redux-promise-middleware'
thunkMiddleware = require 'redux-thunk'
Router = require 'react-router'
createHistory = require 'history/lib/createMemoryHistory' # aliased in webpack
ReduxRouter = require 'redux-simple-router'
routes = require './views/routes.coffee'
util... | Use Redux Devtools Chrome extension. | Use Redux Devtools Chrome extension.
| CoffeeScript | mit | thirdhand/3rdhand.info,thirdhand/3rdhand.info |
d91e75dde63ac4be5ad548c2e263ea96533f3aed | coffee/cilantro/ui/exporter.coffee | coffee/cilantro/ui/exporter.coffee | define [
'./core'
], (c) ->
class ExportType extends c.Backbone.View
tagName: 'label'
className: 'checkbox'
render: ->
title = @model.get('title') or 'untitled'
@$el.html("<input type=checkbox name=export-type-check id=export-type-check-#{ title } chec... | define [
'./core'
], (c) ->
class ExportType extends c.Backbone.View
tagName: 'label'
className: 'radio'
render: ->
title = @model.get('title') or 'untitled'
@$el.html("<input type=radio name=export-type-radio id=export-type-radio-#{ title } /> #{ titl... | Use radio buttons for export type selection as there is no bulk export resource yet. | Use radio buttons for export type selection as there is no bulk export resource yet.
| CoffeeScript | bsd-2-clause | chop-dbhi/cilantro,chop-dbhi/cilantro,chop-dbhi/cilantro |
d527dc621bd8366c265aeb652fdbf32f47781d6f | src/streak-podium.coffee | src/streak-podium.coffee | # Description
# A hubot script that shows who has the longest github streak in your org
#
# Configuration:
# LIST_OF_ENV_VARS_TO_SET
# HUBOT_ORG_ACCESS_TOKEN
#
# Commands:
# streak ladder - <Gets a list of the longest github commit streaks in your org>
#
# Notes:
# An access token is required by the github ap... | # Description
# A hubot script that shows who has the longest github streak in your org
#
# Configuration:
# LIST_OF_ENV_VARS_TO_SET
# HUBOT_ORG_ACCESS_TOKEN
#
# Commands:
# streak ladder - <Gets a list of the longest github commit streaks in your org>
#
# Notes:
# An access token is required by the github ap... | Make an https get to github using env auth token | Make an https get to github using env auth token
| CoffeeScript | mit | jollyra/hubot-streak-podium,jollyra/hubot-commit-streak,jollyra/hubot-streak-podium,jollyra/hubot-commit-streak |
08a708a156d90de8bf142fa111c45995614682c7 | apps/settings/components/form_card/index.coffee | apps/settings/components/form_card/index.coffee | Promise = require 'bluebird-q'
Serializer = require '../../../../components/form/serializer.coffee'
module.exports = ($el) ->
$submit = $el.find('button')
$errors = $el.find('.js-form-errors')
label = $submit.text()
$el.on 'submit', (e) ->
e.preventDefault()
serializer = new Serializer $el
$sub... | Promise = require 'bluebird-q'
Serializer = require '../../../../components/form/serializer.coffee'
module.exports = ($el, onSubmit) ->
$submit = $el.find('button')
$errors = $el.find('.js-form-errors')
label = $submit.text()
$el.on 'submit', (e) ->
e.preventDefault()
serializer = new Serializer $el... | Allow form to take an onSubmit argument | Allow form to take an onSubmit argument
| CoffeeScript | mit | aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell |
dfe32ee63926e321d2ba42c017c5410401e0afcf | src/components/student-dashboard/reading-row.cjsx | src/components/student-dashboard/reading-row.cjsx | React = require 'react'
BS = require 'react-bootstrap'
EventRow = require './event-row'
_ = require 'underscore'
isStepComplete = (step) -> step.is_completed
module.exports = React.createClass
displayName: 'ReadingRow'
propTypes:
event: React.PropTypes.object.isRequired
courseId: React.PropTypes... | React = require 'react'
BS = require 'react-bootstrap'
EventRow = require './event-row'
_ = require 'underscore'
isStepComplete = (step) -> step.is_completed
module.exports = React.createClass
displayName: 'ReadingRow'
propTypes:
event: React.PropTypes.object.isRequired
courseId: React.PropTypes... | Use complete_exercise_count to determine status | Use complete_exercise_count to determine status
| CoffeeScript | agpl-3.0 | openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js |
14990a6fb5a5bd0ac1575c8b071dda47e8efa61f | app/assets/javascripts/app/spaces/new.js.coffee | app/assets/javascripts/app/spaces/new.js.coffee | $ ->
$("#new-space-basic-info input#space_public").on 'click', ->
checked = $(this).attr('checked') == 'checked'
$("#new-space-webconf-area").toggle(!checked)
| $ ->
$("#new-space-basic-info input#space_public").on 'click', ->
$("#new-space-webconf-area").toggle(! $(this).is(':checked'))
| Correct coffeescript in previous commit | Correct coffeescript in previous commit
| CoffeeScript | agpl-3.0 | fbottin/mconf-web,mconf-ufrgs/mconf-web,lfzawacki/mconf-web,mconftec/mconf-web-uergs,mconf/mconf-web,mconf-rnp/mconf-web,mconftec/mconf-web-santacasa,mconf-rnp/mconf-web,mconf-ufrgs/mconf-web,becueb/MconfWeb,mconftec/mconf-web-uergs,becueb/MconfWeb,mconf-rnp/mconf-web,amreis/mconf-web,mconftec/mconf-web-cedia,mconftec/... |
dd560298a5fd6d4227fe6edb7a84f007b5466fae | app/frontend/javascripts/app.js.coffee | app/frontend/javascripts/app.js.coffee | window.App ||= {}
App.Visualization = require './visualization.js'
App.Story = require './story.js'
App.Trix = require 'script!trix'
$(document).ready ->
$body = $('body')
# visualizations
if $body.hasClass 'visualizations'
# /visualizations/:id
# /visualizations/:id/edit
appVisua... | window.App ||= {}
App.Visualization = require './visualization.js'
App.Story = require './story.js'
App.Trix = require 'script!trix'
$(document).ready ->
$body = $('body')
# visualizations
if $body.hasClass('visualizations') and ($body.hasClass('show') or $body.hasClass('edit'))
# /visual... | Fix body class check to avoid initialize Visualization or Story classes in templates different to show or edit | Fix body class check to avoid initialize Visualization or Story classes in templates different to show or edit
| CoffeeScript | agpl-3.0 | civio/onodo,civio/onodo,civio/onodo,civio/onodo |
2994c3dc28601b438dbf3e2ee5e40e9b6fb0f8eb | lib/minimap-pigments-binding.coffee | lib/minimap-pigments-binding.coffee | {CompositeDisposable} = require 'atom'
module.exports =
class MinimapPigmentsBinding
constructor: ({@editor, @minimap, @colorBuffer}) ->
@displayedMarkers = []
@decorationsByMarkerId = {}
@subscriptionsByMarkerId = {}
@subscriptions = new CompositeDisposable
@colorBuffer.initialize().then => @u... | {CompositeDisposable} = require 'atom'
module.exports =
class MinimapPigmentsBinding
constructor: ({@editor, @minimap, @colorBuffer}) ->
@displayedMarkers = []
@decorationsByMarkerId = {}
@subscriptionsByMarkerId = {}
@subscriptions = new CompositeDisposable
@colorBuffer.initialize().then => @u... | Add plugin origin on created markers | Add plugin origin on created markers
| CoffeeScript | mit | abe33/minimap-pigments |
e7dafec21c3867757410df70310bad9f905b323e | src/extensions/command-interpreter.coffee | src/extensions/command-interpreter.coffee | fs = require 'fs'
PEG = require 'pegjs'
module.exports =
class CommandInterpreter
constructor: ->
@parser = PEG.buildParser(fs.read(require.resolve 'command-interpreter/commands.pegjs'))
eval: (editor, string) ->
command = @parser.parse(string)
@lastRelativeAddress = command if command.isRelativeAddre... | fs = require 'fs'
PEG = require 'pegjs'
module.exports =
class CommandInterpreter
constructor: ->
@parser = PEG.buildParser(fs.read(require.resolve 'command-interpreter/commands.pegjs'))
eval: (editor, string) ->
compositeCommand = @parser.parse(string)
@lastRelativeAddress = compositeCommand if compo... | Rename command to compositCommand in command interpreter | Rename command to compositCommand in command interpreter | CoffeeScript | mit | wiggzz/atom,kdheepak89/atom,toqz/atom,mostafaeweda/atom,hakatashi/atom,rmartin/atom,BogusCurry/atom,codex8/atom,woss/atom,bcoe/atom,kittens/atom,nvoron23/atom,yomybaby/atom,githubteacher/atom,vjeux/atom,bradgearon/atom,ObviouslyGreen/atom,efatsi/atom,jordanbtucker/atom,chfritz/atom,Rychard/atom,Jdesk/atom,gisenberg/ato... |
dbdb53d1ef9f8d414030f6944c93d47cdef3bdf7 | src/biskoto.coffee | src/biskoto.coffee | define ->
class Biskoto
@get: (name) ->
if document.cookie
cookies = decodeURIComponent(document.cookie).split(/;\s/g)
for cookie in cookies
if cookie.indexOf(name) is 0
return cookie.split('=')[1]
return null
return Biskoto
| define ->
class Biskoto
encode = encodeURIComponent
decode = decodeURIComponent
@get: (name) ->
if document.cookie
cookies = decode(document.cookie).split(/;\s/g)
for cookie in cookies
if cookie.indexOf(name) is 0
return cookie.split('=')[1]
return null... | Add .get() and .expire() methods to Biskoto | Add .get() and .expire() methods to Biskoto
| CoffeeScript | mit | skroutz/analytics.js,skroutz/analytics.js,skroutz/analytics.js |
fe963b1d775639802f27727a21f7d939e58fb6ef | src/ext/components/predict-output.coffee | src/ext/components/predict-output.coffee | H2O.PredictOutput = (_, _go, prediction) ->
{ frame, model } = prediction
_isBinomial = signal prediction.model_category is 'Binomial'
_isMultinomial = signal prediction.model_category is 'Multinomial'
_isRegression = signal prediction.model_category is 'Regression'
_isClustering = signal prediction.model_cat... | H2O.PredictOutput = (_, _go, prediction) ->
{ frame, model } = prediction
_isBinomial = signal prediction.model_category is 'Binomial'
_isMultinomial = signal prediction.model_category is 'Multinomial'
_isRegression = signal prediction.model_category is 'Regression'
_isClustering = signal prediction.model_cat... | Add random chance line to RoC chart HEXDEV-168 | Add random chance line to RoC chart HEXDEV-168
| CoffeeScript | mit | junwucs/h2o-flow,h2oai/h2o-flow,nilbody/h2o-flow,printedheart/h2o-flow,h2oai/h2o-flow,printedheart/h2o-flow,nilbody/h2o-flow,junwucs/h2o-flow,junwucs/h2o-flow,nilbody/h2o-flow,printedheart/h2o-flow |
f6f8eda9cb221c563b3a6986e09a7e2f9fc38a56 | client/controller/vote-controller.coffee | client/controller/vote-controller.coffee | class @VoteController extends RouteController
waitOn: ->
q = {}
if filterType = @params.filterType
q.type = filterType
if filterTag = @params.filterTag
q.tags = filterTag
Meteor.subscribe('proposals-min', q)
after: -> document.title = "Vote | Reversim Summit 2014"
tempalte: 'vote'
... | class @VoteController extends RouteController
waitOn: ->
q = {}
if filterType = @params.filterType
q.type = filterType
if filterTag = @params.filterTag
q.tags = filterTag
Meteor.subscribe('proposals-min', q)
after: -> document.title = "Vote | Reversim Summit 2014"
tempalte: 'vote'
... | Fix the reduce function. Yet again... | Fix the reduce function. Yet again...
| CoffeeScript | apache-2.0 | rantav/reversim-summit-2014,rantav/reversim-summit-2014,rantav/reversim-summit-2015,rantav/reversim-summit-2015,rantav/reversim-summit-2015 |
e7a89a3081eceb025b6de707fc4a7337ed74de6c | src/client.cjsx | src/client.cjsx | window.$ = window.jQuery = require('jquery')
require('semantic-ui-css/semantic')
React = require('react/addons')
ReactDOM = require('react-dom')
reactRouter = require('react-router')
Header = require('./header')
CodeEditor = require('./CodeEditor')
Documentation = require('./Documentation')
Master = require('./Master... | window.$ = window.jQuery = require('jquery')
require('semantic-ui-css/semantic')
React = require('react/addons')
ReactDOM = require('react-dom')
reactRouter = require('react-router')
Header = require('./header')
CodeEditor = require('./CodeEditor')
Documentation = require('./Documentation')
Master = require('./Master... | Reduce overhead DIVs in layout | Reduce overhead DIVs in layout
| CoffeeScript | mit | MuSiika/euhack-2015,MuSiika/euhack-2015 |
e0b51e26f107831bfe5feb31b80b5e1d5ab54176 | src/trix/config/text_attributes.coffee | src/trix/config/text_attributes.coffee | Trix.config.textAttributes =
bold:
tagName: "strong"
inheritable: true
parser: (element) ->
return false if /H\d$/.test(element.tagName) or element.tagName is "BR"
style = window.getComputedStyle(element)
style["fontWeight"] is "bold" or style["fontWeight"] >= 600
italic:
tagName:... | Trix.config.textAttributes =
bold:
tagName: "strong"
inheritable: true
parser: (element) ->
style = window.getComputedStyle(element)
style["fontWeight"] is "bold" or style["fontWeight"] >= 600
italic:
tagName: "em"
inheritable: true
parser: (element) ->
style = window.getC... | Remove redundant text attribute condition | Remove redundant text attribute condition
| CoffeeScript | mit | urossmolnik/trix,basecamp/trix,GabiGrin/trix,ChenMichael/trix,urossmolnik/trix,basecamp/trix,basecamp/trix,ChenMichael/trix,GabiGrin/trix,urossmolnik/trix,basecamp/trix,ChenMichael/trix,GabiGrin/trix |
2e721a43db2f46647ec9f1ac4a7a4cc2a7eefa0a | client/source/routes.coffee | client/source/routes.coffee | SettingsController = require 'controllers/settings_controller'
TemplatesController = require 'controllers/templates_controller'
BucketsController = require 'controllers/buckets_controller'
InstallController = require 'controllers/install_controller'
RoutesController = require 'controllers/routes_controller'
AuthControl... | SettingsController = require 'controllers/settings_controller'
TemplatesController = require 'controllers/templates_controller'
BucketsController = require 'controllers/buckets_controller'
InstallController = require 'controllers/install_controller'
RoutesController = require 'controllers/routes_controller'
AuthControl... | Fix for user route (still no view) | Fix for user route (still no view)
| CoffeeScript | agpl-3.0 | bucketsio/buckets,mikesmithmsm/buckets,artelse/buckets,mikesmithmsm/buckets,bucketsio/buckets,edolyne/hive,edolyne/hive,edolyne/buckets,dut3062796s/buckets,nishant8BITS/buckets,asm-products/buckets,asm-products/buckets,nishant8BITS/buckets,artelse/buckets,edolyne/buckets,dut3062796s/buckets,mamute/buckets,mamute/bucket... |
c0d1f22487e2a377ac6eaa94b895554367dfb29b | test/error_messages.coffee | test/error_messages.coffee | # Error Formating
# ---------------
# Ensure that errors of different kinds (lexer, parser and compiler) are shown
# in a consistent way.
{prettyErrorMessage} = CoffeeScript.helpers
assertErrorFormat = (code, expectedErrorFormat) ->
throws (-> CoffeeScript.compile code), (err) ->
message = prettyErrorMessage e... | # Error Formating
# ---------------
# Ensure that errors of different kinds (lexer, parser and compiler) are shown
# in a consistent way.
{prettyErrorMessage} = CoffeeScript.helpers
assertErrorFormat = (code, expectedErrorFormat) ->
throws (-> CoffeeScript.run code), (err) ->
message = prettyErrorMessage err, ... | Add test for compiler errors on require()d files | Add test for compiler errors on require()d files
| CoffeeScript | mit | kannannilakantaayyar/coffeescript,AndersonFirmino/coffeescript,lbeschastny/coffeescript,GabrielRatener/coffeescript-next,youleiy/coffee-script,coffee-void/coffeescript,bobcassels/pencil-coffee-script,shreeve/coffeescript,decaffeinate/coffeescript,hgGeorg/coffee-script,GabrielRatener/coffeescript-next,alxarch/coffeescri... |
5900bde9e29ea9fe55d7264947e4feea87570ac0 | app/assets/javascripts/controllers/matchers-show-controller.js.coffee | app/assets/javascripts/controllers/matchers-show-controller.js.coffee | App.MatchersShowController = Em.ObjectController.extend
needs: ['transactions']
syncTransactions: (->
categoryTransactions = @get('model.transactions')
transactionsController = @get 'controllers.transactions'
transactionsController.set 'model', categoryTransactions
Em.debug "#{this} syncTransactio... | App.MatchersShowController = Em.ObjectController.extend
needs: ['transactions']
syncTransactions: (->
categoryTransactions = @get('model.transactions')
transactionsController = @get 'controllers.transactions'
transactionsController.set 'model', categoryTransactions
Em.debug "#{this} syncTransactio... | Add delete to matcher contorller | Add delete to matcher contorller | CoffeeScript | mit | artzte/itcostus,artzte/itcostus |
b3d1dbdfdef552e09bc91809ca3b428fd48a3418 | app/assets/javascripts/models/category.js.coffee | app/assets/javascripts/models/category.js.coffee | App.Category = App.Model.extend
id: Ember.attr()
name: Ember.attr()
count: Ember.attr(Number)
total: Ember.attr(Number)
transactions: Ember.hasMany 'App.Transaction',
key: 'transaction_ids'
matchers: Ember.hasMany 'App.Matcher',
key: 'matcher_id'
App.Category.url = "/categories"
App.Category.adapter... | App.Category = App.Model.extend
id: Ember.attr()
name: Ember.attr()
system_type: Ember.attr()
count: Ember.attr(Number)
total: Ember.attr(Number)
transactions: Ember.hasMany 'App.Transaction',
key: 'transaction_ids'
matchers: Ember.hasMany 'App.Matcher',
key: 'matcher_id'
App.Category.url = "/cate... | Add category system type attribute | Add category system type attribute | CoffeeScript | mit | artzte/itcostus,artzte/itcostus |
7ca2fab5ddabfd9710086a29df76f33e24b80709 | desktop/apps/gallery_partnerships2/routes.coffee | desktop/apps/gallery_partnerships2/routes.coffee | { extend } = require 'underscore'
JSONPage = require '../../components/json_page'
resizer = require '../../components/resizer'
markdown = require '../../components/util/markdown'
page = new JSONPage name: 'gallery-partnerships'
@index = (req, res, next) ->
page.get()
.then (data) ->
res.render 'index', ex... | { extend } = require 'underscore'
JSONPage = require '../../components/json_page'
resizer = require '../../components/resizer'
markdown = require '../../components/util/markdown'
page = new JSONPage name: 'gallery-partnerships2'
@index = (req, res, next) ->
page.get()
.then (data) ->
res.render 'index', e... | Use correct file name for s3 | Use correct file name for s3
Signed-off-by: Yuki Nishijima <a6aa6c594f3f904825833313c0bab3e292e95764@artsymail.com>
| CoffeeScript | mit | erikdstock/force,kanaabe/force,oxaudo/force,eessex/force,cavvia/force-1,eessex/force,kanaabe/force,artsy/force-public,anandaroop/force,cavvia/force-1,eessex/force,erikdstock/force,yuki24/force,kanaabe/force,cavvia/force-1,anandaroop/force,joeyAghion/force,kanaabe/force,oxaudo/force,izakp/force,xtina-starr/force,damassi... |
4b3d214762b4b098f4c542d7092b10a3386b3cb1 | spec/deprecation-cop-spec.coffee | spec/deprecation-cop-spec.coffee | DeprecationCopView = require '../lib/deprecation-cop-view'
describe "DeprecationCop", ->
[activationPromise, workspaceElement] = []
beforeEach ->
workspaceElement = atom.views.getView(atom.workspace)
activationPromise = atom.packages.activatePackage('deprecation-cop')
expect(atom.workspace.getActivePa... | DeprecationCopView = require '../lib/deprecation-cop-view'
describe "DeprecationCop", ->
[activationPromise, workspaceElement] = []
beforeEach ->
workspaceElement = atom.views.getView(atom.workspace)
activationPromise = atom.packages.activatePackage('deprecation-cop')
expect(atom.workspace.getActivePa... | Make tests run with promise and non-promise package deactivate | Make tests run with promise and non-promise package deactivate
| CoffeeScript | mit | atom/deprecation-cop |
f441fcdcca1638796c96beb03dc437c21dc04e4c | desktop/test/models/artwork_inquiry.coffee | desktop/test/models/artwork_inquiry.coffee | sinon = require 'sinon'
Backbone = require 'backbone'
ArtworkInquiry = require '../../models/artwork_inquiry'
describe 'ArtworkInquiry', ->
beforeEach ->
@inquiry = new ArtworkInquiry
describe '#send', ->
beforeEach ->
sinon.stub Backbone, 'sync'
.yieldsTo 'success'
.returns Promise.... | sinon = require 'sinon'
Backbone = require 'backbone'
ArtworkInquiry = require '../../models/artwork_inquiry'
describe 'ArtworkInquiry', ->
beforeEach ->
@inquiry = new ArtworkInquiry
describe '#send', ->
beforeEach ->
sinon.stub Backbone, 'sync'
.yieldsTo 'success'
.returns Promise.... | Refactor inquiry test using spies to be slightly more readable. | Refactor inquiry test using spies to be slightly more readable.
| CoffeeScript | mit | oxaudo/force,kanaabe/force,artsy/force,eessex/force,xtina-starr/force,joeyAghion/force,erikdstock/force,yuki24/force,izakp/force,oxaudo/force,eessex/force,erikdstock/force,yuki24/force,joeyAghion/force,joeyAghion/force,mzikherman/force,cavvia/force-1,izakp/force,kanaabe/force,izakp/force,anandaroop/force,erikdstock/for... |
05749498b35982e0543dd823d6f29548068c42b5 | src/view.coffee | src/view.coffee | observe = require './observe'
prototype =
autoRender: true
initialize: (object) ->
if object.constructor.name == 'Object' and @Model?
@model = new @Model object
else
@model = object
observe @model, @bindings, @
if @autoRender
@render object
cacheTemplate: ->
# Cache on p... | observe = require './observe'
prototype =
autoRender: true
initialize: (object) ->
if object.constructor.name == 'Object' and @Model?
@model = new @Model object
else
@model = object
observe @model, @bindings, @
if @autoRender
@render object
cacheTemplate: (el) ->
# Cache... | Make it easy to disable caching. | Make it easy to disable caching.
| CoffeeScript | mit | zeekay/mvstar |
76f683d98962dad1e0024de99c37c08cae654ccf | lib/minimap-highlight-selected-view.coffee | lib/minimap-highlight-selected-view.coffee | {View, EditorView} = require 'atom'
module.exports = ->
highlightSelectedPackage = atom.packages.getLoadedPackage('highlight-selected')
minimapPackage = atom.packages.getLoadedPackage('minimap')
minimap = require (minimapPackage.path)
highlightSelected = require (highlightSelectedPackage.path)
HighlightedAr... | {View} = require 'atom'
module.exports = ->
highlightSelectedPackage = atom.packages.getLoadedPackage('highlight-selected')
minimapPackage = atom.packages.getLoadedPackage('minimap')
minimap = require (minimapPackage.path)
highlightSelected = require (highlightSelectedPackage.path)
HighlightedAreaView = req... | Add compatibility for upcoming react support in minimap | Add compatibility for upcoming react support in minimap
| CoffeeScript | mit | atom-minimap/minimap-highlight-selected |
504a260f66d1ef8e41a6f5e423434acb43778159 | core/app/backbone/views/facts/recently_viewed_facts.coffee | core/app/backbone/views/facts/recently_viewed_facts.coffee | class RecentlyViewedFactView extends Backbone.Marionette.ItemView
tagName: 'li'
template: 'facts/recently_viewed_fact'
templateHelpers: =>
evidence_type: @options.evidence_type
triggers:
'click button': 'click'
ui:
factWheel: '.js-fact-wheel'
onRender: ->
@ui.factWheel.html @wheelView().... | class RecentlyViewedFactView extends Backbone.Marionette.ItemView
tagName: 'li'
template: 'facts/recently_viewed_fact'
templateHelpers: =>
evidence_type: @options.evidence_type
triggers:
'click button': 'click'
ui:
factWheel: '.js-fact-wheel'
onRender: ->
@ui.factWheel.html @wheelView().... | Make the fact wheel in recently viewed facts responding to the mouse for now. | Make the fact wheel in recently viewed facts responding to the mouse for now.
| CoffeeScript | mit | Factlink/factlink-core,daukantas/factlink-core,daukantas/factlink-core,Factlink/factlink-core,daukantas/factlink-core,Factlink/factlink-core,daukantas/factlink-core,Factlink/factlink-core |
e3b48ee0f6840976a3d2eb2f99b7c1dfb852a715 | src/components/WebService/CouchDB/SaveObject.coffee | src/components/WebService/CouchDB/SaveObject.coffee | noflo = require "noflo"
couch = require "couch-client"
class SaveObject extends noflo.Component
constructor: ->
@request = null
@database = "default"
@connection = null
@data = []
@inPorts =
in: new noflo.Port()
database: new noflo.Port()
... | noflo = require "noflo"
couch = require "couch-client"
class SaveObject extends noflo.Component
constructor: ->
@request = null
@database = "default"
@connection = null
@data = []
@inPorts =
in: new noflo.ArrayPort()
database: new noflo.Port()
... | Allow multiple IN sources for saving | Allow multiple IN sources for saving
| CoffeeScript | mit | noflo/noflo,trustmaster/noflo,npmcomponent/noflo-noflo,lxfschr/noflo,trustmaster/noflo,jonnor/noflo,lxfschr/noflo,jonnor/noflo,saurabhsood91/noflo,saurabhsood91/noflo |
a0731d5cfc7a80a2750dff7b1f3b56d4b04699ef | app/models/Event.coffee | app/models/Event.coffee | Entity = require 'models/Entity'
mediator = require 'mediator'
module.exports = class Event extends Entity
mediator.factory['Event'] = this
constructor: (x, y, width, height, owningLevel, settings) ->
# settings.physicsType = 'static'
# settings.isSensor = true
super x, y, width, height, ownin... | Entity = require 'models/Entity'
mediator = require 'mediator'
module.exports = class Event extends Entity
mediator.factory['Event'] = this
constructor: (x, y, width, height, owningLevel, settings) ->
# settings.physicsType = 'static'
# settings.isSensor = true
super x, y, width, height, ownin... | Update event to use new SoundManager.stopAll(config) | Update event to use new SoundManager.stopAll(config) | CoffeeScript | apache-2.0 | despairblue/shiny-wight |
7239ed416e8f622c2b61c63b58af20a121cb217e | app/assets/javascripts/lights.coffee | app/assets/javascripts/lights.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/
$ ->
$('.update').on 'input', (event) ->
console.log event
$(this).parent().find('.update').val(this.va... | # 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/
$ ->
$('.update').on 'input', (event) ->
console.log event
$(this).parent().find('.update').val(this.va... | Add logic that toggles the selection when the button is pressed | Add logic that toggles the selection when the button is pressed
| CoffeeScript | mit | cthit/HueIT-Rails,cthit/HueIT-Rails,cthit/HueIT-Rails,cthit/HueIT-Rails |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.