commit stringlengths 40 40 | old_file stringlengths 4 264 | new_file stringlengths 4 264 | old_contents stringlengths 0 4.24k | new_contents stringlengths 1 5.44k | subject stringlengths 14 778 | message stringlengths 15 9.92k | lang stringclasses 277
values | license stringclasses 13
values | repos stringlengths 5 127k |
|---|---|---|---|---|---|---|---|---|---|
6335fc5da19131e0f7ef975c4c7301645f8712d1 | coffee/application.coffee | coffee/application.coffee | $ ->
$body = $('body')
$('#container2')
.on 'mouseenter', '.box', (e)->
$(this).addClass 'hover'
$body.addClass 'box_hover'
.on 'mouseleave', '.box', (e)->
$(this).removeClass 'hover'
$body.removeClass 'box_hover'
| $ ->
$body = $('body')
$body.on 'mouseenter', '.box', (e)->
$(this).addClass 'hover'
$body.addClass 'box_hover'
$body.on 'mouseleave', '.box', (e)->
$(this).removeClass 'hover'
$body.removeClass 'box_hover'
| Update jQuery selectors to be compatible with ember | Update jQuery selectors to be compatible with ember
| CoffeeScript | mit | billtrik/fluid_layout |
a0c99574ba7ef15cbd1293c383c5de0ad0250596 | app/assets/javascripts/pagination.coffee | app/assets/javascripts/pagination.coffee | jQuery ->
if $('#pagination').size() > 0
$('#pagination').hide()
loading_posts = false
$('#load-more-btn').show().click ->
unless loading_posts
loading_posts = true
more_posts_url = $('#pagination .pagination .next a').attr('href')
$this = $(this)
$this.html('<i clas... | jQuery ->
if $('#pagination').length > 0
$('#pagination').hide()
loading_posts = false
$('#load-more-btn').show().click ->
unless loading_posts
loading_posts = true
more_posts_url = $('#pagination .pagination .next a').attr('href')
$this = $(this)
$this.html('<i clas... | Fix usage of deprecated size() method | Fix usage of deprecated size() method
| CoffeeScript | agpl-3.0 | Retrospring/retrospring,Retrospring/retrospring,Retrospring/retrospring,Retrospring/retrospring,Retrospring/retrospring |
9c19cae89e8adad8270bad2d51892e7e20b110cf | app/scripts/client/webgl/renderer.coffee | app/scripts/client/webgl/renderer.coffee |
THREE = require 'three'
IsometricCamera = require './isometric_camera.coffee'
class Renderer
constructor: ->
window.THREE = THREE
rad = 0.0174532925
@scene = new THREE.Scene
@renderer = new THREE.WebGLRenderer {
alpha: true
}
@renderer.setSize window.innerWidth, window.innerHeight
@renderer.se... |
THREE = require 'three'
IsometricCamera = require './isometric_camera.coffee'
class Renderer
constructor: ->
window.THREE = THREE
rad = 0.0174532925
@scene = new THREE.Scene
@renderer = new THREE.WebGLRenderer {
alpha: true
}
@renderer.setSize window.innerWidth, window.innerHeight
@renderer.se... | Use directional light for sun instead of point light. | Use directional light for sun instead of point light.
| CoffeeScript | mit | mralex/minicity |
1cb001877353379ad734ada62f8676e359003031 | index.coffee | index.coffee | {CompositeDisposable} = require 'atom'
buildProject = require './lib/build-project'
openLatestRptFile = require './lib/open-latest-rpt-file'
module.exports =
subscriptions: null
config:
buildDevScript:
title: "Development Build Script",
description: "Location of the Development Build Script (requ... | {CompositeDisposable} = require 'atom'
buildProject = require './lib/build-project'
openLatestRptFile = require './lib/open-latest-rpt-file'
module.exports =
subscriptions: null
config:
buildDevScript:
title: "Development Build Script",
description: "Location of the Development Build Script (requ... | Fix Open Latest RPT File command - Atom 1.7.0 compatibility | Fix Open Latest RPT File command - Atom 1.7.0 compatibility
| CoffeeScript | mit | acemod/language-arma-atom,acemod/language-arma-atom |
ebcad2f437021eb2ee054dd59ced1e27eacb8869 | index.coffee | index.coffee | yaml = require('js-yaml')
argv = require('optimist').argv
books = require './books.yml'
retrieve = require('./src/retrieve')
do ->
console.log "Using books.yml with #{books.books.length} ISBNs"
r = retrieve(books.books)
if argv.table
output = require('./src/tableOutput')
output r
out = argv.o or ar... | optimist = require('optimist')
.usage('Amazon Trade In Price Check')
.alias('o', 'out')
.describe('o', 'Write data to JSON file. Usage: "-o data.json"')
.alias('t', 'table')
.describe('t', 'Output results as CLI table')
argv = optimist.argv
yaml = require('js-yaml')
books = require('./books.yml')
retrieve... | Add CLI Help, More Lazy Data Retrieval | Add CLI Help, More Lazy Data Retrieval | CoffeeScript | mit | killercup/atric |
87d3ecc110d0d2f8e5bb0f7fe98f8fbd634d642b | scripts/views/workspace/sidebar/toc.coffee | scripts/views/workspace/sidebar/toc.coffee | define [
'jquery'
'underscore'
'backbone'
'marionette'
'cs!collections/content'
'cs!views/workspace/sidebar/toc-branch'
'hbs!templates/workspace/sidebar/toc'
], ($, _, Backbone, Marionette, content, TocBranchView, tocTemplate) ->
return Marionette.CompositeView.extend
template: tocTemplate
item... | define [
'jquery'
'underscore'
'backbone'
'marionette'
'cs!collections/content'
'cs!views/workspace/sidebar/toc-branch'
'hbs!templates/workspace/sidebar/toc'
], ($, _, Backbone, Marionette, content, TocBranchView, tocTemplate) ->
return Marionette.CompositeView.extend
template: tocTemplate
item... | Update view when title changes | Update view when title changes
| CoffeeScript | agpl-3.0 | oerpub/bookish,oerpub/github-bookeditor,oerpub/github-bookeditor,oerpub/github-bookeditor,oerpub/bookish |
98892425bbc680b8cdba152a4890f220623caa45 | assets/scripts/app/routes/main.coffee | assets/scripts/app/routes/main.coffee | require 'routes/route'
TravisRoute = Travis.Route
Route = TravisRoute.extend
renderTemplate: ->
$('body').attr('id', 'home')
@_super.apply this, arguments
@render 'repos', outlet: 'left', into: 'main'
setupController: (controller)->
# TODO: this is redundant with repositories and recent route... | require 'routes/route'
TravisRoute = Travis.Route
config = ENV.config
Route = TravisRoute.extend
renderTemplate: ->
$('body').attr('id', 'home')
@_super.apply this, arguments
@render 'repos', outlet: 'left', into: 'main'
setupController: (controller)->
# TODO: this is redundant with repositor... | Use ENV.config instead of injected config | Use ENV.config instead of injected config
| CoffeeScript | mit | jlrigau/travis-web,jlrigau/travis-web,fauxton/travis-web,travis-ci/travis-web,Tiger66639/travis-web,fauxton/travis-web,2947721120/travis-web,2947721120/travis-web,mjlambert/travis-web,travis-ci/travis-web,travis-ci/travis-web,fauxton/travis-web,jlrigau/travis-web,travis-ci/travis-web,mjlambert/travis-web,fotinakis/trav... |
7c77ca1232da142f14e1a1d2097b7900ce320c86 | src/scripts/models/search-results.coffee | src/scripts/models/search-results.coffee | define (require) ->
Backbone = require('backbone')
settings = require('cs!settings')
SEARCH_URI = "#{location.protocol}//#{settings.cnxarchive.host}:#{settings.cnxarchive.port}/search"
return class SearchResults extends Backbone.Model
url: () -> "#{SEARCH_URI}#{@query}"
defaults:
query:
... | define (require) ->
Backbone = require('backbone')
settings = require('cs!settings')
SEARCH_URI = "#{location.protocol}//#{settings.cnxarchive.host}:#{settings.cnxarchive.port}/search"
return class SearchResults extends Backbone.Model
url: () -> "#{SEARCH_URI}#{@query}"
defaults:
query:
... | Convert authors in results.items to author objects | Convert authors in results.items to author objects
| CoffeeScript | agpl-3.0 | katalysteducation/webview,dak/webview,katalysteducation/webview,dak/webview,Connexions/webview,Connexions/webview,Connexions/webview,katalysteducation/webview,katalysteducation/webview,Connexions/webview,dak/webview,carolinelane10/webview |
2eeda675741dab286425dcada337e31e081f2c52 | lib/main.coffee | lib/main.coffee | path = require 'path'
_ = require 'underscore-plus'
ImageEditor = require './image-editor'
module.exports =
activate: ->
atom.workspace.registerOpener(openUri)
atom.packages.once('activated', createImageStatusView)
deactivate: ->
atom.workspace.unregisterOpener(openUri)
createImageStatusView = ->
{... | path = require 'path'
_ = require 'underscore-plus'
ImageEditor = require './image-editor'
module.exports =
activate: ->
atom.workspace.registerOpener(openUri)
atom.packages.once('activated', createImageStatusView)
deactivate: ->
atom.workspace.unregisterOpener(openUri)
createImageStatusView = ->
{... | Add .webp to image extensions | Add .webp to image extensions
| CoffeeScript | mit | atom/image-view |
1d515d7185be7c8cff60d56ebeed2624ddf18df3 | lib/main.coffee | lib/main.coffee | IncompatiblePackagesView = null
viewUri = 'atom://incompatible-packages'
createView = (state) ->
IncompatiblePackagesView ?= require './incompatible-packages-view'
new IncompatiblePackagesView(state)
atom.deserializers.add
name: 'IncompatiblePackagesView'
deserialize: (state) -> createView(state)
incompatibl... | IncompatiblePackagesView = null
viewUri = 'atom://incompatible-packages'
createView = (state) ->
IncompatiblePackagesView ?= require './incompatible-packages-view'
new IncompatiblePackagesView(state)
atom.deserializers.add
name: 'IncompatiblePackagesView'
deserialize: (state) -> createView(state)
incompatibl... | Access status bar via element | Access status bar via element
| CoffeeScript | mit | atom/incompatible-packages |
bc09c4e7e07cb8be14804ea8462e621a38f1c650 | client/components/Material.coffee | client/components/Material.coffee | React = require('react')
import Problem from './Problem'
import Level from './Level'
import Contest from './Contest'
Page = (props) ->
<div dangerouslySetInnerHTML={{__html: props.material.content}}>
</div>
MaterialProper = (props) ->
if props.material.type == 'page'
`<Page {...props} />`
els... | React = require('react')
import Problem from './Problem'
import Level from './Level'
import Contest from './Contest'
Page = (props) ->
<div dangerouslySetInnerHTML={{__html: props.material.content}}>
</div>
MaterialProper = (props) ->
if props.material?.type == 'page'
`<Page {...props} />`
el... | Fix material with unknown type | Fix material with unknown type
| CoffeeScript | agpl-3.0 | petr-kalinin/algoprog,petr-kalinin/algoprog,petr-kalinin/algoprog,petr-kalinin/algoprog |
80de75268cc96ece83f4f1c65856080c5953f735 | lib/operators/indent-operators.coffee | lib/operators/indent-operators.coffee | {Operator} = require './general-operators'
#
# It indents everything selected by the following motion.
#
class Indent extends Operator
# Public: Indents the text selected by the given motion.
#
# count - The number of times to execute.
#
# Returns nothing.
execute: (count=1) ->
@indent(count)
# Prote... | {Operator} = require './general-operators'
class AdjustIndentation extends Operator
execute: (count=1) ->
mode = @vimState.mode
@motion.select(count)
{start} = @editor.getSelectedBufferRange()
@indent()
if mode isnt 'visual'
@editor.setCursorBufferPosition([start.row, 0])
@editor.mo... | Fix screen-row vs buffer-row error in indent operators | Fix screen-row vs buffer-row error in indent operators
| CoffeeScript | mit | bronson/vim-mode-next,naorunaoru/vim-mode-next |
1d9066bb7054cfe7deeac57e21489062230fcc58 | lib/selection-handle-component.coffee | lib/selection-handle-component.coffee | React = require 'react-atom-fork'
{div} = require 'reactionary-atom-fork'
module.exports = React.createClass
render: ->
{parentView} = @props
{top, left, width, height} = parentView.selectionScrollRect()
div className: 'selection-box-handle', style: {
top: (top + height) + 'px'
left: (left ... | React = require 'react-atom-fork'
{div} = require 'reactionary-atom-fork'
module.exports = React.createClass
render: ->
{parentView} = @props
{top, left, width, height} = parentView.selectionScrollRect()
div className: 'selection-box-handle', style: {
top: (top + height) + 'px'
left: width ... | Fix selection handle position when start column is not 0 | :bug: Fix selection handle position when start column is not 0
| CoffeeScript | mit | abe33/atom-tablr |
662fcd0c429d3c71f0b508612fdf3fddc870bd83 | bokehjs/gulp/tasks/default.coffee | bokehjs/gulp/tasks/default.coffee | # default - message + brief help
gulp = require "gulp"
runSequence = require "run-sequence"
gulp.task "default", (cb) ->
console.log('Building BokehJS for developer mode ...')
runSequence("build", "install", "watch", cb)
| # default - message + brief help
gulp = require "gulp"
gutil = require "gulp-util"
runSequence = require "run-sequence"
gulp.task "default", (cb) ->
gutil.log('Building BokehJS for developer mode ...')
runSequence("build", "install", "watch", cb)
| Switch to using gutil for proper formatting | Switch to using gutil for proper formatting
| CoffeeScript | bsd-3-clause | carlvlewis/bokeh,rothnic/bokeh,Karel-van-de-Plassche/bokeh,rothnic/bokeh,jplourenco/bokeh,xguse/bokeh,stuart-knock/bokeh,rs2/bokeh,philippjfr/bokeh,ptitjano/bokeh,lukebarnard1/bokeh,xguse/bokeh,deeplook/bokeh,akloster/bokeh,clairetang6/bokeh,rs2/bokeh,justacec/bokeh,rs2/bokeh,bokeh/bokeh,timsnyder/bokeh,timsnyder/bokeh... |
0548fdb003f9f0c4ad96f1e8cabccd89b473aa39 | menus/git-plus.cson | menus/git-plus.cson | # See https://atom.io/docs/latest/creating-a-package#menus for more details
'context-menu':
'.overlayer':
'Git add file': 'git-plus:add'
'menu': [
{
'label': 'Packages'
'submenu': [
'label': 'Git Plus'
'submenu': [
{ 'label': 'Add', 'command': 'git-plus:add' }
{ 'label': 'Ad... | # See https://atom.io/docs/latest/creating-a-package#menus for more details
'context-menu':
'atom-text-editor': [
{
'label': 'Git add file',
'command': 'git-plus:add'
}
]
'menu': [
{
'label': 'Packages'
'submenu': [
'label': 'Git Plus'
'submenu': [
{ 'label': 'Add'... | Fix for deprecation of context menu | Fix for deprecation of context menu | CoffeeScript | mit | akonwi/git-plus,akonwi/git-plus |
295663765063c6f697756a50fa52b84d23aec6c5 | lib/providers/coffee-provider.coffee | lib/providers/coffee-provider.coffee | configManager = require '../config-manager'
resolve = require 'resolve'
path = require 'path'
getCompiler = (editor) ->
filepath = editor.getPath()
coffee = if filepath then maybeGetLocalCoffeescript(filepath)
if coffee? then return coffee
coffeescriptVersion = configManager.get('coffeescriptV... | configManager = require '../config-manager'
resolve = require 'resolve'
path = require 'path'
getCompiler = (editor) ->
filepath = editor.getPath()
coffee = if filepath then maybeGetLocalCoffeescript(filepath)
if coffee? then return coffee
coffeescriptVersion = configManager.get('coffeescriptV... | Add support for CS@2 when looking up local CS | Add support for CS@2 when looking up local CS
| CoffeeScript | mit | adrianlee44/atom-coffee-compile |
68e066cb1aadf09f0088a568386948d6cd54a1a7 | src/flux/course-listing.coffee | src/flux/course-listing.coffee | # coffeelint: disable=no_empty_functions
_ = require 'underscore'
flux = require 'flux-react'
{CourseActions, CourseStore} = require './course'
LOADING = 'loading'
LOADED = 'loaded'
FAILED = 'failed'
CourseListingActions = flux.createActions [
'load'
'loaded'
'reset'
'FAILED'
]
CourseListingStore = flux.c... | # coffeelint: disable=no_empty_functions
_ = require 'underscore'
flux = require 'flux-react'
{CourseActions, CourseStore} = require './course'
LOADING = 'loading'
LOADED = 'loaded'
FAILED = 'failed'
CourseListingActions = flux.createActions [
'load'
'loaded'
'reset'
'FAILED'
]
CourseListingStore = flux.c... | Use helper methods instead of reading asyncStatus | Use helper methods instead of reading asyncStatus
| CoffeeScript | agpl-3.0 | openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js |
dba1962414b8e35df20d3fa91f4cf4f5a4d9504b | test/mailers/mailerTest.coffee | test/mailers/mailerTest.coffee | mailer = null
describe "Salad.Mailer", ->
before ->
mailer = new App.WelcomeMailer
describe "#render", ->
it "should render templates", ->
content = mailer.render "rendering/test"
content.should.equal "<h1>Hello World!</h1>"
describe "#mail", ->
todo = null
beforeEach (done) ->
... | mailer = null
describe "Salad.Mailer", ->
before ->
mailer = new App.WelcomeMailer
describe "#render", ->
it "should render templates", ->
content = mailer.render "rendering/test"
content.should.equal "<h1>Hello World!</h1>"
describe "#mail", ->
todo = null
beforeEach (done) ->
... | Revert "Fix test according to changes in smtp mailer." | Revert "Fix test according to changes in smtp mailer."
This reverts commit dbccc525c2b0302d4d111b6f45063d39a5f0c63e.
| CoffeeScript | mit | komola/salad |
11b6385c7c6542fe445bc29d0a464cae3967950f | src/resources-packaged/ops/javascript/orbeon/xforms/server/AjaxServer/nextAjaxResponse.coffee | src/resources-packaged/ops/javascript/orbeon/xforms/server/AjaxServer/nextAjaxResponse.coffee | AS = ORBEON.xforms.server.AjaxServer
Document = ORBEON.xforms.Document
Events = ORBEON.xforms.Events
# Returns a deferred object that gets resolved when the next Ajax response arrives
AS.nextAjaxResponse = (formId) ->
deferred = $.Deferred()
seqNo = -> parseInt Document.getFromClientState formId, 'sequence'
... | AS = -> ORBEON.xforms.server.AjaxServer
Document = -> ORBEON.xforms.Document
Events = -> ORBEON.xforms.Events
# Returns a deferred object that gets resolved when the next Ajax response arrives
AS().nextAjaxResponse = (formId) ->
deferred = $.Deferred()
seqNo = -> parseInt Document().getFromClientState ... | Use late binding to break circular dependency | Use late binding to break circular dependency
| CoffeeScript | lgpl-2.1 | ajw625/orbeon-forms,brunobuzzi/orbeon-forms,brunobuzzi/orbeon-forms,ajw625/orbeon-forms,tanbo800/orbeon-forms,orbeon/orbeon-forms,martinluther/orbeon-forms,evlist/orbeon-forms,martinluther/orbeon-forms,ajw625/orbeon-forms,orbeon/orbeon-forms,joansmith/orbeon-forms,joansmith/orbeon-forms,tanbo800/orbeon-forms,ajw625/orb... |
e8821ed23d32edd2d88417cc62e7d43e7a91c46e | src/coffee/storylet.coffee | src/coffee/storylet.coffee | class Storylet
constructor: (@id, @title, @text, @choices) ->
Object.freeze @
angular.module 'qbn.storylet', ['qbn.state']
.factory 'storylets', (makeGameState) ->
library = {}
api =
register: (args...) ->
storylet = new Storylet args...
library[storylet.id] = storylet # Storylets... | class Storylet
constructor: (@id, @title, @text, @choices) ->
Object.freeze @
angular.module 'qbn.storylet', ['qbn.state']
.factory 'storylets', (makeGameState) ->
library = {}
api =
register: (args...) ->
storylet = new Storylet args...
library[storylet.id] = storylet # Storylets... | Fix Crash in Storylet Resolution | Fix Crash in Storylet Resolution
| CoffeeScript | unlicense | arashikou/exper3-2015 |
ddc7ee01b357512bcd169c75f5d30be7366d06ad | lib/date_support.coffee | lib/date_support.coffee | # Miscellanious date support code.
class DateSupport
@stripSeconds: (date) ->
date.setSeconds 0
date
module.exports = DateSupport
| # Miscellanious date support code.
class DateSupport
@stripSeconds: (date) ->
date.setSeconds 0
date.setMilliseconds 0
date
module.exports = DateSupport
| Reset milliseconds as well when resetting seconds | Reset milliseconds as well when resetting seconds
| CoffeeScript | apache-2.0 | binarymarbles/sherlock |
306f844d1094a976e03e7580e0de590c9d0cdd29 | src/reporter.coffee | src/reporter.coffee | define [
'settings'
'promise'
'helpers/browser_helper'
'helpers/url_helper'
], (Settings, Promise, BrowserHelper, URLHelper)->
unique_id = 1
class Reporter
constructor: (options)->
@base = Settings.url.base
@queue = []
@transport = 'img'
@_determineTransport().then @_enableProp... | define [
'settings'
'promise'
'helpers/browser_helper'
'helpers/url_helper'
], (Settings, Promise, BrowserHelper, URLHelper)->
unique_id = 1
class Reporter
constructor: (options)->
@base = Settings.url.base
@queue = []
@transport = 'img'
@_determineTransport().then @_enableProp... | Fix bug with missing fat arrow | Fix bug with missing fat arrow
| CoffeeScript | mit | skroutz/analytics.js,skroutz/analytics.js,skroutz/analytics.js |
d005a96ae2941063ab95ecb8d4716d0efa7930f4 | src/beautifiers/typescript-formatter.coffee | src/beautifiers/typescript-formatter.coffee | "use strict"
Beautifier = require('./beautifier')
module.exports = class TypeScriptFormatter extends Beautifier
name: "TypeScript Formatter"
options: {
TypeScript: true
}
beautify: (text, language, options) ->
return new @Promise((resolve, reject) =>
try
format = require("typescript-for... | "use strict"
Beautifier = require('./beautifier')
module.exports = class TypeScriptFormatter extends Beautifier
name: "TypeScript Formatter"
options: {
TypeScript: true
}
beautify: (text, language, options) ->
return new @Promise((resolve, reject) =>
try
format = require("typescript-for... | Fix incorrent enforcement of tabs to spaces conversion in typescript | Fix incorrent enforcement of tabs to spaces conversion in typescript | CoffeeScript | mit | Glavin001/atom-beautify,Glavin001/atom-beautify,prettydiff/atom-beautify,dvingo/atom-beautify,dvingo/atom-beautify,dvingo/atom-beautify,dvingo/atom-beautify,Glavin001/atom-beautify,prettydiff/atom-beautify,dvingo/atom-beautify,prettydiff/atom-beautify,prettydiff/atom-beautify,Glavin001/atom-beautify,Glavin001/atom-beau... |
2e3010b693cd5e0d8a0600861eb6b788c13b4361 | src/coffee/controllers/history-step.coffee | src/coffee/controllers/history-step.coffee | define ['lodash'], (L) -> Array '$scope', '$log', '$modal', (scope, log, modalFactory) ->
InputEditCtrl = Array '$scope', '$modalInstance', 'history', 'step', (scope, modal, history, step, index) ->
scope.data = L.clone step.data
delete scope.data.service # Not editable
scope.ok = -> modal.close histor... | define ['lodash'], (L) -> Array '$scope', '$log', '$modal', (scope, log, modalFactory) ->
InputEditCtrl = Array '$scope', '$modalInstance', 'history', 'step', (scope, modal, history, step, index) ->
scope.data = L.clone step.data, true
delete scope.data.service # Not editable
scope.ok = ->
modal.... | Rollback any data changes on cancel. | Rollback any data changes on cancel.
| CoffeeScript | bsd-2-clause | yochannah/staircase,yochannah/staircase,joshkh/staircase,joshkh/staircase,yochannah/staircase,joshkh/staircase |
8893b99cd3fb2b67f43764ae6adbc3d43645fb87 | src/coffee/cilantro/ui/workflows/query.coffee | src/coffee/cilantro/ui/workflows/query.coffee | define [
'underscore'
'marionette'
'../core'
'../base'
'../concept'
'../context'
'tpl!templates/workflows/query.html'
], (_, Marionette, c, base, concept, context, templates...) ->
templates = _.object ['query'], templates
class QueryWorkflow extends Marionette.Layout
clas... | define [
'underscore'
'marionette'
'../core'
'../base'
'../concept'
'../context'
'tpl!templates/workflows/query.html'
], (_, Marionette, c, base, concept, context, templates...) ->
templates = _.object ['query'], templates
###
The QueryWorkflow provides an interface for navigat... | Remove assumption and reference of global data | Remove assumption and reference of global data
QueryWorkflow now takes the data as passed options on construction. These
include:
- `concepts`: a collection concepts that are deemed queryable
- `context`: a context model which is commonly the currently "active"
one for the session.
| CoffeeScript | bsd-2-clause | chop-dbhi/cilantro,chop-dbhi/cilantro,chop-dbhi/cilantro |
6e18c9210ff66e012160bdbba92ef4f3e5c65acc | app/assets/javascripts/application.js.coffee | app/assets/javascripts/application.js.coffee | #= require jquery
#= require jquery_ujs
#= require turbolinks
#= require bootstrap
#= require_tree .
$(->
$('#job_date_type').change(->
switch $(@).val()
when 'agreement', ''
$('.job_start_date').slideUp()
$('.job_end_date').slideUp()
when 'date'
$('.job_start_date').slideDown... | #= require jquery
#= require jquery_ujs
#= require turbolinks
#= require bootstrap
#= require_tree .
ready = ->
$('#job_date_type').change(->
switch $(@).val()
when 'agreement', ''
$('.job_start_date').slideUp()
$('.job_end_date').slideUp()
when 'date'
$('.job_start_date').sli... | Fix document ready with TurboLinks. | Fix document ready with TurboLinks.
| CoffeeScript | agpl-3.0 | smalljobs/smalljobs,smalljobs/smalljobs,smalljobs/smalljobs,smalljobs/smalljobs |
bd8d6bd5adb2521cf7b81cce6e6b9a0f4885a0d9 | app/assets/javascripts/pages/worktimes.coffee | app/assets/javascripts/pages/worktimes.coffee | 'use strict'
TimeTracker.WorkTimes =
setDestroyCallback: ->
$('.worktime-page #day-records').on 'ajax:success', '.day-row a.destroy', (event, data, status, xhr) ->
$(event.target).parent().fadeOut 'fast', ->
$(this).remove()
init: ->
do @setDestroyCallback
$ ->
do TimeTracker.WorkTimes.ini... | 'use strict'
TimeTracker.WorkTimes =
setDestroyCallback: ->
$('.worktime-page #day-records').on 'ajax:success', '.day-row a.destroy', (event, data, status, xhr) ->
$(event.target).parent().parent().fadeOut 'fast', ->
$(this).remove()
init: ->
do @setDestroyCallback
$ ->
do TimeTracker.Work... | Fix worktime removing from page after destroying | Fix worktime removing from page after destroying
| CoffeeScript | mit | vano468/timetracker,vano468/timetracker |
746d5853f69782d35d9a53feed8036afbc67b4db | lib/execute-as-ruby.coffee | lib/execute-as-ruby.coffee | {BufferedProcess} = require 'atom'
module.exports =
activate: ->
atom.workspaceView.command "execute-as-ruby:execute", => @execute()
execute: ->
# This assumes the active pane item is an editor
editor = atom.workspace.activePaneItem
cursor = editor.getCursor()
selection = editor.getSelectedTex... | {BufferedProcess} = require 'atom'
module.exports =
activate: ->
atom.workspaceView.command "execute-as-ruby:execute", => @execute()
execute: ->
# This assumes the active pane item is an editor
editor = atom.workspace.activePaneItem
cursor = editor.getCursor()
selection = editor.getSelectedTex... | Tweak behavior when running lines or selections. | Tweak behavior when running lines or selections.
| CoffeeScript | mit | torsten/execute-as-ruby |
59fd5b41e847a6997947d5711b68a07773ec3a7e | src/ButtonLink.cjsx | src/ButtonLink.cjsx | React = require 'react'
Button = require 'react-bootstrap/Button'
RouteToMixin = require './RouteToMixin'
ADDITIONAL_RESERVED_PROPS =
key: true
ref: true
ButtonLink = React.createClass
displayName: 'ButtonLink'
mixins: [ RouteToMixin ]
additionalReservedProps: ADDITIONAL_RESERVED_PROPS
render: ->
@tra... | React = require 'react'
Button = require 'react-bootstrap/Button'
RouteToMixin = require './RouteToMixin'
assign = require 'react/lib/Object.assign'
if ! Object.assign
Object.assign = assign;
ADDITIONAL_RESERVED_PROPS =
key: true
ref: true
ButtonLink = React.createClass
displayName: 'ButtonLink'
mixins: [ ... | Add Object.assign from react if missing, transferPropsTo -> {...@props} | Add Object.assign from react if missing, transferPropsTo -> {...@props} | CoffeeScript | apache-2.0 | react-bootstrap/react-router-bootstrap |
6b31088fa1d800b9706bb926bc9a6123bf11ffcc | app/assets/javascripts/activities.js.coffee | app/assets/javascripts/activities.js.coffee | class @Activities
constructor: ->
Pager.init 20, true
$(".event-filter a").bind "click", (event) =>
event.preventDefault()
@toggleFilter($(event.currentTarget))
@reloadActivities()
reloadActivities: ->
$(".content_list").html ''
Pager.init 20, true
toggleFilter: (sender) ->
... | class @Activities
constructor: ->
Pager.init 20, true
$(".event-filter a").bind "click", (event) =>
event.preventDefault()
@toggleFilter($(event.currentTarget))
@reloadActivities()
reloadActivities: ->
$(".content_list").html ''
Pager.init 20, true
toggleFilter: (sender) ->
... | Use closest instead of parent() | Use closest instead of parent()
Signed-off-by: Dmitriy Zaporozhets <be23d75b156792e5acab51b196a2deb155d35d6a@gmail.com>
| CoffeeScript | mit | iiet/iiet-git,jirutka/gitlabhq,LUMC/gitlabhq,dwrensha/gitlabhq,ttasanen/gitlabhq,allysonbarros/gitlabhq,LUMC/gitlabhq,daiyu/gitlab-zh,duduribeiro/gitlabhq,jrjang/gitlabhq,duduribeiro/gitlabhq,larryli/gitlabhq,Soullivaneuh/gitlabhq,duduribeiro/gitlabhq,jirutka/gitlabhq,Datacom/gitlabhq,Datacom/gitlabhq,screenpages/gitla... |
dfba09a8543feb7d2fcb2ffff5e1d1fbfb7db1b4 | app/assets/javascripts/data-tables-init.coffee | app/assets/javascripts/data-tables-init.coffee | $(document).on "page:change", ->
$(".data-table").each ->
table = $(@)
return if $.fn.dataTable.isDataTable(table)
if table.hasClass("sort-asc")
table.DataTable
responsive: true
else
table.DataTable
responsive: true
order: [[ 0, "desc" ]]
| $(document).on "page:change", ->
$(".data-table").each ->
table = $(@)
return if $.fn.dataTable.isDataTable(table)
options =
responsive: true
unless table.hasClass("sort-asc")
options["order"] = [[ 0, "desc" ]]
if table.hasClass("no-pagination")
options["paging"] = false
... | Refactor dataTable init and add no pagination | Refactor dataTable init and add no pagination
| CoffeeScript | mit | on-site/StockAid,on-site/StockAid,on-site/StockAid |
cb12e069f0e89098a7b19d20f52f66e1aaa42313 | app/assets/javascripts/stanza_search.js.coffee | app/assets/javascripts/stanza_search.js.coffee | $ ->
saveTextSearchCondition = (selectTag) ->
cond =
selectedValue: selectTag.find(':selected').val()
query: $('input#q').val()
localStorage.setItem('textSearch', JSON.stringify(cond))
$('form').on "submit", (e) ->
e.preventDefault()
selectTag = $('select#category')
searchTarge... | $ ->
saveTextSearchCondition = ->
cond =
selectedValue: $('select#category').find(':selected').val()
query: $('input#q').val()
localStorage.setItem('textSearch', JSON.stringify(cond))
$('form').on "submit", (e) ->
e.preventDefault()
selectTag = $('select#category')
searchTarget... | Save text-search condition if location.search exists | Save text-search condition if location.search exists
テキスト検索で、レポートタイプ(Genes, Organisms...) で検索後、リンクからスタンザ一覧に遷移した場合も、
その時の画面を開けるようにするために、location.search を見て、検索条件を保持するようにした
| CoffeeScript | mit | togogenome/togogenome,togogenome/togogenome,togogenome/togogenome |
fa52708aff200d09f943a56cf879eb37e0ff1623 | Gruntfile.coffee | Gruntfile.coffee | module.exports = (grunt) ->
grunt.loadNpmTasks 'grunt-release'
grunt.loadNpmTasks 'grunt-exec'
grunt.loadNpmTasks 'grunt-gh-pages'
grunt.initConfig
release:
options:
bump: false
add: false
push: false
tagName: "v<%= version %>"
exec:
test:
command: "... | module.exports = (grunt) ->
grunt.loadNpmTasks 'grunt-release'
grunt.loadNpmTasks 'grunt-exec'
grunt.loadNpmTasks 'grunt-gh-pages'
grunt.initConfig
release:
options:
bump: false
add: false
push: false
tagName: "v<%= version %>"
exec:
test:
command: "... | Add default grunt task for testing | Add default grunt task for testing
| CoffeeScript | mit | atom/donna,paulcbetts/biscotto,paulcbetts/biscotto,gjtorikian/biscotto,atom/donna,gjtorikian/biscotto |
2875433a9c2d700e98fcee8d16300f0bc06d5f62 | app/assets/javascripts/divisions.js.coffee | app/assets/javascripts/divisions.js.coffee | # Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
$ ->
$('select#r').change(window.secondnav_goto)
$('select#r option').click(window.secondnav_goto)
$('... | # 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#r').change ->
window.location = $('select#r').val()
$('select#r2').change ->
wind... | Simplify event handling using jquery | Simplify event handling using jquery
| CoffeeScript | agpl-3.0 | mysociety/publicwhip,mysociety/publicwhip,mysociety/publicwhip |
8f654e17210189258536329c53330ef220d43ce3 | app/assets/javascripts/editor.js.coffee | app/assets/javascripts/editor.js.coffee |
#editor = ace.edit("editor")
#editor.getSession().setMode("ace/mode/markdown")
jQuery ->
jQuery('.editor').ace({ theme: 'github', lang: 'markdown', width: '100%', indent: 2 })
jQuery('.editor-meta select').change event, ->
ace = jQuery(event.srcElement)
.closest('.editor-container')
.find('.editor... |
#editor = ace.edit("editor")
#editor.getSession().setMode("ace/mode/markdown")
jQuery ->
jQuery('.editor').ace({ theme: 'github', lang: 'markdown', width: '100%', indent: 2 })
jQuery('.editor-meta select').change (event) ->
ace = jQuery(event.srcElement)
.closest('.editor-container')
.find('.edito... | Fix adding new gists in firefox | Fix adding new gists in firefox
No clue how Chrome was working, should have been broken.
| CoffeeScript | mit | csexton/corporate-tool,csexton/corporate-tool,csexton/corporate-tool,csexton/corporate-tool |
701ce9af3d44619120132938775fc8c510995b2a | src/scene/sceneView.coffee | src/scene/sceneView.coffee |
class SceneView
constructor: (@canvas) ->
@id = _.uniqueId 'view'
throw new Error "A Canvas is required" if not @canvas
@context = @canvas.getContext("2d")
throw new Error "Could not retrieve Canvas context" if not @context
@camera = new Rect(0,0,100,100)
render: (object) ->
|
class SceneView
constructor: (@canvas) ->
@id = _.uniqueId 'view'
throw new Error "A Canvas is required" if not @canvas
@context = @canvas.getContext("2d")
throw new Error "Could not retrieve Canvas context" if not @context
@context.webkitImageSmoothingEnabled = false
@context.mozImageSmoothi... | Add World/Screen coordinate conversion utilities to SceneView class. | Add World/Screen coordinate conversion utilities to SceneView class.
| CoffeeScript | apache-2.0 | justindujardin/pow2,justindujardin/pow2,justindujardin/pow2 |
b3c716e3eef75815f8dae0c126f858ecb7bb6125 | app/assets/javascripts/ui_components/sticky_header.coffee | app/assets/javascripts/ui_components/sticky_header.coffee | $ ->
margin_top = $('.navbar-fixed-top, .navbar-static-top').height()
$('table[data-toggle=sticky-header]').floatThead
useAbsolutePositioning: false
scrollingTop: margin_top
| $(document).on 'uic:domchange', ->
margin_top = $('.navbar-fixed-top, .navbar-static-top').height()
$('table[data-toggle=sticky-header]').floatThead
useAbsolutePositioning: false
scrollingTop: margin_top
| Use uic:domchange instead of document.ready | Use uic:domchange instead of document.ready
| CoffeeScript | mit | ad2games/ui_components,ad2games/ui_components,ad2games/ui_components |
3b5991fb49eefd8d4fdb73f1c9dffc8d7c815864 | coffee/controllers/posts_controller.coffee | coffee/controllers/posts_controller.coffee | define [
"chaplin"
"models/posts"
"views/posts"
], (Chaplin, Posts, PostsView) ->
"use strict"
class PostsController extends Chaplin.Controller
show: (params) ->
# Unescape matched parts of url.
# Why the hell chaplin doesn't do it by himself?
# XXX: Seems like what we should use encod... | define [
"chaplin"
"models/posts"
"views/posts"
], (Chaplin, Posts, PostsView) ->
"use strict"
class PostsController extends Chaplin.Controller
show: (params) ->
# Unescape matched parts of url.
# Why the hell chaplin doesn't do it by himself?
# XXX: Seems like what we should use encod... | Revert "Disable use_bl for /top request" | Revert "Disable use_bl for /top request"
This reverts commit 0751f501525a5afa424fbdd00f7780f8ade48fdf.
Fixed in the BnW API (added use_bl for today).
| CoffeeScript | cc0-1.0 | border-radius/meow-anon,Kagami/bnw-meow,border-radius/meow-anon |
2f665c6a7c025076f8f4f224bfd49f0c002e9532 | spec/line-jumper-spec.coffee | spec/line-jumper-spec.coffee | {WorkspaceView} = require 'atom'
LineJumper = require '../lib/line-jumper'
describe "LineJumper", ->
editor = null
beforeEach ->
atom.workspaceView = new WorkspaceView()
pack = atom.packages.activatePackage("line-jumper", immediate: true)
atom.workspaceView.openSync('sample.js')
editor = atom.work... | {WorkspaceView} = require 'atom'
LineJumper = require '../lib/line-jumper'
describe "LineJumper", ->
editor = null
beforeEach ->
atom.workspaceView = new WorkspaceView()
waitsForPromise ->
atom.packages.activatePackage("line-jumper")
atom.workspaceView.openSync('sample.js')
editor = atom.wo... | Update specs for core API changes | Update specs for core API changes
| CoffeeScript | mit | pomutemu/atom-half-pager,benogle/line-jumper |
a3eb8b4abd6e49424fabfa39b2aba164924f4942 | app/assets/javascripts/sprangular/static_content/services/page.coffee | app/assets/javascripts/sprangular/static_content/services/page.coffee | angular.module('Sprangular.StaticContent').service 'StaticContent', ($q, $http) ->
service =
findContent: (id) ->
$http.get "/api/pages/#{id}.json"
service
| angular.module('Sprangular.StaticContent').service 'StaticContent', ($q, $http) ->
service =
findContent: (id) ->
$http.get("/api/pages/#{id}.json")
.success (response) -> response.data
service
| Fix bug with returning wrong response in `findContent` | Fix bug with returning wrong response in `findContent`
| CoffeeScript | bsd-3-clause | sprangular/sprangular_static_content,sprangular/sprangular_static_content,sprangular/sprangular_static_content |
189489ec00d9e54ab770cf4f484b2481dd0bfcc1 | server/publications.coffee | server/publications.coffee | Meteor.publish 'projects', ->
Projects.find {members: this.userId}
Meteor.publish 'projectMessages', (projectId) ->
check projectId, String
# Find all messages for the current project which have our user as sender or recipient
Messages.find {$and: [{$or: [{recipients: {$in: [this.userId]}}, {sender: th... | Meteor.publish 'projects', ->
Projects.find {members: this.userId}
Meteor.publish 'projectMessages', (projectId) ->
check projectId, String
# Find all messages for the current project which have our user as sender or recipient
Messages.find({$and: [{$or: [{recipients: {$in: [this.userId]}}, {recipients... | Fix issue with message to 'all' | Fix issue with message to 'all'
| CoffeeScript | mit | mxipartners/mijnmxi,mxipartners/mijnmxi,mxipartners/mijnmxi |
c40bc81314ee65dffbcf8d7a62e48b4e702da1d1 | src/trix/observers/selection_observer.coffee | src/trix/observers/selection_observer.coffee | class Trix.SelectionObserver
events = ["DOMFocusIn", "DOMFocusOut", "mousedown", "keydown"]
constructor: (@element) ->
@element.addEventListener(event, @start) for event in events
@range = getRange()
start: =>
return if @running
@running = true
requestAnimationFrame(@tick)
stop: ->
de... | class Trix.SelectionObserver
events = ["DOMFocusIn", "DOMFocusOut", "mousedown", "keydown"]
constructor: (@element) ->
@element.addEventListener(event, @start) for event in events
@range = getRange()
start: =>
return if @running
@running = true
requestAnimationFrame(@tick)
stop: ->
de... | Improve detecting @element in the DOM | Improve detecting @element in the DOM
| CoffeeScript | mit | GabiGrin/trix,basecamp/trix,urossmolnik/trix,GabiGrin/trix,basecamp/trix,ChenMichael/trix,urossmolnik/trix,ChenMichael/trix,basecamp/trix,basecamp/trix,ChenMichael/trix,urossmolnik/trix,GabiGrin/trix |
bbb700cefb7bebdce2b8bcad116fe11075162581 | config/errors.coffee | config/errors.coffee | # Error handling setup
# See: http://www.artandlogic.com/blog/2014/05/error-handling-in-gulp/
gutil = require 'gulp-util'
fatalLevel = require('yargs').argv.fatal
ERROR_LEVELS = ['error', 'warning']
module.exports =
# Convenience handlers to be used in gulp .on('error', callback)
onError: (error) -> handleE... | # Error handling setup
# See: http://www.artandlogic.com/blog/2014/05/error-handling-in-gulp/
fatalLevel = require('yargs').argv.fatal
ERROR_LEVELS = ['error', 'warning']
module.exports =
# Convenience handlers to be used in gulp .on('error', callback)
onError: (error) -> handleError.call(this, 'error', error)
... | Remove unused gulp-util dependencies from error.coffee | Remove unused gulp-util dependencies from error.coffee
| CoffeeScript | mit | malcolmalex/angular-gulp-template |
ecaba10ec8e0c99cebfa42674ac7bb07e1410222 | src/components/student-dashboard/index.cjsx | src/components/student-dashboard/index.cjsx | React = require 'react'
{CourseStore} = require '../../flux/course'
{StudentDashboardStore, StudentDashboardActions} = require '../../flux/student-dashboard'
LoadableItem = require '../loadable-item'
isStepComplete = (step) -> step.is_completed
StudentDashboard = require './dashboard'
WindowHelpers = require '../../hel... | React = require 'react'
{CourseStore} = require '../../flux/course'
{StudentDashboardStore, StudentDashboardActions} = require '../../flux/student-dashboard'
LoadableItem = require '../loadable-item'
isStepComplete = (step) -> step.is_completed
StudentDashboard = require './dashboard'
WindowHelpers = require '../../hel... | Replace student dashboard redirect with delay page | Replace student dashboard redirect with delay page
| CoffeeScript | agpl-3.0 | openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js |
50718a7d1f580a003b33d7b726b06047ee5d5bd6 | src/trix/views/image_attachment_view.coffee | src/trix/views/image_attachment_view.coffee | #= require trix/views/attachment_view
#= require trix/utilities/dom
#= require trix/utilities/helpers
{defer} = Trix.Helpers
class Trix.ImageAttachmentView extends Trix.AttachmentView
render: ->
@image = document.createElement("img")
@image.setAttribute("contenteditable", false)
@image.setAttribute("dat... | #= require trix/views/attachment_view
#= require trix/utilities/dom
#= require trix/utilities/helpers
{defer} = Trix.Helpers
class Trix.ImageAttachmentView extends Trix.AttachmentView
render: ->
@image = document.createElement("img")
@image.setAttribute("data-trix-identifier", @attachmentPiece.getIdentifier... | Fix cursor issues around images | Fix cursor issues around images
| CoffeeScript | mit | ChenMichael/trix,urossmolnik/trix,urossmolnik/trix,urossmolnik/trix,basecamp/trix,basecamp/trix,basecamp/trix,GabiGrin/trix,ChenMichael/trix,ChenMichael/trix,GabiGrin/trix,GabiGrin/trix,basecamp/trix |
20f086f6ae10be8df911985460e97db733bb52de | src/coffee/refining.coffee | src/coffee/refining.coffee | #query = require("pg-query")
#oreList = query("select itemName from Ore order by itemName", (err, rows, result) ->
# alert rows )
#alert oreList
#alert "3333"
refiningTable = null
refineMe = []
#accepts optional array of values as 2nd parameter for parameterized queries
AddNewRefiningElement = ->
Quantity = pa... | #query = require("pg-query")
#oreList = query("select itemName from Ore order by itemName", (err, rows, result) ->
# alert rows )
#alert oreList
#alert "3333"
refiningTable = null
refineMe = []
#accepts optional array of values as 2nd parameter for parameterized queries
AddNewRefiningElement = ->
Quantity = pa... | Use existential operator to check if row was found | Use existential operator to check if row was found
| CoffeeScript | apache-2.0 | eve-apps/karma,eve-apps/karma |
ddc41ff7943f72645a2029685e25a7413855d4bd | src/framework/index.coffee | src/framework/index.coffee | # Installs/updates latest version of the Tâmia Stylus framework.
# Also installs jQuery.
# https://github.com/sapegin/tamia
'use strict'
fs = require 'fs'
util = require 'util'
path = require 'path'
base = require '../base'
module.exports = class Generator extends base
Generator::checkUpdate = ->
@update = fs.exis... | # Installs/updates latest version of the Tâmia Stylus framework.
# Also installs jQuery.
# https://github.com/sapegin/tamia
'use strict'
fs = require 'fs'
util = require 'util'
path = require 'path'
base = require '../base'
module.exports = class Generator extends base
Generator::checkUpdate = ->
@update = fs.exis... | Fix errors when files don’t exist. | Framework: Fix errors when files don’t exist.
| CoffeeScript | mit | tamiadev/generator-tamia,tamiadev/generator-tamia,tamiadev/generator-tamia |
ca0dc4833455e4f3fb44b0090b8d10c38aec2cc2 | app/views/polls/answer.js.coffee | app/views/polls/answer.js.coffee | $(".polls").fadeOut 500, ->
$(".polls[data-id='<%= @poll.id %>']").replaceWith("<%= escape_javascript(render :partial => "polls/poll", :locals => {:previous_poll => @poll}) %>")
$(".polls").show()
| $(".polls").fadeOut 500, ->
$(".polls[data-id='<%= @poll.id %>']").replaceWith("<%= escape_javascript(render :partial => "polls/poll", :locals => {:last_completed_poll => @poll}) %>")
$(".polls").show()
| Fix bug when voting where local had been mis-named | Fix bug when voting where local had been mis-named
| CoffeeScript | mit | rails-school/school,rails-school/school,rails-school/school |
2cac59adb4e593b71a7187268a422ee8099d95c6 | src/pulsar-api-rest.coffee | src/pulsar-api-rest.coffee | restler = require('restler')
class PulsarApiRest
constructor: (url, token) ->
restService = restler.service((url, token) ->
if token
@defaults.username = token
@defaults.password = 'x-oauth-basic'
return
,
baseURL: url
)
return new restService(url, token)
module.ex... | RestlerService = require('restler').Service
class PulsarApiRest extends RestlerService
constructor: (url, token) ->
defaults = {}
defaults.baseURL = url
if token
defaults.username = token
defaults.password = 'x-oauth-basic'
super(defaults)
module.exports = PulsarApiRest
| Replace composition of PulsarApiRest with inheritance from RestlerService. | Replace composition of PulsarApiRest with inheritance from RestlerService.
| CoffeeScript | mit | vogdb/hubot-pulsar,vogdb/hubot-pulsar,cargomedia/hubot-pulsar,cargomedia/hubot-pulsar |
47e6b1370dc6118e87d9f3d6e87d03335eebc480 | app/assets/javascripts/application.js.coffee | app/assets/javascripts/application.js.coffee | FilterCtrl = ($scope) ->
$scope.clear = ->
@value = null
angular.module('MongoBrowser', [])
# Handles ESC key
.directive 'onEsc', ->
(scope, element, attrs) ->
element.bind 'keyup', (event) ->
EscapeCode = 27
return unless event.keyCode is EscapeCode
scope.$apply(attrs.onEsc... | FilterCtrl = ($scope) ->
$scope.value = ""
$scope.clear = ->
@value = ""
angular.module('MongoBrowser', [])
# Handles ESC key
.directive 'onEsc', ->
(scope, element, attrs) ->
element.bind 'keyup', (event) ->
EscapeCode = 27
return unless event.keyCode is EscapeCode
scope.... | Enable / disable clear filter button. | Enable / disable clear filter button.
| CoffeeScript | mit | lucassus/mongo_browser,lucassus/mongo_browser,lucassus/mongo_browser |
51829519bde26407e37e997dc3c2a0d2c6b04fe0 | apps/artwork_2/components/auction/query.coffee | apps/artwork_2/components/auction/query.coffee | module.exports = """
fragment auction on Artwork {
is_acquireable
is_in_auction
auction: sale {
id
name
is_open
is_preview
is_closed
is_auction
is_auction_promo
is_with_buyers_premium
sale_artwork(id: $id) {
id
reserve_message
e... | module.exports = """
fragment auction on Artwork {
is_acquireable
is_in_auction
sale {
id
name
is_open
is_preview
is_closed
is_auction
is_auction_promo
is_with_buyers_premium
sale_artwork(id: $id) {
id
reserve_message
estimate
... | Fix actual auction/sale interface display | Fix actual auction/sale interface display
| CoffeeScript | mit | kanaabe/force,mzikherman/force,eessex/force,yuki24/force,cavvia/force-1,mzikherman/force,yuki24/force,xtina-starr/force,erikdstock/force,xtina-starr/force,eessex/force,artsy/force,anandaroop/force,joeyAghion/force,damassi/force,joeyAghion/force,artsy/force-public,kanaabe/force,kanaabe/force,izakp/force,dblock/force,art... |
2582430e0fe53405c44f9ca45aebab12a78019eb | lib/markdown-preview.coffee | lib/markdown-preview.coffee | EditSession = require 'edit-session'
MarkdownPreviewView = require './markdown-preview-view'
module.exports =
activate: ->
rootView.command 'markdown-preview:show', '.editor', => @show()
show: ->
activePane = rootView.getActivePane()
editSession = activePane.activeItem
isEditSession = editSession... | MarkdownPreviewView = require './markdown-preview-view'
module.exports =
activate: ->
rootView.command 'markdown-preview:show', '.editor', => @show()
show: ->
activePane = rootView.getActivePane()
editSession = activePane.activeItem
isMarkdownEditor = editSession.getGrammar?()?.scopeName is "sour... | Remove direct dependency on EditSession class | Remove direct dependency on EditSession class
Instead duck type for the source.gfm grammar
| CoffeeScript | mit | grimmer0125/markdown-preview-kramdown,Galadirith/markdown-preview,ArnaudRinquin/markdown-preview,sctlee/markdown-preview,makyo/markdown-preview,danielgtaylor/atom-api-blueprint-preview,tkssharma/markdown-preview,atom/markdown-preview,rugk/markdown-preview |
5bd4d65557d23b54ce9f91b1d77ec9433e99049d | test/battle_queue.coffee | test/battle_queue.coffee | {BattleQueue} = require '../server/queue'
describe 'BattleQueue', ->
it 'should be empty by default', ->
new BattleQueue().queue.should.be.empty
describe '#add', ->
it 'queues a new player', ->
queue = new BattleQueue()
queue.add({})
queue.queue.should.have.length 1
describe '#remove'... | {BattleQueue} = require '../server/queue'
describe 'BattleQueue', ->
it 'should be empty by default', ->
new BattleQueue().queue.should.be.empty
describe '#add', ->
it 'queues a new player', ->
queue = new BattleQueue()
queue.add({})
queue.queue.should.have.length 1
describe '#remove'... | Make other tests more consistent. | Make other tests more consistent.
| CoffeeScript | mit | sarenji/pokebattle-sim,sarenji/pokebattle-sim,sarenji/pokebattle-sim,askii93/battletower,pepijndevos/battletower,6/battletower |
0ee5b67cafb67c41762daad1a81b042b80ea661b | app/assets/javascripts/contracts.js.coffee | app/assets/javascripts/contracts.js.coffee | # Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
# Tooltips for Contract Balance
$ ->
$('.contracts').on('mouseenter', 'a[data-toggle=tooltip]', ->
$(t... | # 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/
# Tooltips for Contract Balance
$ ->
$('.contracts').on('mouseenter', 'a[data-toggle=tooltip]', ->
$(t... | Revert "and another quick fix, my bad this time -.-" | Revert "and another quick fix, my bad this time -.-"
This reverts commit f7cb16b8def1ace0a24f49f0ee6945fc99b3999f.
| CoffeeScript | mit | Gonozal/KSP-Campaign,Gonozal/KSP-Campaign |
9ac5dc938ca6a35a359cd7c4ffa9506596b953bc | menus/tree-view-finder.cson | menus/tree-view-finder.cson | # See https://atom.io/docs/latest/hacking-atom-package-word-count#menus for more details
'context-menu':
'atom-text-editor': [
{
'label': 'Toggle tree-view-finder'
'command': 'tree-view-finder:toggle'
}
]
'menu': [
{
'label': 'Packages'
'submenu': [
'label': 'tree-view-finder'
... | # See https://atom.io/docs/latest/hacking-atom-package-word-count#menus for more details
'context-menu':
'.tree-view': [
{
'label': 'Toggle tree-view-finder'
'command': 'tree-view-finder:toggle'
}
{'type': 'separator'}
]
'menu': [
{
'label': 'Packages'
'submenu': [
'label': '... | Add context menu on the tree-view to toggle the Finder. | Add context menu on the tree-view to toggle the Finder.
| CoffeeScript | mit | hanyazou/tree-view-finder |
d181298fe5bb27163d356b6fa2e73ab66115a6ad | snippets/language-apl.cson | snippets/language-apl.cson | ".source.apl":
Function:
prefix: "fn"
body: "∇${2:R ←} ${3:X} ${1:NAME} ${4:Y}\n\t$0\n∇"
Operator:
prefix: "op"
body: "∇${2:R ←} ${3:X} (${4:LOP} ${1:NAME} ${5:ROP}) ${6:Y}\n\t$0\n∇"
Assignment:
prefix: "a"
body: "${1:⎕ }← ${2:VALUE}"
# GNU APL extensions
"GNU Heredoc: Plain":
prefix:... | ".source.apl":
Function:
prefix: "fn"
body: "∇${2:R ←} ${3:X} ${1:NAME} ${4:Y}\n\t$0\n∇"
Operator:
prefix: "op"
body: "∇${2:R ←} ${3:X} (${4:LOP} ${1:NAME} ${5:ROP}) ${6:Y}\n\t$0\n∇"
Assignment:
prefix: "a"
body: "${1:⎕ }← ${2:VALUE}"
Hashbang:
prefix: "#"
body: "#!/usr/${3:local/bin/a... | Add snippet for inserting hashbangs | Add snippet for inserting hashbangs
| CoffeeScript | isc | Alhadis/language-apl |
a5ab8a7a83d6907a6d23f4d10d330dcb7cda70c8 | src/scripts/workbench/strings.js.coffee | src/scripts/workbench/strings.js.coffee | #= require underscore
strings =
loading: "Loading…"
noData: "No data"
logger:
title: "Workbench Logger"
"api-endpoint": "API Endpoint"
metadata:
title: "Sensor Metadata"
name: "Sensor Name"
description: "Sensor Description"
datastreams: "Datastreams"
owner: "Owner"
contact: "O... | #= require underscore
strings =
loading: "Loading…"
noData: "No data"
logger:
title: "Workbench Logger"
"api-endpoint": "API Endpoint"
metadata:
title: "Sensor Metadata"
name: "Sensor Name"
description: "Sensor Description"
datastreams: "Datastreams"
owner: "Owner"
contact: "O... | Change text to refer to stations | Change text to refer to stations
| CoffeeScript | mit | GeoSensorWebLab/asw-workbench,GeoSensorWebLab/Arctic-Scholar-Portal,GeoSensorWebLab/Arctic-Scholar-Portal,GeoSensorWebLab/asw-workbench,GeoSensorWebLab/asw-workbench |
f0a8dd1fe89ef871a06bc0d3f75e0955575c0255 | Gruntfile.coffee | Gruntfile.coffee | module.exports = (grunt) ->
PATHS =
"Windows_NT" : "bin\\nw.exe\\nw.exe"
"Darwin" : "bin/node-webkit.app/Contents/MacOS/node-webkit"
os = require("os")
path = require("path")
spawn = require("child_process").spawn
debug = ->
DS = path.sep
bi... | module.exports = (grunt) ->
PATHS =
"Windows_NT" : "bin\\nw.exe\\nw.exe"
"Darwin" : "bin/node-webkit.app/Contents/MacOS/node-webkit"
os = require("os")
path = require("path")
spawn = require("child_process").spawn
debug = ->
DS = path.sep
bi... | Add "default" task for grunt | Add "default" task for grunt
| CoffeeScript | mit | Ragg-/nwdrome |
4d01fa375cd3eca8d13c87a3afa3041e13e8086a | lib/utils/editor.coffee | lib/utils/editor.coffee | isCurrentLineEmpty = (editor) ->
# save the current buffer range, so that we can
# reset the state in the end
bufferRange = editor.getSelectedBufferRange()
editor.moveToBeginningOfLine()
editor.selectToEndOfLine()
selectedText = editor.getSelectedText()
# reset the selection to what it was before callin... | isCurrentLineEmpty = (editor) ->
# save the current buffer range, so that we can
# reset the state in the end
bufferRange = editor.getSelectedBufferRange()
editor.moveToBeginningOfLine()
editor.selectToEndOfLine()
selectedText = editor.getSelectedText()
# reset the selection to what it was before callin... | Fix typo that used the wrong function to reset the buffer range | Fix typo that used the wrong function to reset the buffer range
| CoffeeScript | mit | idris-hackers/atom-language-idris |
e67ecd9fc7671c9ff9b5f5375ab8b536d1e949cf | spec/config/status-icon-position-spec.coffee | spec/config/status-icon-position-spec.coffee | describe "The Status Icon Configuration Option", ->
configString = "linter.statusIconPosition"
beforeEach ->
waitsForPromise ->
atom.packages.activatePackage('linter')
it "is 'Left' by default.", ->
packageSetting = atom.config.get configString
expectedDefault = "Left"
expect(packageSetti... | BottomTab = require '../../lib/views/bottom-tab'
describe "The Status Icon Configuration Option", ->
[statusBar, workspaceElement, dummyView] = []
configString = "linter.statusIconPosition"
beforeEach ->
workspaceElement = atom.views.getView(atom.workspace)
dummyView = document.createElement("div")
... | Test the position of the indicator on the bar. | Test the position of the indicator on the bar.
| CoffeeScript | mit | josa42/Linter,Arcanemagus/linter,elkeis/linter,shawninder/linter,UltCombo/linter,kaeluka/linter,steelbrain/linter,atom-community/linter,DanPurdy/linter,AtomLinter/Linter,mdgriffith/linter,levity/linter,blakeembrey/linter,JohnMurga/linter,iam4x/linter,e-jigsaw/Linter,AsaAyers/linter |
0550af5aa26209e649dcf9e4d1eef937186073cc | components/RunTests.coffee | components/RunTests.coffee | noflo = require 'noflo'
fbpSpec = require 'fbp-spec'
exports.getComponent = ->
c = new noflo.Component
c.inPorts.add 'in',
datatype: 'object'
description: 'Project'
c.inPorts.add 'runtime',
datatype: 'object'
required: yes
c.outPorts.add 'context',
datatype: 'object'
c.outPorts.add 'error... | noflo = require 'noflo'
fbpSpec = require 'fbp-spec'
exports.getComponent = ->
c = new noflo.Component
c.inPorts.add 'in',
datatype: 'object'
description: 'Project'
c.inPorts.add 'runtime',
datatype: 'object'
required: yes
c.outPorts.add 'context',
datatype: 'object'
c.outPorts.add 'error... | Update to new fbp-spec multi-suite format | Update to new fbp-spec multi-suite format
| CoffeeScript | mit | oportocala/noflo-ui,rasata/noflo-ui,lxfschr/noflo-ui,oportocala/noflo-ui,rdf-pipeline/noflo-server,noflo/noflo-ui,lxfschr/noflo-ui,rasata/noflo-ui,noflo/noflo-ui,rdf-pipeline/noflo-server |
b08f320ed52ea80516bfe799b4e55d80d8a75bce | src/packages/collaboration/lib/prompt.coffee | src/packages/collaboration/lib/prompt.coffee | {View} = require 'space-pen'
Editor = require 'editor'
$ = require 'jquery'
Point = require 'point'
_ = require 'underscore'
module.exports =
class Prompt extends View
@activate: -> new Prompt
@content: ->
@div class: 'overlay from-top mini', =>
@subview 'miniEditor', new Editor(mini: true)
@div c... | {View} = require 'space-pen'
Editor = require 'editor'
$ = require 'jquery'
Point = require 'point'
_ = require 'underscore'
module.exports =
class Prompt extends View
@activate: -> new Prompt
@content: ->
@div class: 'overlay from-top', =>
@subview 'miniEditor', new Editor(mini: true)
@div class:... | Remove mini class to give id enough room | Remove mini class to give id enough room
| CoffeeScript | mit | sotayamashita/atom,niklabh/atom,hellendag/atom,vinodpanicker/atom,ashneo76/atom,RuiDGoncalves/atom,devmario/atom,FoldingText/atom,gontadu/atom,Galactix/atom,Ingramz/atom,me6iaton/atom,hellendag/atom,batjko/atom,SlimeQ/atom,GHackAnonymous/atom,crazyquark/atom,avdg/atom,Klozz/atom,Galactix/atom,rjattrill/atom,ali/atom,po... |
79fb4b0446b673545bb3b3d7bef36e23b1b1e0b4 | src/coffee/cilantro/ui/concept/panel.coffee | src/coffee/cilantro/ui/concept/panel.coffee | define [
'../core'
'./index'
'./search'
'tpl!templates/concept/panel.html'
], (c, index, search, templates...) ->
templates = c._.object ['panel'], templates
class ConceptSearch extends search.ConceptSearch
events:
'typeahead:autocompleted input': 'autocomplete'
a... | define [
'../core'
'./index'
'./search'
'tpl!templates/concept/panel.html'
], (c, index, search, templates...) ->
templates = c._.object ['panel'], templates
# Takes a collection of c.models.ConceptModel objects
class ConceptPanel extends c.Marionette.Layout
className: 'concept-pa... | Remove unused ConceptSearch subclass for ConceptPanel | Remove unused ConceptSearch subclass for ConceptPanel
| CoffeeScript | bsd-2-clause | chop-dbhi/cilantro,chop-dbhi/cilantro,chop-dbhi/cilantro |
110baac26d46f00057dcc72054ce451b742980a6 | lib/assets/javascripts/routers/main.js.coffee | lib/assets/javascripts/routers/main.js.coffee | TentAdmin.Routers.main = new class MainRouter extends Marbles.Router
routes: {
"" : "root"
"profile" : "profile"
"apps" : "apps"
}
root: =>
@navigate('/profile', { replace: true, trigger: true })
profile: =>
new Marbles.Views.Profile container: TentAdmin.config.container
apps:... | TentAdmin.Routers.main = new class MainRouter extends Marbles.Router
routes: {
"" : "root"
"profile" : "profile"
"apps" : "apps"
}
root: =>
@navigate('/profile', { replace: true, trigger: true })
profile: =>
window.scrollTo(0, 0)
new Marbles.Views.Profile container: TentAdmin... | Reset scroll position to top of window when navigating to new view | Reset scroll position to top of window when navigating to new view
| CoffeeScript | bsd-3-clause | tent/tent-admin |
37c7967e8ca69d44e5c912eebb39ba9e16f912a7 | lms/static/coffee/spec/requirejs_spec.coffee | lms/static/coffee/spec/requirejs_spec.coffee | describe "RequireJS namespacing", ->
beforeEach ->
@addMatchers
requirejsTobeUndefined: ->
typeof requirejs is "undefined"
requireTobeUndefined: ->
typeof require is "undefined"
defineTobeUndefined: ->
typeof define is "undefined"
it "check that the RequireJS object... | describe "RequireJS namespacing", ->
beforeEach ->
@addMatchers
requirejsTobeUndefined: ->
typeof requirejs is "undefined"
requireTobeUndefined: ->
typeof require is "undefined"
defineTobeUndefined: ->
typeof define is "undefined"
it "check that the RequireJS object... | Work on RequireJS Jasmine test. | Work on RequireJS Jasmine test.
| CoffeeScript | agpl-3.0 | mjirayu/sit_academy,dcosentino/edx-platform,ampax/edx-platform-backup,hkawasaki/kawasaki-aio8-0,valtech-mooc/edx-platform,nanolearningllc/edx-platform-cypress-2,Endika/edx-platform,xinjiguaike/edx-platform,IITBinterns13/edx-platform-dev,jbzdak/edx-platform,chrisndodge/edx-platform,waheedahmed/edx-platform,hmcmooc/muddx... |
587a6552ea5f9cf49f82c4b6c3fe5b0bab353e48 | src/packages/tree-view/lib/file-view.coffee | src/packages/tree-view/lib/file-view.coffee | {View} = require 'space-pen'
$ = require 'jquery'
Git = require 'git'
fs = require 'fs'
module.exports =
class FileView extends View
@content: ({file} = {}) ->
@li class: 'file entry', =>
@span file.getBaseName(), class: 'name', outlet: 'fileName'
@span '', class: 'highlight'
file: null
initia... | {View} = require 'space-pen'
$ = require 'jquery'
Git = require 'git'
fs = require 'fs'
module.exports =
class FileView extends View
@content: ({file} = {}) ->
@li class: 'file entry', =>
@span file.getBaseName(), class: 'name', outlet: 'fileName'
@span '', class: 'highlight'
file: null
initia... | Use subscribe instead of on | Use subscribe instead of on
| CoffeeScript | mit | mnquintana/atom,hpham04/atom,originye/atom,lpommers/atom,palita01/atom,tanin47/atom,medovob/atom,hagb4rd/atom,me-benni/atom,lpommers/atom,Abdillah/atom,palita01/atom,jtrose2/atom,Hasimir/atom,n-riesco/atom,tony612/atom,Hasimir/atom,kdheepak89/atom,BogusCurry/atom,Jandersoft/atom,ilovezy/atom,ReddTea/atom,Jdesk/atom,qsk... |
b385e8a595ed7334f9bc482f990129b29f4e825b | bokehjs/src/coffee/config.coffee | bokehjs/src/coffee/config.coffee | require.config
paths:
jquery: "vendor/jquery/jquery"
jquery_ui: "vendor/jquery-ui-amd/jquery-ui-1.10.0/jqueryui"
jquery_mousewheel: "vendor/jquery-mousewheel/jquery.mousewheel"
jqrangeslider: "vendor/jqrangeslider/jQAllRangeSliders-withRuler-min"
handso... | require.config
paths:
jquery: "vendor/jquery/jquery"
jquery_ui: "vendor/jquery-ui-amd/jquery-ui-1.10.0/jqueryui"
jquery_mousewheel: "vendor/jquery-mousewheel/jquery.mousewheel"
jqrangeslider: "vendor/jqrangeslider/jQAllRangeSliders-withRuler-min"
handso... | Add jquery_ui/mouse to jqrangeslider's dependencies | Add jquery_ui/mouse to jqrangeslider's dependencies
| CoffeeScript | bsd-3-clause | philippjfr/bokeh,jplourenco/bokeh,phobson/bokeh,srinathv/bokeh,PythonCharmers/bokeh,carlvlewis/bokeh,jplourenco/bokeh,josherick/bokeh,timsnyder/bokeh,awanke/bokeh,saifrahmed/bokeh,evidation-health/bokeh,saifrahmed/bokeh,ericmjl/bokeh,rhiever/bokeh,ahmadia/bokeh,htygithub/bokeh,Karel-van-de-Plassche/bokeh,aiguofer/bokeh... |
12885a70f1eaee5fedd95a5df6701ef5d03024ef | lib/modal/modal-form.coffee | lib/modal/modal-form.coffee | `import {ArrayProxy, run} from 'ember';`
`import Modal from './modal'`
###*
# A flavour of a {{#crossLink "Modal}}Modal{{/crossLink}} that handles form submission right.
# @class ModalForm
###
ModalForm = Modal.extend
tagName: 'form'
attributeBindings: ['in-async']
'in-async': undefined
'close-if-err... | `import {ArrayProxy, run} from 'ember';`
`import Modal from './modal'`
###*
# A flavour of a {{#crossLink "Modal}}Modal{{/crossLink}} that handles form submission right.
# @class ModalForm
###
ModalForm = Modal.extend
tagName: 'form'
attributeBindings: ['in-async']
'in-async': null
'close-if-error': ... | Set in-async to null instead of undefined, As it didn't trigger property changes properly. | Modal: Set in-async to null instead of undefined,
As it didn't trigger property changes properly.
| CoffeeScript | apache-2.0 | indexiatech/ember-components,indexiatech/ember-components |
fb88db33aa27d052087a67cfb636c1036e4405ba | test/log.coffee | test/log.coffee | should = require 'should'
bus = require '../lib/bus'
log = require '../lib/core/log'
tests = [
topic: 'debug'
data: 'hello, debug'
,
topic: 'error'
data: 'hello, error'
,
topic: 'info'
data: 'hello, info'
]
describe 'log', ->
for test in tests
do (test) ->
it "should log on #{test.topic}", ... | should = require 'should'
bus = require '../lib/bus'
log = require '../lib/core/log'
tests = [
topic: 'debug'
data: 'hello, debug'
,
topic: 'error'
data: 'hello, error'
,
topic: 'info'
data: 'hello, info'
]
describe 'log', ->
for test in tests
do (test) ->
it "should log on #{test.topic}", ... | Add whitespace for test readability | Add whitespace for test readability
| CoffeeScript | mit | TorchlightSoftware/axiom |
30b81f1856935030e736b8f2ff4d991a65610ffe | app/assets/javascripts/jasminerice.js.coffee | app/assets/javascripts/jasminerice.js.coffee | #=require jasmine
#=require jasmine-html
#=require jasmine-jquery-1.5.0
(->
execJasmine = ->
jasmineEnv.execute()
jasmineEnv = jasmine.getEnv()
jasmineEnv.updateInterval = 1000
window.jsApiReporter = new jasmine.JsApiReporter()
htmlReporter = new jasmine.HtmlReporter()
jasmineEnv.addReporter htmlRepo... | #=require jasmine
#=require jasmine-html
#=require jasmine-jquery-1.5.0
(->
execJasmine = ->
jasmineEnv.execute()
jasmineEnv = jasmine.getEnv()
jasmineEnv.updateInterval = 1000
window.jsApiReporter = new jasmine.JsApiReporter()
htmlReporter = new jasmine.HtmlReporter()
jasmineEnv.addReporter htmlRepo... | Change fixtures paths from absolute to relative. | Change fixtures paths from absolute to relative.
Fixes an issue where Jasmine is mounted in a non-standard place
(i.e. /mything/jasmine) and the fixtures are still served from
/jasmine/fixtures rather than /mything/jasmine/fixtures.
| CoffeeScript | mit | carolineartz/Polity,michael-harrison/jasminerice,4justinstewart/Polity,carolineartz/Polity,4justinstewart/Polity,michael-harrison/jasminerice |
d337c88aea5e5e8bf6e46cc9d5cd9dd5ae7e794f | src/overlay-manager.coffee | src/overlay-manager.coffee | module.exports =
class OverlayManager
constructor: (@container) ->
@overlayNodesById = {}
render: (presenter) ->
for decorationId, {pixelPosition, item} of presenter.state.content.overlays
@renderOverlay(presenter, decorationId, item, pixelPosition)
for id, overlayNode of @overlayNodesById
... | module.exports =
class OverlayManager
constructor: (@container) ->
@overlayNodesById = {}
render: (presenter) ->
for decorationId, {pixelPosition, item} of presenter.state.content.overlays
@renderOverlay(presenter, decorationId, item, pixelPosition)
for id, overlayNode of @overlayNodesById
... | Delete overlay node from hash before removing | Delete overlay node from hash before removing
| CoffeeScript | mit | mdumrauf/atom,vjeux/atom,omarhuanca/atom,jjz/atom,gontadu/atom,kc8wxm/atom,synaptek/atom,panuchart/atom,liuderchi/atom,jeremyramin/atom,alexandergmann/atom,jjz/atom,Austen-G/BlockBuilder,bsmr-x-script/atom,qiujuer/atom,wiggzz/atom,dannyflax/atom,dijs/atom,rsvip/aTom,ykeisuke/atom,rmartin/atom,nvoron23/atom,devmario/ato... |
ea5bf14431f078d9715731a030eef142b72e5d62 | server/lib/cordova.coffee | server/lib/cordova.coffee | Meteor.methods
log: ->
console.log.apply console, arguments
Meteor.startup ->
Push.debug = RocketChat.settings.get 'Push_debug'
if RocketChat.settings.get('Push_enable') is true
Push.allow
send: (userId, notification) ->
return Meteor.users.findOne({_id: userId})?.admin is true
Push.Configure
apn... | Meteor.methods
log: ->
console.log.apply console, arguments
Meteor.startup ->
Push.debug = RocketChat.settings.get 'Push_debug'
if RocketChat.settings.get('Push_enable') is true
Push.enabled = true
Push.allow
send: (userId, notification) ->
return Meteor.users.findOne({_id: userId})?.admin is true
... | Set Push.enabled and set push sendInterval to 1000ms and sendBatchSize to 10 | Set Push.enabled and set push sendInterval to 1000ms and sendBatchSize to 10
| CoffeeScript | mit | anhld/Rocket.Chat,coreyaus/Rocket.Chat,subesokun/Rocket.Chat,lonbaker/Rocket.Chat,wicked539/Rocket.Chat,xasx/Rocket.Chat,ImpressiveSetOfIntelligentStudents/chat,trt15-ssci-organization/Rocket.Chat,TribeMedia/Rocket.Chat,tntobias/Rocket.Chat,igorstajic/Rocket.Chat,adamteece/Rocket.Chat,JamesHGreen/Rocket_API,leohmoraes/... |
f5b9e797eb66375972fc032b87a070733a5c3eab | src/SumoCoders/FrameworkCoreBundle/Resources/assets/coffee/framework.flash.coffee | src/SumoCoders/FrameworkCoreBundle/Resources/assets/coffee/framework.flash.coffee | class Flash
add: (message, type) ->
alertId = Math.floor(Date.now() / 1000);
$('body').prepend(
'<div class="alert alert-' + type + ' alert-dismissible notification" role="alert" data-alert-id="' + alertId + '">' +
' <div class="container">' +
' <button type="button" class="close" ... | class Flash
add: (message, type) ->
alertId = Date.now();
$('body').prepend(
'<div class="alert alert-' + type + ' alert-dismissible notification" role="alert" data-alert-id="' + alertId + '">' +
' <div class="container">' +
' <button type="button" class="close" data-dismiss="alert... | Allow our alert id to be in milliseconds as it lowers the chance of duplicates | Allow our alert id to be in milliseconds as it lowers the chance of duplicates
| CoffeeScript | mit | jonasdekeukelaere/Framework,sumocoders/Framework,jonasdekeukelaere/Framework,StijnVrolijk/Framework,sumocoders/Framework,jonasdekeukelaere/Framework,StijnVrolijk/Katzoektthuis,StijnVrolijk/Framework,StijnVrolijk/Katzoektthuis,StijnVrolijk/Framework,sumocoders/Framework,StijnVrolijk/Katzoektthuis,StijnVrolijk/Framework,... |
48584cec702f3cb2e555638836a302cbb2704564 | Gruntfile.coffee | Gruntfile.coffee | module.exports = (grunt) ->
grunt.initConfig
clean:
package: ['tasks/gyp.js']
test: ['test/support/build']
coffee:
task:
options:
bare: true
files:
'tasks/gyp.js': 'tasks/gyp.coffee'
mochacli:
options:
bail: true
compilers: ['coffee:coffee-script/register']
# Compiling t... | module.exports = (grunt) ->
grunt.initConfig
clean:
package: ['tasks/gyp.js']
test: ['test/support/build']
coffee:
task:
options:
bare: true
files:
'tasks/gyp.js': 'tasks/gyp.coffee'
mochacli:
options:
bail: true
compilers: ['coffee:coffee-script/register']
# Compiling t... | Raise test timeout to 120 seconds | Raise test timeout to 120 seconds
| CoffeeScript | bsd-2-clause | SonicHedgehog/grunt-node-gyp |
7977994b0bd105ac5c5036312709152db16039f0 | Gruntfile.coffee | Gruntfile.coffee | module.exports = (grunt) ->
'use strict'
# Project configuration.
grunt.initConfig
watch:
coffee:
tasks: ['coffee:compile']
files: [
'spec/*.coffee'
]
buildRunner:
tasks: ['jasmine:src:build... | module.exports = (grunt) ->
'use strict'
# Project configuration.
grunt.initConfig
watch:
coffee:
tasks: ['coffee:compile']
files: [
'spec/*.coffee'
]
buildRunner:
tasks: ['jasmine:src:build... | Fix grunt test task to first compile files | Fix grunt test task to first compile files
Duh.
| CoffeeScript | bsd-2-clause | bruth/promiser |
d09770c900a69ef544b349088f970b470b37c92e | src/public/app._.coffee | src/public/app._.coffee | define [
'models/server'
'vendor/underscore'
'vendor/jquery'
], ( Server ) ->
# Application base class
#
class App
id: null
serverAddress: '192.168.1.30'
# Constructs a new app.
#
constructor: ( ) ->
@_initTime = performance.now()
@server = new Server(@serverAddress)
@initialize()
... | define [
'models/server'
'vendor/underscore'
'vendor/jquery'
], ( Server ) ->
# Application base class
#
class App
id: null
serverAddress: ''
# Constructs a new app.
#
constructor: ( ) ->
@_initTime = performance.now()
@server = new Server(@serverAddress)
@initialize()
# Is called... | Use empty string as server location so current host is used | Use empty string as server location so current host is used
| CoffeeScript | bsd-2-clause | joostverdoorn/webrtc |
3edf8a4d509c33194f0393ae51a2ea9f202bcb80 | src/helper/paramHandler/paramHandler.coffee | src/helper/paramHandler/paramHandler.coffee | class ParamHandler
constructor: (@payload = {}) ->
getArguments: (process, callback) ->
match = process.argv.join(' ').match /--[a-zA-Z]* ([a-zA-Z0-9]*)/g
match.map (found) =>
parse = found.match(/--([a-zA-Z]*)\s/)
@payload[parse[1]] = found.replace parse[0], ''
callback @payload
module... | class ParamHandler
constructor: (@payload = {}) ->
getArguments: (process, callback) ->
match = process.argv.join(' ').match /--[a-zA-Z]* ([a-zA-Z0-9]*)/g
match.map (found) =>
parse = found.match(/-{1,2}([a-zA-Z]*)\s/)
@payload[parse[1]] = found.replace parse[0], ''
callback @payload
mod... | Add little trick to ParamHandler, so we can handle with on minus too | Add little trick to ParamHandler, so we can handle with on minus too
| CoffeeScript | mit | sm0k1nggnu/entertain.io |
942dca1c79c3c60307dbf7b88bcfebf53430c016 | test/sphere.test.coffee | test/sphere.test.coffee | Sphere = require '../sim/sphere'
Vec = require('three').Vector3
assert = require 'assert'
{expect} = require 'chai'
describe 'Sphere', ->
it 'should trilaterate properly', ->
s1 = new Sphere 1, new Vec 0, 0, 0
s2 = new Sphere 1, new Vec 1, 0, 0
s3 = new Sphere 1, new Vec .5, 1, 0
[i1, i2] = Sp... | Sphere = require '../sim/sphere'
Vec = require('three').Vector3
assert = require 'assert'
{expect} = require 'chai'
describe 'Sphere', ->
it 'should trilaterate properly', ->
s1 = new Sphere 1, new Vec 0, 0, 0
s2 = new Sphere 1, new Vec 1, 0, 0
s3 = new Sphere 1, new Vec .5, 1, 0
[i1, i2] = Sp... | Test all intersections against all spheres | Test all intersections against all spheres
| CoffeeScript | bsd-3-clause | r24y/teleprint,r24y/teleprint,r24y/delta-calibration,r24y/delta-calibration |
ee5a364e12c095e52c0f056999448f6e3ecb9cdc | coffee/serrano/field.coffee | coffee/serrano/field.coffee | define ['backbone', 'underscore'], (Backbone, _) ->
class FieldModel extends Backbone.Model
class FieldCollection extends Backbone.Collection
model: FieldModel
initialize: ->
super
@on 'reset', @resolve
search: (query, handler) ->
Backbone.ajax
... | define ['backbone', 'underscore'], (Backbone, _) ->
class FieldModel extends Backbone.Model
parse: (resp) ->
@urls = {}
@_cache = {}
# Simpler representation of urls
for key, value of resp._links
@urls[key] = value.href
return resp... | Add methods on FieldModel corresponding to URL actions | Add methods on FieldModel corresponding to URL actions
URLs are now parsed and stored locally from internal `attrs._links` | CoffeeScript | bsd-2-clause | chop-dbhi/cilantro,chop-dbhi/cilantro,chop-dbhi/cilantro |
4720dd5eafd6a7c78dc08fe4269edcd3cd872081 | app/assets/javascripts/shoppe/products.coffee | app/assets/javascripts/shoppe/products.coffee | $ ->
#
# Refresh the order
#
calculateTax = (form, invokeField)->
if $('select#product_tax_rate_id', form).val().length > 0
$('input#product_price_including_tax', form).prop('disabled', false)
else
$('input#product_price_including_tax', form).prop('disabled', true)
$('input#product_pr... | $ ->
#
# Refresh the order
#
calculateTax = (form, invokeField)->
if $('select#product_tax_rate_id', form).val().length > 0
$('input#product_price_including_tax', form).prop('disabled', false)
else
$('input#product_price_including_tax', form).prop('disabled', true)
$('input#product_pr... | Fix issue with javascript error causing category choosing functionality to break for a product with variants. | Fix issue with javascript error causing category choosing functionality to break for a product with variants.
| CoffeeScript | mit | naked-apps/shoppe_core,naked-apps/shoppe_core,naked-apps/shoppe_core |
7545ac0daec6590bbbaa981bd89e1680c46e2501 | client/admin/lib/views/members/adminmembersview.coffee | client/admin/lib/views/members/adminmembersview.coffee | kd = require 'kd'
KDView = kd.View
KDTabView = kd.TabView
KDTabPaneView = kd.TabPaneView
TeamMembersCommonView = require './teammemberscommonview'
GroupsBlockedUserView = require '../groupsblockeduserview'
module.exports = class AdminMembersView extends KDView
... | kd = require 'kd'
KDView = kd.View
isKoding = require 'app/util/isKoding'
KDTabView = kd.TabView
KDTabPaneView = kd.TabPaneView
TeamMembersCommonView = require './teammemberscommonview'
GroupsBlockedUserView = require '../groupsblockeduserview'
module... | Make blocked users only available to Koding group. | AdminMembersView: Make blocked users only available to Koding group.
| CoffeeScript | agpl-3.0 | szkl/koding,andrewjcasal/koding,cihangir/koding,sinan/koding,kwagdy/koding-1,acbodine/koding,gokmen/koding,mertaytore/koding,drewsetski/koding,kwagdy/koding-1,jack89129/koding,acbodine/koding,rjeczalik/koding,sinan/koding,koding/koding,alex-ionochkin/koding,sinan/koding,szkl/koding,alex-ionochkin/koding,mertaytore/kodi... |
bcf6f8b5a9ba5fd0237fa04755ed086467592d05 | core/app/backbone/modules/facebook_renewal.coffee | core/app/backbone/modules/facebook_renewal.coffee | FactlinkApp.module "FacebookRenewal", (FacebookRenewal, FactlinkApp, Backbone, Marionette, $, _) ->
class IframeView extends Backbone.Marionette.ItemView
template:
text: """
<iframe src="/auth/facebook"></iframe>
"""
FacebookRenewal.addInitializer ->
if currentUser?.get('services')['fa... | FactlinkApp.module "FacebookRenewal", (FacebookRenewal, FactlinkApp, Backbone, Marionette, $, _) ->
class IframeView extends Backbone.Marionette.ItemView
template:
text: """
<iframe class="facebook_renewal_iframe" src="/auth/facebook"></iframe>
"""
FacebookRenewal.addInitializer ->
if ... | Add guards to make Facebook renewal more robust | Add guards to make Facebook renewal more robust
| CoffeeScript | mit | daukantas/factlink-core,Factlink/factlink-core,Factlink/factlink-core,Factlink/factlink-core,daukantas/factlink-core,daukantas/factlink-core,Factlink/factlink-core,daukantas/factlink-core |
e045ab7481f2a0d5964a1b0aae27d71ffcfe54a6 | 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 @get('isFinished')
@notifyPropert... | Remove check of model state in DurationCalculation | Remove check of model state in DurationCalculation
We no longer need this check, because it was only relevant with Ember
Data. Additionally it was a cause of a travis-ci/travis-ci#1992, because
of wrong syntax:
unless someFunction false or true
will only check for a result of someFunction with an argument being ... | CoffeeScript | mit | jlrigau/travis-web,fotinakis/travis-web,jlrigau/travis-web,jlrigau/travis-web,Tiger66639/travis-web,jlrigau/travis-web,travis-ci/travis-web,fauxton/travis-web,travis-ci/travis-web,travis-ci/travis-web,mjlambert/travis-web,2947721120/travis-web,2947721120/travis-web,mjlambert/travis-web,fauxton/travis-web,2947721120/tra... |
c4629f99d76b21ff3f68d36ff856443642b09343 | admin/server/validate.coffee | admin/server/validate.coffee | utils = require('lib/utils')
exports.validate_doc_update = (newDoc, oldDoc, userCtx) ->
types = ['essay','scene','video','profile']
access = if '_admin' in userCtx.roles or 'admin' in userCtx.roles or 'manager' in userCtx.roles then true else false
if not access
throw unauthorized: 'You must have the ro... | utils = require('lib/utils')
exports.validate_doc_update = (newDoc, oldDoc, userCtx) ->
types = ['essay','scene','video','profile']
access = if '_admin' in userCtx.roles or '_creator' in userCtx.roles or 'admin' in userCtx.roles or 'manager' in userCtx.roles then true else false
if not access
throw unau... | Include the role '_creator' used by Cloudant to the allowed type of users | Include the role '_creator' used by Cloudant to the allowed type of users
| CoffeeScript | mit | markuso/kleks,markuso/kleks |
8e9e96864e93377372882a10e95d4c7c92874025 | design.coffee | design.coffee | module.exports =
_id: '_design/repos'
languange: 'javascript'
views:
by_watchers:
map: (doc) -> emit doc.watchers, doc.description if doc.watchers
by_language:
map: (doc) -> emit doc.languange, doc.description if doc.languange
by_prefix:
map: (doc) ->
return unless doc.type ... | module.exports =
_id: '_design/repos'
languange: 'javascript'
views:
by_watchers:
map: (doc) -> emit doc.watchers, doc.description if doc.watchers
by_language:
map: (doc) -> emit doc.language, doc.description if doc.language
by_prefix:
map: (doc) ->
return unless doc.type is... | Fix typo in repos/language view | Fix typo in repos/language view | CoffeeScript | mit | lackac/omnicat |
12f5e484793c8a7542fda401cf8bddfe04508fef | app/assets/javascripts/darkswarm/services/authentication_service.js.coffee | app/assets/javascripts/darkswarm/services/authentication_service.js.coffee | Darkswarm.factory "AuthenticationService", (Navigation, $modal, $location, Redirections)->
new class AuthenticationService
selectedPath: "/login"
constructor: ->
if $location.path() in ["/login", "/signup", "/forgot"] && location.pathname is not '/register/auth'
@open $location.path()
el... | Darkswarm.factory "AuthenticationService", (Navigation, $modal, $location, Redirections)->
new class AuthenticationService
selectedPath: "/login"
constructor: ->
if $location.path() in ["/login", "/signup", "/forgot"] && location.pathname isnt '/register/auth'
@open $location.path()
else... | Replace is not with isnt - damn you CoffeeScript | Replace is not with isnt - damn you CoffeeScript
| CoffeeScript | agpl-3.0 | MikeiLL/openfoodnetwork,ecocitycore/openfoodnetwork,Matt-Yorkley/openfoodnetwork,MikeiLL/openfoodnetwork,RohanM/openfoodnetwork,KateDavis/openfoodnetwork,mkllnk/openfoodnetwork,lin-d-hop/openfoodnetwork,openfoodfoundation/openfoodnetwork,KateDavis/openfoodnetwork,ltrls/openfoodnetwork,levent/openfoodnetwork,levent/open... |
48b4a885a68c92aa35ce21660eebbf3368e880ba | atom/config.cson | atom/config.cson | "*":
core:
themes: [
"one-dark-ui"
"solarized-dark-syntax"
]
editor:
fontFamily: "Monaco"
fontSize: 15
"exception-reporting":
userId: "1dd85e3b-ba87-9779-645f-85f161541155"
welcome:
showOnStartup: false
whitespace:
ignoreWhitespaceOnCurrentLine: false
ignoreWhitespa... | "*":
core:
telemetryConsent: "no"
themes: [
"one-dark-ui"
"solarized-dark-syntax"
]
editor:
fontFamily: "Monaco"
fontSize: 15
"exception-reporting":
userId: "1dd85e3b-ba87-9779-645f-85f161541155"
welcome:
showOnStartup: false
whitespace:
ignoreWhitespaceOnCurrentLin... | Update atom to latest version | Update atom to latest version
| CoffeeScript | mit | ruiafonsopereira/dotfiles,ruiafonsopereira/dotfiles |
e0edea4ae949a006c051768d073737436ba50b2b | app/assets/javascripts/calendar.js.coffee | app/assets/javascripts/calendar.js.coffee | class @calendar
options =
month: "short"
day: "numeric"
year: "numeric"
constructor: (timestamps, starting_year, starting_month) ->
cal = new CalHeatMap()
cal.init
itemName: ["commit"]
data: timestamps
start: new Date(starting_year, starting_month)
domainLabelFormat: "%b... | class @calendar
options =
month: "short"
day: "numeric"
year: "numeric"
constructor: (timestamps, starting_year, starting_month) ->
cal = new CalHeatMap()
cal.init
itemName: ["commit"]
data: timestamps
start: new Date(starting_year, starting_month)
domainLabelFormat: "%b... | Fix commits calendar vertical days. | Fix commits calendar vertical days.
| CoffeeScript | mit | MauriceMohlek/gitlabhq,michaKFromParis/sparkslab,TheWatcher/gitlabhq,NKMR6194/gitlabhq,chenrui2014/gitlabhq,t-zuehlsdorff/gitlabhq,tk23/gitlabhq,martinma4/gitlabhq,mmkassem/gitlabhq,Soullivaneuh/gitlabhq,jrjang/gitlab-ce,yuyue2013/ss,whluwit/gitlabhq,k4zzk/gitlabhq,Datacom/gitlabhq,per-garden/gitlabhq,bozaro/gitlabhq,j... |
b4f6550f05d9bea4e9e2753b40eace622120e68a | scripts/newuserparty.coffee | scripts/newuserparty.coffee | # Description:
# Create a party when a new user appear
#
# Dependencies:
# None
#
# Configuration:
# None
#
# Commands:
# new user - Create a party when a new user appear
#
# Author:
# PiXeL16
messages = [
"A new user hooray!! :tada::tada::smile::tada::tada:",
"A new user eeeehhh!! :confetti_ball::tada::s... | # Description:
# Create a party when a new user appear
#
# Dependencies:
# None
#
# Configuration:
# None
#
# Commands:
# new user - Create a party when a new user appear
#
# Author:
# PiXeL16
# messages = [
# "A new user hooray!! :tada::tada::smile::tada::tada:",
# "A new user eeeehhh!! :confetti_ball::t... | Disable new user party celebration | Disable new user party celebration
| CoffeeScript | apache-2.0 | esttorhe/NeoBot,PiXeL16/NeoBot |
2d97cefffbc5e0061f01bd179bfb973c83323e27 | BHCDatabase/app/assets/javascripts/users.coffee | BHCDatabase/app/assets/javascripts/users.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/
window.onload = ->
btn = undefined
modal = undefined
span = undefined
modal = document.getElementByI... | # Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
ready = ->
btn = undefined
modal = undefined
span = undefined
modal = document.getElementByI... | Fix bug where coffeescript would only execute after page refresh. | Fix bug where coffeescript would only execute after page refresh.
| CoffeeScript | mit | DaBrown95/BHCDatabase,DaBrown95/BHCDatabase,DaBrown95/BHCDatabase |
abbcea2945786a02fc42d9e70edc43aa3b030a43 | services/clsi/config/settings.defaults.coffee | services/clsi/config/settings.defaults.coffee | Path = require "path"
module.exports =
# Options are passed to Sequelize.
# See http://sequelizejs.com/documentation#usage-options for details
mysql:
clsi:
database: "clsi"
username: "clsi"
password: null
dialect: "sqlite"
storage: Path.resolve(__dirname + "/../db.sqlite")
path:
compilesDir: ... | Path = require "path"
module.exports =
# Options are passed to Sequelize.
# See http://sequelizejs.com/documentation#usage-options for details
mysql:
clsi:
database: "clsi"
username: "clsi"
password: null
dialect: "sqlite"
storage: Path.resolve(__dirname + "/../db.sqlite")
path:
compilesDir: ... | Add commented out docker config | Add commented out docker config
| CoffeeScript | agpl-3.0 | sharelatex/sharelatex |
18f0a486c50e7f56243ba241112ea261956b8ac9 | app/controllers/guide_page.coffee | app/controllers/guide_page.coffee | Page = require 'controllers/page'
class GuidePage extends Page
el: $('.guide')
className: 'guide'
events:
'click .menu li' : 'show'
active: ->
super
@el.scroll() # trick lazyload
show: (e) =>
target = e.currentTarget
$(target).addClass('show').siblings('li').removeClass('show... | Page = require 'controllers/page'
class GuidePage extends Page
el: $('.guide')
className: 'guide'
events:
'click .menu li' : 'show'
active: ->
super
@el.scroll() # trick lazyload
show: (e) =>
target = e.currentTarget
type = $(target).data('type')
$(target).addClass('... | Fix IE10 bug on guide | Fix IE10 bug on guide
| CoffeeScript | apache-2.0 | zooniverse/Lens-Zoo,zooniverse/Lens-Zoo,drphilmarshall/Lens-Zoo,drphilmarshall/Lens-Zoo,drphilmarshall/Lens-Zoo,drphilmarshall/Lens-Zoo,zooniverse/Lens-Zoo,zooniverse/Lens-Zoo |
78e9adf0b70747f8138db7cd7ad4fc955d34fb36 | src/cli.coffee | src/cli.coffee | {existsSync} = require './utils'
{join} = require 'path'
settingsPath = join process.env.HOME, '.config', '/au'
if existsSync settingsPath
settings = require settingsPath or {}
program = require('commander')
.version(require('../package.json').version)
help = -> console.log program.helpInformation()
program
... | {existsSync} = require './utils'
{join} = require 'path'
settingsPath = join process.env.HOME, '.config', 'au.json'
if existsSync settingsPath
settings = require settingsPath or {}
program = require('commander')
.version(require('../package.json').version)
help = -> console.log program.helpInformation()
program... | Use ~/.config/au.json to store settings. | Use ~/.config/au.json to store settings.
| CoffeeScript | mit | activeuser/au |
ac1c7c8446209ee24c40395e3b2a63eff6ce8a05 | snippets.cson | snippets.cson | # Your snippets
#
# Atom snippets allow you to enter a simple prefix in the editor and hit tab to
# expand the prefix into a larger code block with templated values.
#
# You can create a new snippet in this file by typing "snip" and then hitting
# tab.
#
# An example CoffeeScript snippet to expand log to console.log:
#... | # Your snippets
#
# Atom snippets allow you to enter a simple prefix in the editor and hit tab to
# expand the prefix into a larger code block with templated values.
#
# You can create a new snippet in this file by typing "snip" and then hitting
# tab.
#
# An example CoffeeScript snippet to expand log to console.log:
#... | Rename context snippet to con | Rename context snippet to con
| CoffeeScript | mit | substantial/atomfiles,substantial/atomfiles |
a9849dc7e93af2fc2781888cf0163ea6d1bad87b | models/report/remodel-item.coffee | models/report/remodel-item.coffee | mongoose = require 'mongoose'
Schema = mongoose.Schema
RemodelItemRecord = new Schema
successful: Boolean
itemId: Number
itemLevel: Number
flagshipId: Number
flagshipLevel: Number
flagshipCond: Number
consortId: Number
consortLevel: Number
consortCond: Number
teitokuLv: Number
RemodelItemRecord.vi... | mongoose = require 'mongoose'
Schema = mongoose.Schema
RemodelItemRecord = new Schema
successful: Boolean
itemId: Number
itemLevel: Number
flagshipId: Number
flagshipLevel: Number
flagshipCond: Number
consortId: Number
consortLevel: Number
consortCond: Number
teitokuLv: Number
certain: Boolean
R... | Add certain flag for remodel item | Add certain flag for remodel item
| CoffeeScript | mit | poooi/poi-server,yudachi/poi-server,poooi/poi-server,yudachi/poi-server,poooi/poi-server |
4900a2a32ce86c08e249d4bff92361db4f5ebc98 | app/assets/javascripts/views/search-tab.coffee | app/assets/javascripts/views/search-tab.coffee | Dashboard.SearchTab = Ember.View.extend
type: 'view'
templateName: 'search-tab'
routeName: ''
tagName: ''
routeParams: (->
@get('controller.searchRouteParams')
).property('controller.searchRouteParams')
hasSearch: (->
hasSearch = false
$.map @get('controller.search'), (value)=>
if val... | Dashboard.SearchTab = Ember.View.extend
type: 'view'
templateName: 'search-tab'
routeName: ''
tagName: ''
routeParams: (->
@get('controller.searchRouteParams')
).property('controller.searchRouteParams')
hasSearch: (->
hasValues = (values)->
results = []
$.map values, (value)=>
... | Fix hasSearch method, it wasn't working with sublevel of a object | Fix hasSearch method, it wasn't working with sublevel of a object
| CoffeeScript | mit | FromUte/dune-dashboard,FromUte/dune-dashboard,FromUte/dune-dashboard |
448c76855f29dcc90a2e5c442dac8a9c3c5a3281 | coffee/cilantro/ui/base.coffee | coffee/cilantro/ui/base.coffee | define [
'./core'
], (c) ->
class StateView extends c.Marionette.ItemView
constructor: ->
super
if not @template?
if @options.template
@template = @options.template
else
html = []
if (... | define [
'./core'
], (c) ->
class StateView extends c.Marionette.ItemView
constructor: ->
super
if not @template?
if @options.template
@template = @options.template
else
html = []
if (... | Fix incorrect subclass for LoadView | Fix incorrect subclass for LoadView | CoffeeScript | bsd-2-clause | chop-dbhi/cilantro,chop-dbhi/cilantro,chop-dbhi/cilantro |
5806bec756d76139b1444e33da1197967d4bcfc4 | lib/index.coffee | lib/index.coffee | {_, Document} = require 'atom'
SettingsView = null
settingsView = null
configUri = 'atom://config'
createSettingsView = (state) ->
SettingsView ?= require './settings-view'
unless state instanceof Document
state = _.extend({deserializer: deserializer.name, version: deserializer.version}, state)
state = a... | {_, Document} = require 'atom'
SettingsView = null
settingsView = null
configUri = 'atom://config'
createSettingsView = (state) ->
SettingsView ?= require './settings-view'
unless state instanceof Document
state = _.extend({deserializer: deserializer.name, version: deserializer.version}, state)
state = a... | Add atom prefix to rootView and project | Add atom prefix to rootView and project
| CoffeeScript | mit | atom/settings-view |
a9a54306b81b86f4afddfbf5e0a82a553d979efe | coffeescript/greeter.coffee | coffeescript/greeter.coffee | person =
name: 'Alice'
tryToSayHelloButFail: (delay) ->
setTimeout (() -> console.log "Hi... from #{@name}"), delay
sayHelloUsingAnExtraVariable: (delay) ->
self = this
setTimeout (() -> console.log "Hi from #{self.name}!"), delay
sayHello: (delay) ->
setTimeout (() => console.log "Hi from #{@na... | person =
name: 'Alice'
tryToSayHelloButFail: (delay) ->
setTimeout (() -> console.log "Hi from #{@name} :("), delay
sayHello: (delay) ->
setTimeout (() => console.log "Hi from #{@name} :)"), delay
person.tryToSayHelloButFail(1000) # Hi from undefined :(
person.sayHello(1000) ... | Simplify thin/fat arrow comparison example | Simplify thin/fat arrow comparison example
| CoffeeScript | mit | rtoal/ple,rtoal/polyglot,rtoal/polyglot,rtoal/polyglot,rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/ple,rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/polyglot,rtoal/polyglot,rtoal/ple,rtoal/polyglot,rtoal/polyglot,rtoal/ple,rtoal/ple,... |
8b53d9efe648f10e0572c2d8017489d0d3bb4755 | app/assets/javascripts/project_show.js.coffee | app/assets/javascripts/project_show.js.coffee | class @ProjectShow
constructor: ->
$('.project-home-panel .star').on 'ajax:success', (e, data, status, xhr) ->
$(@).toggleClass('on').find('.count').html(data.star_count)
.on 'ajax:error', (e, xhr, status, error) ->
new Flash('Star toggle failed. Try again later.', 'alert')
$("a[data-toggle='... | class @ProjectShow
constructor: ->
$('.project-home-panel .star').on 'ajax:success', (e, data, status, xhr) ->
$(@).toggleClass('on').find('.count').html(data.star_count)
.on 'ajax:error', (e, xhr, status, error) ->
new Flash('Star toggle failed. Try again later.', 'alert')
$("a[data-toggle='... | Fix bug with active tab remembering (saving cookie with different path) | Fix bug with active tab remembering (saving cookie with different path)
| CoffeeScript | mit | hzy001/gitlabhq,lvfeng1130/gitlabhq,gopeter/gitlabhq,stoplightio/gitlabhq,mrb/gitlabhq,mr-dxdy/gitlabhq,stanhu/gitlabhq,per-garden/gitlabhq,MauriceMohlek/gitlabhq,per-garden/gitlabhq,dvrylc/gitlabhq,NKMR6194/gitlabhq,jirutka/gitlabhq,fgbreel/gitlabhq,mente/gitlabhq,initiummedia/gitlabhq,michaKFromParis/sparkslab,lvfeng... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.