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 |
|---|---|---|---|---|---|---|---|---|---|
4318225bef16ed1b3736c4d233d71c28e245a15c | test/models/time_entry.coffee | test/models/time_entry.coffee | TimeEntry = require '../../models/time_entry'
should = require 'should'
makeT = (offset = 10) ->
t = new TimeEntry
start: new Date() - 5
end: new Date() - offset
message: 'message goes here'
userId: 'someuserID'
projectId: 'someprojectID'
describe 'TimeEntry Model', ->
it 'should be able to cr... | TimeEntry = require '../../models/time_entry'
should = require 'should'
makeT = (offset = 10) ->
t = new TimeEntry
start: new Date() - 5
end: new Date() - offset
message: 'message goes here'
userId: 'someuserID'
projectId: 'someprojectID'
describe 'TimeEntry Model', ->
it 'should be able to cr... | Add model time entry test for duration | Add model time entry test for duration
| CoffeeScript | bsd-3-clause | t3mpus/tempus-api |
d9ae8a750388bfc0a62f7d18a984a85393d5fdce | app/assets/javascripts/events_calendar.js.coffee | app/assets/javascripts/events_calendar.js.coffee | $(document).on 'page:change', ->
container = $('#events-calendar')
eventUpdate = (event)->
url = "/events/#{event.id}"
data =
start_time: event.start.toJSON()
end_time: event.end.toJSON()
$.ajax "/events/#{event.id}",
type: 'PATCH'
dataType: 'json'
data: { event: data... | $(document).on 'page:change', ->
container = $('#events-calendar')
eventUpdate = (event)->
url = "/events/#{event.id}"
data =
start_time: event.start.toISOString()
end_time: event.end.toISOString()
$.ajax "/events/#{event.id}",
type: 'PATCH'
dataType: 'json'
data: { e... | Use ISO format for calendar events to avoid problems with TZ | Use ISO format for calendar events to avoid problems with TZ
| CoffeeScript | mit | hwuethrich/scoobar,hwuethrich/scoobar |
843fea67323932e810043c44bc58155e7f39b58b | src/coffee/controllers/starting-points.coffee | src/coffee/controllers/starting-points.coffee | define ['lodash'], (L) -> Array '$rootScope', '$scope', '$http', (root, scope, http) ->
root.startingPoints = []
http.get("/tools", {params: {capabilities: "initial"}})
.then ({data}) -> root.startingPoints = data
scope.expandTool = (tool) ->
for other in scope.startingPoints when other isnt tool
... | define ['lodash'], (L) -> Array '$rootScope', '$scope', '$http', 'Histories', (root, scope, http, Histories) ->
root.startingPoints = []
http.get("/tools", {params: {capabilities: "initial"}})
.then ({data}) -> root.startingPoints = data
scope.expandTool = (tool) ->
for other in scope.startingPoints ... | Move some methods to a lower point. Handle history creation. | Move some methods to a lower point. Handle history creation.
| CoffeeScript | bsd-2-clause | joshkh/staircase,yochannah/staircase,yochannah/staircase,joshkh/staircase,joshkh/staircase,yochannah/staircase |
c00e490f6083521dcefcb4a0bc0eb6b803959865 | grammars/vp.cson | grammars/vp.cson | 'scopeName': 'source.vp'
'name': 'Valkyrie Profile'
'fileTypes': ['vp']
'patterns': [
{
'match': '^[^\t]*$',
'name': 'entity name function vp'
},
{
'match': '^\t{2}.*$'
'name': 'constant language vp'
}
]
| 'scopeName': 'source.vp'
'name': 'Valkyrie Profile'
'fileTypes': ['vp']
'patterns': [
{
'match': '^---$'
'name': 'keyword language vp'
},
{
'match': '^[^\t]*$',
'name': 'entity name function vp'
},
{
'match': '^\t{2}.*$'
'name': 'constant language vp'
}
]
| Add support for --- keyword (transition) | Add support for --- keyword (transition)
| CoffeeScript | mit | MalikKeio/language-vp |
c5776e1b9bdd4f67b0e0576fcf36291993f8e40d | 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... | Rename filePath local var to uri because that's more accurate | Rename filePath local var to uri because that's more accurate | CoffeeScript | mit | atom/settings-view |
ec7ab106668f4260055ee7e617c6a3f890e098d7 | lib/panel.coffee | lib/panel.coffee | class Panel
constructor: (@Linter)->
registerView: (View)->
@View = View
@View.Model = this
module.exports = Panel | class Panel
constructor: (@Linter)->
@Decorations = []
@Type = 'file'
registerView: (View)->
@View = View
@View.Model = this
removeDecorations: ->
@Decorations.forEach (decoration) ->
try decoration.destroy()
@Decorations = []
render: (Messages)->
@removeDecorations()
Messa... | Add render and removeDecorations to Panel Model | :new: Add render and removeDecorations to Panel Model
| CoffeeScript | mit | steelbrain/linter,JohnMurga/linter,kaeluka/linter,DanPurdy/linter,iam4x/linter,mdgriffith/linter,AtomLinter/Linter,simurai/linter-plus,AsaAyers/linter,elkeis/linter,e-jigsaw/Linter,blakeembrey/linter,josa42/Linter,atom-community/linter,UltCombo/linter,Arcanemagus/linter,shawninder/linter,levity/linter |
de86aefcf78fb42ba868a9435821582d8570aa77 | src/packages/fuzzy-finder/lib/fuzzy-finder.coffee | src/packages/fuzzy-finder/lib/fuzzy-finder.coffee | _ = require 'underscore'
module.exports =
projectPaths: null
fuzzyFinderView: null
activate: (state) ->
rootView.command 'fuzzy-finder:toggle-file-finder', =>
@createView().toggleFileFinder()
rootView.command 'fuzzy-finder:toggle-buffer-finder', =>
@createView().toggleBufferFinder()
root... | _ = require 'underscore'
module.exports =
projectPaths: null
fuzzyFinderView: null
activate: (state) ->
rootView.command 'fuzzy-finder:toggle-file-finder', =>
@createView().toggleFileFinder()
rootView.command 'fuzzy-finder:toggle-buffer-finder', =>
@createView().toggleBufferFinder()
root... | Remove duplicate nulling out of view | Remove duplicate nulling out of view
| CoffeeScript | mit | mnquintana/atom,qskycolor/atom,sillvan/atom,jlord/atom,toqz/atom,hpham04/atom,ppamorim/atom,targeter21/atom,vjeux/atom,ironbox360/atom,CraZySacX/atom,cyzn/atom,alfredxing/atom,woss/atom,darwin/atom,codex8/atom,sekcheong/atom,champagnez/atom,andrewleverette/atom,Andrey-Pavlov/atom,Abdillah/atom,stuartquin/atom,acontrera... |
f407c22d94174bc417a048b4e3bc4dfeebdb2682 | config/settings.defaults.coffee | 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 | fancycharts/clsi-sharelatex,fancycharts/clsi-sharelatex,EDP-Sciences/clsi-sharelatex,sharelatex/clsi-sharelatex,dwrensha/clsi-sharelatex,sharelatex/clsi-sharelatex,dwrensha/clsi-sharelatex |
8d9025b8396504bf4eefd43cc68ad9eba7aebd57 | atom/snippets.cson | atom/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:
#... | Add snippet for Mocha test statement | atom: Add snippet for Mocha test statement
| CoffeeScript | mit | jocelynjeffrey/mydotfiles,jocelynjeffrey/mydotfiles,nicksp/dotfiles,nicksp/dotfiles,nicksp/dotfiles,nicksp/dotfiles,jocelynjeffrey/mydotfiles |
71887f291142da192b05f3b455a5eaddfc03e78d | app/assets/javascripts/answers.js.coffee | app/assets/javascripts/answers.js.coffee | App.Answers =
nestedAnswers: ->
$('.nested-answers').on 'cocoon:after-insert', (e, insertedItem) ->
nestedAnswersCount = $("input[type='hidden'][name$='[given_order]']").size()
$(insertedItem).find("input[type='hidden'][name$='[given_order]']").val(nestedAnswersCount)
initialize: ->
App.Answer... | App.Answers =
initializeAnswers: (answers) ->
$(answers).on 'cocoon:after-insert', (e, new_answer) ->
given_order = App.Answers.maxGivenOrder(answers) + 1
$(new_answer).find("[name$='[given_order]']").val(given_order)
maxGivenOrder: (answers) ->
max_order = 0
$(answers).find("[name$='[give... | Initialize answers 'after-insert' callback to keep answers order | Initialize answers 'after-insert' callback to keep answers order
Also provide a function to initialize new set of answers 'affer-insert'
callback after adding new questions.
| CoffeeScript | agpl-3.0 | usabi/consul_san_borondon,usabi/consul_san_borondon,consul/consul,consul/consul,AyuntamientoPuertoReal/decidePuertoReal,consul/consul,consul/consul,AyuntamientoPuertoReal/decidePuertoReal,AyuntamientoPuertoReal/decidePuertoReal,consul/consul,usabi/consul_san_borondon,usabi/consul_san_borondon |
08c3da680d195f027da462e96df71acde14b0ea0 | api/models/UserPassword.coffee | api/models/UserPassword.coffee | module.exports =
# Turn off migrations.
migrate: 'safe'
# Turn off auto fields.
autoCreatedAt: false
autoUpdatedAt: false
autoPK: false
# Validation rules.
attributes:
user_id:
type: 'string'
hexadecimal: true
required: true
email:
type: 'string'
email: true
... | module.exports =
# Turn off migrations.
migrate: 'safe'
# Turn off auto fields.
autoCreatedAt: off
autoUpdatedAt: off
autoPK: off
# Validation rules.
attributes:
user_id:
type: 'string'
hexadecimal: yes
required: yes
email:
type: 'string'
email: yes
required... | Use boolean synonyms off and yes to make model human readable. | Use boolean synonyms off and yes to make model human readable.
| CoffeeScript | mit | DoSomething/quicksilver-api,DoSomething/quicksilver-api |
74aaa808658af9da657c67613b2f4110b17b8f7a | examples/listnr-examples.coffee | examples/listnr-examples.coffee | Listnr = @Listnr
createEl = (tag) ->
document.createElement(tag)
div = createEl('div')
div.innerHTML = """
<dl>
<dt>Context:</dt>
<dd id="context"></dd>
<dt>Action:</dt>
<dd id="action"></dd>
</dl>
"""
document.body.appendChild(div)
listnr = new Listnr()
setContext = (ctx) ->
document
.g... | Listnr = @Listnr
createEl = (tag) ->
document.createElement(tag)
div = createEl('div')
div.innerHTML = """
<dl>
<dt>Context:</dt>
<dd id="context"></dd>
<dt>Action:</dt>
<dd id="action"></dd>
</dl>
<pre id="help">
</pre>
"""
document.body.appendChild(div)
listnr = new Listnr()
setContext =... | Update example with help text | Update example with help text
| CoffeeScript | isc | myme/listnr |
2eefb4e4b1b6ee5a17ebaa9b27982cec93e6851e | extension/packages/hints.coffee | extension/packages/hints.coffee | { Marker } = require 'marker'
{ interfaces: Ci } = Components
HTMLDocument = Ci.nsIDOMHTMLDocument
XULDocument = Ci.nsIDOMXULDocument
CONTAINER_ID = 'VimFxHintMarkerContainer'
createHintsContainer = (document) ->
container = document.createElement('div')
container.id = CONTAINER_ID
container.className = 'V... | { Marker } = require 'marker'
{ interfaces: Ci } = Components
HTMLDocument = Ci.nsIDOMHTMLDocument
XULDocument = Ci.nsIDOMXULDocument
CONTAINER_ID = 'VimFxHintMarkerContainer'
createHintsContainer = (document) ->
container = document.createElement('div')
container.id = CONTAINER_ID
container.className = 'V... | Fix `injectHints` might return undefined markers | Fix `injectHints` might return undefined markers
The `inner` function of `injectHints` now returns an empty array instead
of undefined if no markers could be produced, since all results of the
`inner` function are recursively concatenated. VimFx seems to have worked
well even though some entries in the array of marker... | CoffeeScript | mit | m-r-r/VimFx |
913ed0ebb6acb3c15ac567435cedc7d1ec75d290 | client/ide/workspace/workspacelayoutbuilder.coffee | client/ide/workspace/workspacelayoutbuilder.coffee | class WorkspaceLayoutBuilder extends KDSplitComboView
init: ->
@splitViews = {}
{direction, sizes, views, cssClass, splitName} = @getOption 'layoutOptions'
@baseSplitName = splitName
splitOptions = {
type : direction
viewsConfig : views
sizes
cssClass
}
@a... | class WorkspaceLayoutBuilder extends KDSplitComboView
init: ->
@splitViews = {}
{direction, sizes, views, cssClass, splitName} = @getOption 'layoutOptions'
@baseSplitName = splitName
splitOptions = {
type : direction
viewsConfig : views
sizes
cssClass
}
@a... | Make split view class optional in layout builder. | Make split view class optional in layout builder.
| CoffeeScript | agpl-3.0 | mertaytore/koding,cihangir/koding,jack89129/koding,sinan/koding,sinan/koding,drewsetski/koding,sinan/koding,drewsetski/koding,cihangir/koding,rjeczalik/koding,sinan/koding,cihangir/koding,sinan/koding,gokmen/koding,gokmen/koding,alex-ionochkin/koding,kwagdy/koding-1,cihangir/koding,kwagdy/koding-1,drewsetski/koding,mer... |
e2978dafcdedb665c2d1566fe87aeb681d2fe1eb | lib/side-view.coffee | lib/side-view.coffee | {View, $} = require 'atom'
module.exports =
class SideView extends View
@content: (side) ->
@div class: "side #{side.klass()} ui-site-#{side.site()}", =>
@div class: 'controls', =>
@label class: 'text-highlight', side.ref
@span class: 'text-subtle', "// #{side.description()}"
@butto... | {View, $} = require 'atom'
module.exports =
class SideView extends View
@content: (side) ->
@div class: "side #{side.klass()} ui-site-#{side.site()}", =>
@div class: 'controls', =>
@label class: 'text-highlight', side.ref
@span class: 'text-subtle', "// #{side.description()}"
@butto... | Apply line styles on display-updated. | Apply line styles on display-updated.
... but only after we've received a marker change event.
| CoffeeScript | mit | smashwilson/merge-conflicts,antcodd/merge-conflicts,smashwilson/merge-conflicts |
0f8c0f928ba7d3b6bb4f1b20f18848bb2da70621 | test/e2e/imageDetailSpec.coffee | test/e2e/imageDetailSpec.coffee | _ = require 'lodash'
expect = require('./helpers/expect')()
Page = require('./helpers/page')()
class ImageDetailPage extends Page
displayPanel: ->
this.select('qi-series-image')
describe 'E2E Testing Image Detail', ->
page = null
beforeEach ->
page = new ImageDetailPage '/quip/breast/subject/1/sessio... | _ = require 'lodash'
expect = require('./helpers/expect')()
Page = require('./helpers/page')()
class ImageDetailPage extends Page
displayPanel: ->
this.select('qi-series-image')
describe 'E2E Testing Image Detail', ->
page = null
beforeEach ->
page = new ImageDetailPage '/quip/sarcoma/subject/1/sessi... | Use the sarcoma test fixture. | Use the sarcoma test fixture.
| CoffeeScript | bsd-2-clause | ohsu-qin/qiprofile,ohsu-qin/qiprofile,ohsu-qin/qiprofile,ohsu-qin/qiprofile |
cd3b0f9d59364a737694834e6e28971db5ee8211 | apps/home_2/view_helpers.coffee | apps/home_2/view_helpers.coffee | { timespanInWords } = require '../../components/util/date_helpers.coffee'
module.exports =
viewAllUrl: (module) ->
if module.key is 'related_artists'
return module.context.artist.href
return module.context.href if module.context
urls =
active_bids: false
followed_artists: '/works-for-... | { timespanInWords } = require '../../components/util/date_helpers.coffee'
module.exports =
viewAllUrl: (module) ->
if module.key is 'related_artists'
return module.context.artist.href
return module.context.href if module.context
urls =
active_bids: false
followed_artists: '/works-for-... | Add hash to view all link to jump user down to gallery section | Add hash to view all link to jump user down to gallery section
| CoffeeScript | mit | xtina-starr/force,kanaabe/force,kanaabe/force,izakp/force,erikdstock/force,mzikherman/force,damassi/force,artsy/force,eessex/force,anandaroop/force,eessex/force,kanaabe/force,damassi/force,erikdstock/force,xtina-starr/force,xtina-starr/force,cavvia/force-1,erikdstock/force,artsy/force-public,dblock/force,izakp/force,ox... |
c4e34812eac8ce02dd76ea4252b9a590fa57ad0a | components/block_v2/view.coffee | components/block_v2/view.coffee | Backbone = require 'backbone'
Block = require '../../models/block.coffee'
ConnectView = require '../connect/client/connect_view.coffee'
analytics = require '../../lib/analytics.coffee'
mediator = require '../../lib/mediator.coffee'
BlockCollectionConnectIntegrationView = require '../connect_v2/integration/block_collect... | Backbone = require 'backbone'
Block = require '../../models/block.coffee'
ConnectView = require '../connect/client/connect_view.coffee'
analytics = require '../../lib/analytics.coffee'
mediator = require '../../lib/mediator.coffee'
BlockCollectionConnectIntegrationView = require '../connect_v2/integration/block_collect... | Fix target and add class when block has fetched | Fix target and add class when block has fetched
| CoffeeScript | mit | aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell |
3744c68acc0408917ff9c57b96bc7919a1dcb30e | app/assets/javascripts/toc.js.coffee | app/assets/javascripts/toc.js.coffee | jQuery ->
updateToc = =>
$(".toc").find("li").each ->
if $(@).find("a")[0].href == window.location.href
$(@).addClass("active")
else
$(@).removeClass("active")
$(".part").each ->
if ($(@).attr("id") || "") == window.location.hash.substring(1)
$(@).s... | jQuery ->
updateToc = =>
$(".toc").find("li").each ->
if $(@).find("a")[0].href == window.location.href
$(@).addClass("active")
else
$(@).removeClass("active")
$(".part").each ->
if ($(@).attr("id") || "") == window.location.hash.substring(1)
$(@).s... | Use a default text title | Use a default text title
| CoffeeScript | mit | twin/synergy,twin/synergy |
a2ef3626dff9767d5693dbd0de07adac66835a2d | src/scripts/helpers/backbone/views/attached/tooltip/tooltip.coffee | src/scripts/helpers/backbone/views/attached/tooltip/tooltip.coffee | define (require) ->
BaseView = require('cs!helpers/backbone/views/base')
template = require('hbs!helpers/backbone/views/attached/tooltip/tooltip-template')
require('less!helpers/backbone/views/attached/tooltip/tooltip')
return class Tooltip extends BaseView
containerTemplate: template
type: 'tooltip'
... | define (require) ->
BaseView = require('cs!helpers/backbone/views/base')
template = require('hbs!helpers/backbone/views/attached/tooltip/tooltip-template')
require('less!helpers/backbone/views/attached/tooltip/tooltip')
return class Tooltip extends BaseView
containerTemplate: template
type: 'tooltip'
... | Add trigger event to parent view on show | Add trigger event to parent view on show
| CoffeeScript | agpl-3.0 | Connexions/webview,dak/webview,katalysteducation/webview,carolinelane10/webview,dak/webview,Connexions/webview,katalysteducation/webview,Connexions/webview,katalysteducation/webview,katalysteducation/webview,Connexions/webview,dak/webview |
b999394ff5d53fb6481a821cd826bb9234a0fa52 | src/test/mock.coffee | src/test/mock.coffee | define (require) ->
$ = require('jquery')
require('mockjax')
# GET
$.mockjax (settings) ->
# settings.url == '/contents/<uuid>'
service = settings.url.match(/\/contents\/(.*)$/)
if service
return {proxy: 'data/' + service[1] + '.json'}
$.mockjax (settings) ->
# settings.url == '/sear... | define (require) ->
$ = require('jquery')
require('mockjax')
$.mockjaxSettings.responseTime = 500 # Set the mock latency for all requests
# GET
$.mockjax (settings) ->
# settings.url == '/contents/<uuid>'
service = settings.url.match(/\/contents\/(.*)$/)
if service
return {proxy: 'data/'... | Add response time global setting option to file | Add response time global setting option to file
| CoffeeScript | agpl-3.0 | dak/webview,Connexions/webview,katalysteducation/webview,Connexions/webview,Connexions/webview,dak/webview,katalysteducation/webview,katalysteducation/webview,carolinelane10/webview,Connexions/webview,katalysteducation/webview,dak/webview |
9033db80d0db27e1d08e4f345a41382709fe9852 | tests/smtp-testing/index.coffee | tests/smtp-testing/index.coffee | smtp = require 'simplesmtp'
module.exports = SMTPTesting = {}
SMTPTesting.mailStore = []
SMTPTesting.lastConnection = {}
queueID = 0
# to be overidden
SMTPTesting.onSecondMessage = (env, callback) ->
callback null
SMTPTesting.init = (port, done) ->
smtpServer = smtp.createServer
debug: false
... | smtp = require 'simplesmtp'
module.exports = SMTPTesting = {}
SMTPTesting.mailStore = []
SMTPTesting.lastConnection = {}
queueID = 0
# to be overidden
SMTPTesting.onSecondMessage = (env, callback) ->
callback null
SMTPTesting.init = (port, done) ->
smtpServer = smtp.createServer
debug: false
... | Fix usage of SMTPTesting through CLI | Fix usage of SMTPTesting through CLI
| CoffeeScript | mit | cozy-labs/emails,robinmoussu/cozy-emails,poupotte/cozy-emails,poupotte/cozy-emails,cozy/cozy-emails,lemelon/cozy-emails,robinmoussu/cozy-emails,clochix/cozy-emails,cozy/cozy-emails,lemelon/cozy-emails,frankrousseau/cozy-emails,cozy-labs/emails,aenario/cozy-emails,clochix/cozy-emails,aenario/cozy-emails,nono/cozy-emails... |
aeb5f9d134ac4a591e0ddb4a7b9221c05344bbd7 | api/resources/schedule.coffee | api/resources/schedule.coffee | http = require '../../lib/http'
schedule = require '../../data/schedule'
exports.register = (server, baseRoute) ->
http.get server, "#{baseRoute}/schedule", get
get = ->
# TODO: get from Google API profile call
googleId = 'foo'
schedule.fetch(googleId)
.then (schedule) ->
userDisplayName: 'Joe User... | http = require '../../lib/http'
schedule = require '../../data/schedule'
exports.register = (server, baseRoute) ->
http.get server, "#{baseRoute}/schedule", fetch
fetch = ->
# TODO: get from Google API profile call
googleId = 'foo'
schedule.fetch(googleId)
.then (schedule) ->
userDisplayName: 'Joe ... | Rename 'get' function to 'fetch' for consistency | Rename 'get' function to 'fetch'
for consistency
| CoffeeScript | mit | RadBus/api |
b295e3f739e09d1bed589938fd283e4f3048b833 | lib/stack-ide-atom.coffee | lib/stack-ide-atom.coffee | AtomStackIdeView = require './stack-ide-atom-view'
{CompositeDisposable} = require 'atom'
haskell = require('./haskell/generated/haskell')
p = haskell.getPackage()
console.log p
module.exports = AtomStackIde =
atomStackIdeView: null
modalPanel: null
subscriptions: null
activate: (state) ->
@atomStackIdeV... | AtomStackIdeView = require './stack-ide-atom-view'
{CompositeDisposable} = require 'atom'
haskell = require('./haskell/generated/haskell')
module.exports = haskell.getPackage()
###
module.exports = AtomStackIde =
atomStackIdeView: null
modalPanel: null
subscriptions: null
activate: (state) ->
@atomStack... | Use haskell package as actual package | Use haskell package as actual package
| CoffeeScript | mit | CRogers/stack-ide-atom,CRogers/stack-ide-atom |
a5d7a9a6dc2cb2add865b5c47c01be280d08d302 | menus/list-edit.cson | menus/list-edit.cson | # See https://atom.io/docs/latest/hacking-atom-package-word-count#menus for more details
# TODO: Do we really want these in the context menu? Might be too much clutter.
'context-menu':
'atom-text-editor': [
{
'label': 'Select List Element'
'command': 'list-edit:select'
}
{
'label': 'Cut ... | # See https://atom.io/docs/latest/hacking-atom-package-word-count#menus for more details
# TODO: Do we really want these in the context menu? Might be too much clutter.
'context-menu':
'atom-text-editor': [
label: 'List edit'
submenu: [
{
'label': 'Select'
'command': 'list-edit:select'
... | Add submenu to context menu + Rename menu items | Add submenu to context menu + Rename menu items
| CoffeeScript | mit | Oblosys/atom-list-edit |
7d6f44bcb5423f1b47e14fc7063824a204907610 | client/app/books/model.coffee | client/app/books/model.coffee | App = require '../app'
attr = DS.attr
App.Book = DS.Model.extend
isbn: attr 'string'
title: attr 'string'
author: attr 'string'
prices: attr 'raw'
amazon: attr 'raw'
currentPrice: (->
ps = @get('prices')
ps[ps.length - 1]?.value or 0
).property('prices')
# second to last price
penultimateP... | App = require '../app'
attr = DS.attr
App.Book = DS.Model.extend
isbn: attr 'string'
title: attr 'string'
author: attr 'string'
prices: attr 'raw'
amazon: attr 'raw'
currentPrice: (->
ps = @get('prices')
ps?[ps.length - 1]?.value or 0
).property('prices')
# second to last price
penultimate... | Fix Computed Prices When Price is Unknown | Fix Computed Prices When Price is Unknown | CoffeeScript | mit | killercup/atric |
df376c753262464aecbe518cfe3ed23ae27b8a16 | collections/collaborators.coffee | collections/collaborators.coffee | #
# Collection for a channel's collaborators
#
Base = require "./base.coffee"
sd = require("sharify").data
User = require "../models/user.coffee"
mediator = require '../lib/mediator.coffee'
module.exports = class Collaborators extends Base
model: User
url: -> "#{sd.API_URL}/channels/#{@channel_slug}/collaborato... | #
# Collection for a channel's collaborators
#
Base = require "./base.coffee"
sd = require("sharify").data
User = require "../models/user.coffee"
mediator = require '../lib/mediator.coffee'
module.exports = class Collaborators extends Base
model: User
url: -> "#{sd.API_URL}/channels/#{@channel_slug}/collaborato... | Support adding collaborator via email | Support adding collaborator via email
| CoffeeScript | mit | aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell |
e8bfb7ca0951f5dd5ab585162246f32e34276bcd | src/space-pen-extensions.coffee | src/space-pen-extensions.coffee | _ = require 'underscore-plus'
spacePen = require 'space-pen'
ConfigObserver = require './config-observer'
{Subscriber} = require 'emissary'
_.extend spacePen.View.prototype, ConfigObserver
Subscriber.includeInto(spacePen.View)
jQuery = spacePen.jQuery
originalCleanData = jQuery.cleanData
jQuery.cleanData = (elements)... | _ = require 'underscore-plus'
spacePen = require 'space-pen'
ConfigObserver = require './config-observer'
{Subscriber} = require 'emissary'
_.extend spacePen.View.prototype, ConfigObserver
Subscriber.includeInto(spacePen.View)
jQuery = spacePen.jQuery
originalCleanData = jQuery.cleanData
jQuery.cleanData = (elements)... | Fix up things for kevin | Fix up things for kevin | CoffeeScript | mit | Jdesk/atom,niklabh/atom,pkdevbox/atom,bradgearon/atom,daxlab/atom,lovesnow/atom,me6iaton/atom,originye/atom,kc8wxm/atom,Sangaroonaom/atom,dkfiresky/atom,GHackAnonymous/atom,AlbertoBarrago/atom,codex8/atom,Hasimir/atom,xream/atom,NunoEdgarGub1/atom,kdheepak89/atom,charleswhchan/atom,amine7536/atom,hpham04/atom,liuderchi... |
4bfe9bee92caae44dc1bb6a83b6c73051f5fa11f | client/app/scripts/users.coffee | client/app/scripts/users.coffee | {div, span, header, i} = React.DOM
{form, input, label} = React.DOM
{ul, li} = React.DOM
user = React.createClass
render: ->
li className: 'user',
div className: 'user-name',
@props.nick
usersList = React.createClass
render: ->
users = @props.users.map (u) ->
user(u)
ul className: ... | {div, span, header, i} = React.DOM
{form, input, label} = React.DOM
{ul, li} = React.DOM
user = React.createClass
render: ->
li className: 'user',
div className: 'user-name',
@props.nick
usersList = React.createClass
render: ->
users = @props.users.map (u) ->
user(u)
ul className: ... | Remove change-room x, we are not using it | Remove change-room x, we are not using it
| CoffeeScript | mit | waltsu/unichat |
04a554f3be00339c2eddb547c26fe5b99cb86629 | src/atom/atom/config.cson | src/atom/atom/config.cson | "*":
core:
autoHideMenuBar: true
disabledPackages: [
"vim-mode"
]
editor:
fontSize: 10
invisibles: {}
scrollPastEnd: true
showIndentGuide: true
"exception-reporting":
userId: "d066aaa4-63cd-1f08-a0e5-c8efdcf5268d"
"git-plus": {}
"markdown-preview":
useGitHubStyle: tru... | "*":
core:
autoHideMenuBar: true
disabledPackages: [
"vim-mode"
]
editor:
fontSize: 10
invisibles: {}
scrollPastEnd: true
showIndentGuide: true
"exception-reporting":
userId: "d066aaa4-63cd-1f08-a0e5-c8efdcf5268d"
"git-plus": {}
"markdown-preview":
useGitHubStyle: tru... | Hide ignore names by default | [atom] Hide ignore names by default
| CoffeeScript | mit | wingy3181/dotfiles,wingy3181/dotfiles,wingy3181/dotfiles |
8e05ed7780ba6f564e809195b29294116ac22723 | assets/javascripts/controllers/room_user_state_item_controller.js.coffee | assets/javascripts/controllers/room_user_state_item_controller.js.coffee | App.RoomUserStateItemController = Em.ObjectController.extend
needs: ["application"]
currentUser: Ember.computed.alias("controllers.application.currentUser")
actions:
join: ->
console.log("hi", arguments)
room_item_state = @get("model")
console.log room_item_state.get("joined")
room_it... | App.RoomUserStateItemController = Em.ObjectController.extend
needs: ["application"]
currentUser: Ember.computed.alias("controllers.application.currentUser")
actions:
join: ->
room_item_state = @get("model")
room_item_state.set("joined", true)
successCallback = =>
console.log("save... | Update join state in RoomUserState | Update join state in RoomUserState
| CoffeeScript | mit | sashafklein/bloc-mogo,louishawkins/mogo-chat,di-stars/mogo-chat,HashNuke/mogo-chat,sashafklein/bloc-mogo,HashNuke/mogo-chat,sashafklein/bloc-mogo,di-stars/mogo-chat,HashNuke/mogo-chat,louishawkins/mogo-chat,di-stars/mogo-chat,louishawkins/mogo-chat |
65110e4de0b8960d185612b4df7854c9ba45d29d | lib/coffee-compile-editor.coffee | lib/coffee-compile-editor.coffee | {TextEditor} = require 'atom'
util = require './util'
pluginManager = require './plugin-manager'
module.exports =
class CoffeeCompileEditor extends TextEditor
constructor: ({@sourceEditor}) ->
super
if atom.config.get('coffee-compile.compileOnSave') and not
atom.config.get('coffee-compile.compileOnS... | {TextEditor} = require 'atom'
util = require './util'
pluginManager = require './plugin-manager'
module.exports =
class CoffeeCompileEditor extends TextEditor
constructor: ({@sourceEditor}) ->
super
if atom.config.get('coffee-compile.compileOnSave') and not
atom.config.get('coffee-compile.compileOnS... | Disable `save` on preview pane | Disable `save` on preview pane
Fixes #30
| CoffeeScript | mit | adrianlee44/atom-coffee-compile |
979e86909b95041f4825d6c1a301559d0b89b92d | lib/main.coffee | lib/main.coffee | {CompositeDisposable} = require 'atom'
HistoryView = null
ChangesView = null
HISTORY_URI = 'atom://git-experiment/view-history'
CHANGES_URI = 'atom://git-experiment/view-changes'
module.exports = GitExperiment =
subscriptions: null
activate: (state) ->
# Events subscribed to in atom's system can be easily cl... | {CompositeDisposable} = require 'atom'
HistoryView = null
ChangesView = null
HISTORY_URI = 'atom://git-experiment/view-history'
CHANGES_URI = 'atom://git-experiment/view-changes'
module.exports = GitExperiment =
subscriptions: null
activate: (state) ->
# Events subscribed to in atom's system can be easily cl... | Move opener registration into a nextTick. | Move opener registration into a nextTick.
Registering the openers is expensive for some reason | CoffeeScript | mit | atom/github,atom/github,atom/github |
f001be24f4ae5eb5fecb2e734001bd9a36bfe32d | app/assets/javascripts/discourse.js.coffee | app/assets/javascripts/discourse.js.coffee | ready = ->
# Jitsi Meet integration
if $('body').hasClass('c-discourse a-embed') > 0
$('#launch-jitsi').click ->
room = 'Fablabs.io-' + Math.random().toString(36).substr(2, 8)
domain = 'meet.jit.si'
jitsiUrl = "http://"+domain+"/"+room
$("#jitsi-url").replaceWith 'Invite other users fro... | ready = ->
# Jitsi Meet integration
if $('body').hasClass('c-discourse a-embed') > 0
$('#launch-jitsi').click ->
room = 'Fablabs.io-' + Math.random().toString(36).substr(2, 8)
domain = 'meet.jit.si'
jitsiUrl = "http://"+domain+"/"+room
$("#jitsi-url").replaceWith '<span class="label lab... | Add label to jitsi integration success | Add label to jitsi integration success
| CoffeeScript | agpl-3.0 | fablabbcn/fablabs,fablabbcn/fablabs,fablabbcn/fablabs |
69259b56f9836466cedab43185f8973f3526da5b | lib/minimap-find-and-replace.coffee | lib/minimap-find-and-replace.coffee | MinimapFindAndReplaceBinding = require './minimap-find-and-replace-binding'
module.exports =
binding: null
activate: (state) ->
findPackage = atom.packages.getLoadedPackage('find-and-replace')
minimapPackage = atom.packages.getLoadedPackage('minimap')
return @deactivate() unless findPackage? and minim... | MinimapFindAndReplaceBinding = require './minimap-find-and-replace-binding'
module.exports =
binding: null
activate: (state) ->
findPackage = atom.packages.getLoadedPackage('find-and-replace')
minimapPackage = atom.packages.getLoadedPackage('minimap')
return @deactivate() unless findPackage? and minim... | Fix missing minimap version check in plugin activation | :bug: Fix missing minimap version check in plugin activation
| CoffeeScript | mit | atom-minimap/minimap-find-and-replace |
1dce7fee34ffd8fc57c6d10d4f4cec189f380983 | lib/linter-python-flake8.coffee | lib/linter-python-flake8.coffee | linterPath = atom.packages.getLoadedPackage("linter").path
Linter = require "#{linterPath}/lib/linter"
class LinterFlake8 extends Linter
@syntax: ['source.python']
cmd: 'flake8'
executablePath: null
linterName: 'flake8'
# A regex pattern used to extract information from the executable's output.
regex:... | linterPath = atom.packages.getLoadedPackage("linter").path
Linter = require "#{linterPath}/lib/linter"
class LinterFlake8 extends Linter
@syntax: ['source.python']
cmd: 'flake8'
executablePath: null
linterName: 'flake8'
# A regex pattern used to extract information from the executable's output.
regex:... | Add options: max line length, ignore error codes | Add options: max line length, ignore error codes
Added option to specify maximum line length and ignore specified error codes | CoffeeScript | mit | AtomLinter/linter-flake8,patrys/linter-flake8,keras/linter-flake8 |
9cfb032b203ef2698eefdcf4b949ff7fc534707b | src/scripts/github-credentials.coffee | src/scripts/github-credentials.coffee | # Github Credentials allows you to map your user against your GitHub user.
# This is specifically in order to work with apps that have GitHub Oauth users.
#
# who do you know - List all the users with github logins tracked by Hubot
# i am `maddox` - map your user to the github login `maddox`
# who am i - reveal your ma... | # Github Credentials allows you to map your user against your GitHub user.
# This is specifically in order to work with apps that have GitHub Oauth users.
#
# who do you know - List all the users with github logins tracked by Hubot
# i am `maddox` - map your user to the github login `maddox`
# who am i - reveal your ma... | Support dashes in the github username | Support dashes in the github username
| CoffeeScript | mit | fromonesrc/hubot-scripts,contolini/hubot-scripts,terryjbates/hubot-scripts,wsoula/hubot-scripts,MaxMEllon/hubot-scripts,flores/hubot-scripts,opentable/hubot-scripts,github/hubot-scripts,Ev1l/hubot-scripts,justinwoo/hubot-scripts,azimman/hubot-scripts,cycomachead/hubot-scripts,modulexcite/hubot-scripts,jankowiakmaria/hu... |
59662c2f8934626acfd4c0849b267f3601b7b051 | lib/autocomplete-provider.coffee | lib/autocomplete-provider.coffee | BufferController = require './buffer-controller'
{Emitter} = require 'atom'
module.exports =
class AutocompleteProvider
selector: '.source.haskell'
blacklist: '.source.haskell .comment'
inclusionPriority: 1
excludeLowerPriority: false
info:
moduleList: []
langOpts: []
ghcFlags: []
emitter: null... | BufferController = require './buffer-controller'
{Emitter} = require 'atom'
module.exports =
class AutocompleteProvider
selector: '.source.haskell'
disableForSelector: '.source.haskell .comment'
inclusionPriority: 1
excludeLowerPriority: false
info:
moduleList: []
langOpts: []
ghcFlags: []
emit... | Fix deprecated ac+ blacklist option | Fix deprecated ac+ blacklist option
| CoffeeScript | mit | atom-haskell/autocomplete-haskell |
584659c86c88fe05ce7511d36200530e0a5b945a | scripts/govuk_app_owners.coffee | scripts/govuk_app_owners.coffee | # This script teaches Hubot to answer questions like "Who owns Collections Publisher?"
# and "Who owns publishing-api?"
module.exports = (robot) ->
robot.hear /who owns (.*)\?/i, (res) ->
# Best guess of the intended application.
application = res.match[1].replace(' ', '-').toLowerCase()
robot.http("http... | # This script teaches Hubot to answer questions like "Who owns Collections Publisher?"
# and "Who owns publishing-api?"
module.exports = (robot) ->
robot.hear /who owns (.*)\?/i, (res) ->
# Best guess of the intended application.
application = res.match[1].replace(/ /g, '-').toLowerCase()
console.log("Fet... | Fix replacing spaces in app names | Fix replacing spaces in app names
This previously would translate `email alert api` into `email-alert
api` not `email-alert-api`.
| CoffeeScript | mit | alphagov/gds-hubot |
fbccf2283b705efb1b2c4d60f406c3a66e6d6047 | client/ide/lib/views/tabview/idetabhandleview.coffee | client/ide/lib/views/tabview/idetabhandleview.coffee | kd = require 'kd'
KDTabHandleView = kd.TabHandleView
module.exports = class IDETabHandleView extends KDTabHandleView
constructor: (options = {}, data) ->
options.droppable ?= yes
options.bind = 'dragstart'
super options, data
dragStart: (event) ->
## workaround for FF and ... | kd = require 'kd'
KDTabHandleView = kd.TabHandleView
module.exports = class IDETabHandleView extends KDTabHandleView
constructor: (options = {}, data) ->
options.draggable ?= yes
options.bind = 'dragstart'
super options, data
setDraggable: ->
@setAttribute 'draggable', yes... | Remove droppable attribute and override already defined method about this | Remove droppable attribute and override already defined method about this
| CoffeeScript | agpl-3.0 | mertaytore/koding,kwagdy/koding-1,rjeczalik/koding,cihangir/koding,jack89129/koding,jack89129/koding,koding/koding,drewsetski/koding,cihangir/koding,sinan/koding,acbodine/koding,szkl/koding,acbodine/koding,acbodine/koding,rjeczalik/koding,koding/koding,kwagdy/koding-1,alex-ionochkin/koding,drewsetski/koding,kwagdy/kodi... |
db80ba6ac794284f88f1f3d8d7c1fd3ae9ef27f1 | src/beautifiers/prettier.coffee | src/beautifiers/prettier.coffee | "use strict"
Beautifier = require('./beautifier')
prettier = require("prettier")
module.exports = class Prettier extends Beautifier
name: "Prettier"
link: "https://github.com/prettier/prettier"
options: {
_:
tabWidth: "indent_size"
useTabs: ["indent_with_tabs", "indent_char", (indent_with_tabs, ... | "use strict"
Beautifier = require('./beautifier')
prettier = require("prettier")
module.exports = class Prettier extends Beautifier
name: "Prettier"
link: "https://github.com/prettier/prettier"
options: {
_:
tabWidth: "indent_size"
useTabs: ["indent_with_tabs", "indent_char", (indent_with_tabs, ... | Fix options not working from Atom UI and config file | Fix options not working from Atom UI and config file
| CoffeeScript | mit | Glavin001/atom-beautify,Glavin001/atom-beautify,Glavin001/atom-beautify,Glavin001/atom-beautify,Glavin001/atom-beautify |
b2e3e0ae38071f99e01f6afe6adae86fd51d4c19 | lib/linter.coffee | lib/linter.coffee | Path = require 'path'
{CompositeDisposable, Emitter} = require 'atom'
{LinterTrace, LinterMessage, LinterError, LinterWarning} = require './messages'
EditorLinter = require './editor-linter'
class Linter
constructor: ->
@Emitter = new Emitter
@Subscriptions = new CompositeDisposable
@EditorLinters = ne... | Path = require 'path'
{CompositeDisposable, Emitter} = require 'atom'
{LinterTrace, LinterMessage, LinterError, LinterWarning} = require './messages'
EditorLinter = require './editor-linter'
class Linter
constructor: ->
@Emitter = new Emitter
@Subscriptions = new CompositeDisposable
@EditorLinters = ne... | Fix a duplicate variable issue | :bug: Fix a duplicate variable issue
| CoffeeScript | mit | josa42/Linter,levity/linter,AtomLinter/Linter,iam4x/linter,elkeis/linter,kaeluka/linter,e-jigsaw/Linter,blakeembrey/linter,DanPurdy/linter,shawninder/linter,simurai/linter-plus,UltCombo/linter,atom-community/linter,JohnMurga/linter,Arcanemagus/linter,steelbrain/linter,AsaAyers/linter,mdgriffith/linter |
405bfa4440c16607a99d18b76c3db1bc8c2d4f7c | lineman/app/components/thread_page/position_buttons_panel/position_buttons_panel.coffee | lineman/app/components/thread_page/position_buttons_panel/position_buttons_panel.coffee | angular.module('loomioApp').directive 'positionButtonsPanel', ->
scope: {proposal: '='}
restrict: 'E'
templateUrl: 'generated/components/thread_page/position_buttons_panel/position_buttons_panel.html'
replace: true
controller: ($scope, ModalService, VoteForm, CurrentUser, Records) ->
$scope.showPositionB... | angular.module('loomioApp').directive 'positionButtonsPanel', ->
scope: {proposal: '='}
restrict: 'E'
templateUrl: 'generated/components/thread_page/position_buttons_panel/position_buttons_panel.html'
replace: true
controller: ($scope, ModalService, VoteForm, CurrentUser, Records, AbilityService) ->
$sco... | Fix for position buttons panel | Fix for position buttons panel
| CoffeeScript | agpl-3.0 | FSFTN/Loomio,loomio/loomio,piratas-ar/loomio,loomio/loomio,FSFTN/Loomio,mhjb/loomio,piratas-ar/loomio,sicambria/loomio,FSFTN/Loomio,loomio/loomio,mhjb/loomio,mhjb/loomio,sicambria/loomio,loomio/loomio,sicambria/loomio,mhjb/loomio,FSFTN/Loomio,piratas-ar/loomio,piratas-ar/loomio,sicambria/loomio |
385287489c46b7596c1af4c79d2edff0d68b3fd8 | assets/scripts/app/controllers/account.coffee | assets/scripts/app/controllers/account.coffee | Travis.AccountController = Ember.ObjectController.extend
allHooks: []
needs: ['currentUser']
userBinding: 'controllers.currentUser'
init: ->
@_super.apply this, arguments
self = this
Travis.on("user:synced", (->
self.reloadHooks()
))
toggle: (hook) ->
hook.toggle()
reloadHooks:... | Travis.AccountController = Ember.ObjectController.extend
allHooks: []
needs: ['currentUser']
userBinding: 'controllers.currentUser'
init: ->
@_super.apply this, arguments
self = this
Travis.on("user:synced", (->
self.reloadHooks()
))
actions:
sync: ->
@get('user').sync()
... | Fix toggling hooks on profile page | Fix toggling hooks on profile page
| CoffeeScript | mit | jlrigau/travis-web,travis-ci/travis-web,mjlambert/travis-web,Tiger66639/travis-web,travis-ci/travis-web,fotinakis/travis-web,travis-ci/travis-web,mjlambert/travis-web,jlrigau/travis-web,jlrigau/travis-web,Tiger66639/travis-web,Tiger66639/travis-web,fauxton/travis-web,fotinakis/travis-web,fauxton/travis-web,2947721120/t... |
458dea9780d6108757d1fdb815f67c1988b2ec3a | build/tasks/check-licenses-task.coffee | build/tasks/check-licenses-task.coffee |
module.exports = (grunt) ->
grunt.registerTask 'check-licenses', 'Report the licenses of all dependencies', ->
legalEagle = require 'legal-eagle'
{size, keys} = require 'underscore-plus'
done = @async()
options =
path: process.cwd()
omitPermissive: true
overrides: require './licens... |
module.exports = (grunt) ->
grunt.registerTask 'check-licenses', 'Report the licenses of all dependencies', ->
legalEagle = require 'legal-eagle'
{size, keys} = require 'underscore-plus'
done = @async()
options =
path: process.cwd()
omitPermissive: true
overrides: require './licens... | Allow language-coffee-script without a license for now | Allow language-coffee-script without a license for now | CoffeeScript | mit | lovesnow/atom,pkdevbox/atom,burodepeper/atom,avdg/atom,kc8wxm/atom,prembasumatary/atom,RobinTec/atom,jacekkopecky/atom,MjAbuz/atom,basarat/atom,omarhuanca/atom,jjz/atom,nrodriguez13/atom,qskycolor/atom,abcP9110/atom,batjko/atom,brumm/atom,wiggzz/atom,devoncarew/atom,rjattrill/atom,crazyquark/atom,mnquintana/atom,medovo... |
9b4b9cf5e86311d7d3b4ed44e10c036d9d24a2ec | models/organization.coffee | models/organization.coffee | mongoose = require 'mongoose'
timestamps = require 'mongoose-timestamps'
Schema = mongoose.Schema
db = mongoose.createConnection "mongodb://localhost:27017/badges-#{process.env.NODE_ENV}"
OrganizationSchema = new Schema
name: String
origin: String
org: String
contact: String
created_at: Date
updated_at: Da... | mongoose = require 'mongoose'
timestamps = require 'mongoose-timestamps'
Schema = mongoose.Schema
db = mongoose.createConnection "mongodb://localhost:27017/badges-#{process.env.NODE_ENV}"
OrganizationSchema = new Schema
name: String
origin: String
org: String
api_key: String
contact: String
created_at: Dat... | Add API key to the Organization model | Add API key to the Organization model
| CoffeeScript | mit | EverFi/Sash,EverFi/Sash,EverFi/Sash |
d19dbf79417a24bcb3d9ee2e5469acbda7d9ec74 | app/javascript/src/notice.coffee | app/javascript/src/notice.coffee | $ = jQuery
export default class Notice
constructor: ->
$ @initialize
hide: =>
$('#notice-container').hide()
initialize: =>
msg = Cookies.get 'notice'
return unless msg? && msg != ''
@show msg, true
Cookies.remove 'notice'
# If initial is true, this is a notice set by the notice... | $ = jQuery
export default class Notice
constructor: ->
$ @initialize
hide: =>
$('#notice-container').hide()
initialize: =>
msg = Cookies.get 'notice'
return unless msg? && msg != ''
@show msg, true
Cookies.remove 'notice'
# If initial is true, this is a notice set by the notice... | Use text instead of html | Use text instead of html
Safer, etc
| CoffeeScript | isc | moebooru/moebooru,nanaya/moebooru,nanaya/moebooru,moebooru/moebooru,nanaya/moebooru,nanaya/moebooru,moebooru/moebooru,moebooru/moebooru,nanaya/moebooru,moebooru/moebooru |
0381607c6e03bd43de4102d7f7b5ceb3766552bf | components/inquiry_questionnaire/views/specialist.coffee | components/inquiry_questionnaire/views/specialist.coffee | StepView = require './step.coffee'
Form = require '../../form/index.coffee'
Feedback = require '../../../models/feedback.coffee'
Representatives = require '../../../collections/representatives.coffee'
template = -> require('../templates/specialist.jade') arguments...
module.exports = class Specialist extends StepView
... | StepView = require './step.coffee'
Form = require '../../form/index.coffee'
Feedback = require '../../../models/feedback.coffee'
Representatives = require '../../../collections/representatives.coffee'
template = -> require('../templates/specialist.jade') arguments...
module.exports = class Specialist extends StepView
... | Use the explicit setup step | Use the explicit setup step
| CoffeeScript | mit | oxaudo/force,mzikherman/force,xtina-starr/force,eessex/force,erikdstock/force,kanaabe/force,joeyAghion/force,oxaudo/force,oxaudo/force,dblock/force,mzikherman/force,erikdstock/force,damassi/force,yuki24/force,artsy/force-public,anandaroop/force,erikdstock/force,anandaroop/force,damassi/force,eessex/force,artsy/force,db... |
5ffa497a68a08c335f986c51b9c2d5ec9a335342 | atom/config.cson | atom/config.cson | 'core':
'hideGitIgnoredFiles': true
'ignoredNames': [
'.DS_Store'
'.git'
'vendor'
]
'themes': [
'atom-dark-ui'
'solarized-dark-syntax'
]
'disabledPackages': []
'destroyEmptyPanes': false
'editor':
'fontSize': 13
'hideGitIgnoredFiles': true
'normalizeIndentOnPaste': false
'whitesp... | 'core':
'hideGitIgnoredFiles': true
'ignoredNames': [
'.DS_Store'
'.git'
'vendor'
]
'themes': [
'atom-dark-ui'
'solarized-dark-syntax'
]
'disabledPackages': []
'destroyEmptyPanes': false
'useReactEditor': true
'editor':
'fontSize': 13
'hideGitIgnoredFiles': true
'normalizeInden... | Use React editor in Atom | Use React editor in Atom
| CoffeeScript | mit | jasonrudolph/dotfiles,jasonrudolph/dotfiles,jasonrudolph/dotfiles,jasonrudolph/dotfiles |
bda30d77df6a04b9b2cfc8eb9cd5b3fe06f9bff7 | app/assets/asset/pdfViewer.coffee | app/assets/asset/pdfViewer.coffee | 'use strict'
app.directive 'pdfViewer', [
() ->
restrict: 'E'
scope:
asset: '=asset'
link: ($scope, $elem) ->
pdfElement = $($elem)[0]
objectTag = document.createElement('object')
objectTag.setAttribute('data', $scope.asset.downloadRoute(true))
objectTag.setAttribute('width... | 'use strict'
app.directive 'pdfViewer', [
() ->
restrict: 'E'
scope:
asset: '=asset'
link: ($scope, $elem) ->
pdfElement = $($elem)[0]
objectTag = document.createElement('object')
objectTag.setAttribute('data', $scope.asset.downloadRoute(true))
objectTag.setAttribute('width... | Set the type inside the directive. | Set the type inside the directive.
| CoffeeScript | agpl-3.0 | databrary/databrary,databrary/databrary,databrary/databrary,databrary/databrary |
76f5159d4094a2a75681946733069a688b897b7c | src/trix/elements/trix_toolbar_element.coffee | src/trix/elements/trix_toolbar_element.coffee | {cloneFragment, triggerEvent} = Trix
Trix.registerElement "trix-toolbar",
defaultCSS: """
%t {
white-space: collapse;
}
%t .dialog {
display: none;
}
%t .dialog.active {
display: block;
}
%t .dialog input.validate:invalid {
background-color: #ffdddd;
}
... | {cloneFragment, triggerEvent} = Trix
Trix.registerElement "trix-toolbar",
defaultCSS: """
%t {
white-space: collapse;
}
%t .dialog {
display: none;
}
%t .dialog.active {
display: block;
}
%t .dialog input.validate:invalid {
background-color: #ffdddd;
}
... | Remove unused "native" toolbar element attribute | Remove unused "native" toolbar element attribute
| CoffeeScript | mit | urossmolnik/trix,GabiGrin/trix,urossmolnik/trix,basecamp/trix,ChenMichael/trix,GabiGrin/trix,GabiGrin/trix,basecamp/trix,urossmolnik/trix,basecamp/trix,ChenMichael/trix,ChenMichael/trix,basecamp/trix |
6cd6cdbeb175f73204a68b5c5da185852bd63b50 | test/impromptu.coffee | test/impromptu.coffee | should = require 'should'
Impromptu = require '../src/impromptu'
describe 'Impromptu', ->
it 'should exist', ->
should.exist Impromptu
it 'should use semantic versions', ->
/^\d+\.\d+\.\d+(\D|$)/.test(Impromptu.VERSION).should.be.true
describe 'Impromptu.Error', ->
it 'should have a message', ->
e... | should = require 'should'
Impromptu = require '../src/impromptu'
describe 'Impromptu', ->
it 'should exist', ->
should.exist Impromptu
it 'should use semantic versions', ->
# https://github.com/coolaj86/semver-utils/blob/v1.0.1/semver-utils.js
regex = /^((\d+)\.(\d+)\.(\d+))(?:-([\dA-Za-z\-]+(?:\.[\d... | Use an insanely complicated regex to test for a semantic version | Use an insanely complicated regex to test for a semantic version
| CoffeeScript | mit | impromptu/impromptu,impromptu/impromptu |
69801927da49daa724899f0744301ba0e3a8ec9d | components/GetUserToken.coffee | components/GetUserToken.coffee | noflo = require 'noflo'
exports.getComponent = ->
c = new noflo.Component
c.description = 'Get user token from action'
c.icon = 'key'
c.inPorts.add 'in',
datatype: 'object'
c.outPorts.add 'token',
datatype: 'string'
c.outPorts.add 'out',
datatype: 'object'
c.outPorts.add 'error',
datatype... | noflo = require 'noflo'
octo = require 'octo'
exports.getComponent = ->
c = new noflo.Component
c.description = 'Get user token from action'
c.icon = 'key'
c.inPorts.add 'in',
datatype: 'object'
c.outPorts.add 'token',
datatype: 'string'
c.outPorts.add 'out',
datatype: 'object'
c.outPorts.add... | Check rate limit and warn user if about to be exceeded | Check rate limit and warn user if about to be exceeded
| CoffeeScript | mit | noflo/noflo-ui,noflo/noflo-ui |
1a4abf1d8ebcf6e207d958c4c81a4fd41bf0e7ad | bokehjs/src/coffee/models/transforms/jitter.coffee | bokehjs/src/coffee/models/transforms/jitter.coffee | _ = require "underscore"
Transform = require "./transform"
p = require "../../core/properties"
math = require "../../core/util/math"
class Jitter extends Transform.Model
initialize: (attrs, options) ->
super(attrs, options)
@define {
mean: [ p.Number, 0 ]
width: [ p.Number, 1... | _ = require "underscore"
Transform = require "./transform"
p = require "../../core/properties"
bokeh_math = require "../../core/util/math"
class Jitter extends Transform.Model
initialize: (attrs, options) ->
super(attrs, options)
@define {
mean: [ p.Number, 0 ]
width: [ p.Num... | Change imported name from "math" to "bokeh_math" to make it more obvious this is not related to the core JS "Math" facility. | Change imported name from "math" to "bokeh_math" to make it more obvious this is not related to the core JS "Math" facility.
| CoffeeScript | bsd-3-clause | DuCorey/bokeh,ptitjano/bokeh,rs2/bokeh,aavanian/bokeh,DuCorey/bokeh,percyfal/bokeh,percyfal/bokeh,ericmjl/bokeh,mindriot101/bokeh,rs2/bokeh,Karel-van-de-Plassche/bokeh,azjps/bokeh,ptitjano/bokeh,timsnyder/bokeh,DuCorey/bokeh,rs2/bokeh,bokeh/bokeh,quasiben/bokeh,phobson/bokeh,aiguofer/bokeh,philippjfr/bokeh,justacec/bok... |
8af63e78690cda78d8bb77c5dbf9061ebe8aa4c8 | app/assets/javascripts/data-tables-init.coffee | app/assets/javascripts/data-tables-init.coffee | $(document).on "page:change", ->
$(".data-table").each ->
table = $(@)
return if $.fn.dataTable.isDataTable(table)
options =
responsive: true
order: [[0, "desc"]]
ascColumn = table.find("th.sort-asc").index()
descColumn = table.find("th.sort-desc").index()
if (ascColumn >= 0)
... | $(document).on "page:change", ->
$(".data-table").each ->
table = $(@)
return if $.fn.dataTable.isDataTable(table)
options =
responsive: true
order: [[0, "desc"]]
pageLength: 25
ascColumn = table.find("th.sort-asc").index()
descColumn = table.find("th.sort-desc").index()
... | Add default page legth to 25 for datatable for readability | Add default page legth to 25 for datatable for readability
| CoffeeScript | mit | on-site/StockAid,on-site/StockAid,on-site/StockAid |
d0c72ebe160a958b24117c29fa144ae88f9ddd8b | lms/static/coffee/spec/requirejs_spec.coffee | lms/static/coffee/spec/requirejs_spec.coffee | describe "RequireJS", ->
beforeEach ->
@addMatchers requirejsTobeUndefined: ->
typeof requirejs is "undefined"
it "check that the RequireJS object is present in the global namespace", ->
expect(RequireJS).toEqual jasmine.any(Object)
expect(window.RequireJS).toEqual jasmine.any(Object)
it "che... | describe "RequireJS", ->
beforeEach ->
@addMatchers
requirejsTobeUndefined: ->
typeof requirejs is "undefined"
requireTobeUndefined: ->
typeof require is "undefined"
defineTobeUndefined: ->
typeof define is "undefined"
it "check that the RequireJS object is present ... | Work on RequireJS Jasmine test. | Work on RequireJS Jasmine test.
| CoffeeScript | agpl-3.0 | nanolearningllc/edx-platform-cypress-2,chauhanhardik/populo_2,yokose-ks/edx-platform,vasyarv/edx-platform,ESOedX/edx-platform,Softmotions/edx-platform,IITBinterns13/edx-platform-dev,chauhanhardik/populo_2,antonve/s4-project-mooc,louyihua/edx-platform,dsajkl/reqiop,amir-qayyum-khan/edx-platform,vikas1885/test1,shubhdev/... |
b6cfb1299e78dc71980bb35613b386e01040d156 | assets/js/gimme/gimme.coffee | assets/js/gimme/gimme.coffee | do ->
mapOptions =
center: new (google.maps.LatLng)(43.8321591, 4.3428536)
mapTypeId: google.maps.MapTypeId.ROADMAP
streetViewControl: false
scrollwheel: false
navigationControl: false
mapTypeControl: false
scaleControl: false
draggable: false
zoomControlOptions: style: google.maps.ZoomControlStyle.... | do ->
mapOptions =
center: new (google.maps.LatLng)(43.8321591, 4.3428536)
mapTypeId: google.maps.MapTypeId.ROADMAP
streetViewControl: false
scrollwheel: false
navigationControl: false
mapTypeControl: false
scaleControl: false
draggable: false
zoomControlOptions: style: google.maps.ZoomControlStyle.... | Add uploaded marker to map | Add uploaded marker to map
| CoffeeScript | apache-2.0 | mr-wildcard/marquis |
0fc458045e70da588bc6861672aa058365667871 | src/FileManager/Selection.coffee | src/FileManager/Selection.coffee | angular.module('fileManager').
factory('Selection', ()->
return class Selection
@_files: {}
@number: 0
@add: (file)->
if not @hasFile(file)
@_files[file._id] = file
@number++
@remove: (file)->
if @hasFile(file)
delete @_files[file._id]
@number--
@clea... | angular.module('fileManager').
factory('Selection', ($rootScope)->
class Selection
@_files: {}
@number: 0
@add: (file)->
if not @hasFile(file)
@_files[file._id] = file
@number++
@remove: (file)->
if @hasFile(file)
delete @_files[file._id]
@number--
@c... | Clear selection every time you change of folder. | Clear selection every time you change of folder.
| CoffeeScript | mit | LupoLibero/Lupo-proto |
0e13c51a8a4375dabd2cfd1615a379b24575921c | spec/keybinding-panel-spec.coffee | spec/keybinding-panel-spec.coffee | path = require 'path'
KeybindingPanel = require '../lib/keybinding-panel'
describe "KeybindingPanel", ->
panel = null
describe "loads and displays core key bindings", ->
beforeEach ->
expect(atom.keymap).toBeDefined()
spyOn(atom.keymap, 'getKeyBindings').andReturn [
source: "#{atom.getLoad... | path = require 'path'
KeybindingPanel = require '../lib/keybinding-panel'
describe "KeybindingPanel", ->
panel = null
beforeEach ->
expect(atom.keymap).toBeDefined()
spyOn(atom.keymap, 'getKeyBindings').andReturn [
source: "#{atom.getLoadSettings().resourcePath}#{path.sep}keymaps", keystroke: 'ctrl-... | Add spec for copying keybinding | Add spec for copying keybinding
| CoffeeScript | mit | atom/settings-view |
f5009812a5a6ca7b630f207b653eb362cd63f046 | public/javascripts/game.photography.coffee | public/javascripts/game.photography.coffee | jQuery(document).ready ->
class photographyGame
constructor: (@debug, @map) ->
init: () ->
return
| jQuery(document).ready ->
class photographyGame
constructor: (@debug, @map) ->
init: () ->
class location
constructor: (@position, @name, @icon) ->
@marker
addTo: (map) ->
if @icon
marker = new google.maps.Marker({
position: @position,
map: map,
i... | Add location and player classes | Add location and player classes
| CoffeeScript | mit | STAB-Inc/Bygone,STAB-Inc/Bygone,STAB-Inc/Bygone |
4e92a5fea793c4ea458a984054f6c281999b0ba3 | lib/package-menu-view.coffee | lib/package-menu-view.coffee | _ = require 'underscore-plus'
{View} = require 'atom'
# Menu item view for an installed package
module.exports =
class PackageMenuView extends View
@content: ->
@li =>
@a outlet: 'link', class: 'icon', =>
@span outlet: 'nameLabel'
@span outlet: 'packageAuthorLabel', class: 'package-author'
... | _ = require 'underscore-plus'
{View} = require 'atom'
# Menu item view for an installed package
module.exports =
class PackageMenuView extends View
@content: ->
@li =>
@a outlet: 'link', class: 'icon', =>
@span outlet: 'nameLabel'
@span outlet: 'packageAuthorLabel', class: 'package-author'
... | Check if package can be upgraded using the latest version | Check if package can be upgraded using the latest version
| CoffeeScript | mit | atom/settings-view |
23b1a9249729ce599eda12f1b81e32cf88436336 | test/has_one_chage_test.coffee | test/has_one_chage_test.coffee | require './setup'
Song = null
Album = null
spy = null
describe 'has one change', ->
beforeEach ->
Song = Ento()
.use(Ento.relations)
.attr('id')
.attr('title')
Album = Ento()
.use(Ento.relations)
.attr('id')
.hasOne('song', Song, as: 'album')
describe 'propagate chang... | require './setup'
Song = null
Album = null
spy = null
describe 'has one change', ->
beforeEach ->
Song = Ento()
.use(Ento.relations)
.attr('id')
.attr('title')
Album = Ento()
.use(Ento.relations)
.attr('id')
.hasOne('song', Song, as: 'album')
describe 'propagate chang... | Fix test related to relations. | Fix test related to relations.
| CoffeeScript | mit | rstacruz/ento |
62815471244de3b8dd1d9b03e8c683a5be37778b | lib/layervault/organization.coffee | lib/layervault/organization.coffee | module.exports = class Organization
constructor: (org, @api) ->
@orgName = if typeof org is "object" then org.name else org
node: (path, cb) ->
@api.get @apiPath(path), {}, cb
apiPath: (path) ->
path = path.path || path.name if typeof path is "object"
"/#{encodeURIComponent(@orgName)}/#{path}" | module.exports = class Organization
constructor: (org, @api) ->
@orgName = if typeof org is "object" then org.name else org
node: (path..., cb) ->
@api.get @apiPath(path), {}, cb
apiPath: (path) ->
compiledPath = []
for p in path
p = p.path || p.name if typeof p is "object"
compiledP... | Change semantics of node() a little to allow for string path or multiple arguments | Change semantics of node() a little to allow for string path or multiple arguments
| CoffeeScript | mit | layervault/layervault_js_client |
e08a8a0602b2dfaf58b20829b59137358899fc71 | src/io/tty/log.coffee | src/io/tty/log.coffee | winston = require 'winston'
util = require 'util'
winston
.remove winston.transports.Console
.add winston.transports.File,
level: 'silly'
filename: 'output.log'
json: no
exports.log = (level, params...) ->
winston.log level, (params.map util.inspect)... | winston = require 'winston'
util = require 'util'
winston
.remove winston.transports.Console
.add winston.transports.File,
level: 'silly'
filename: 'output.log'
json: no
exports.log = (level, params...) ->
if params[0] instanceof Error
winston.log level, params[0], params[1..]...
else winston.log level, ... | Tweak to Winston output handler | Tweak to Winston output handler
| CoffeeScript | mit | raymond-h/krogue |
9195806b7fd704d5e7977f2a6c7d6e24218264cb | source/scripts/views/list/item.coffee | source/scripts/views/list/item.coffee | Base = require 'base'
class ListItem extends Base.View
template: require '../../templates/list'
elements:
'.name': 'name'
'.count': 'count'
events:
'click': 'click'
constructor: ->
Base.touchify(@events)
super
return unless @list?
@listen [
@list,
'select': @sel... | Base = require 'base'
class ListItem extends Base.View
template: require '../../templates/list'
elements:
'.name': 'name'
'.count': 'count'
events:
'mousedown': 'click'
constructor: ->
Base.touchify(@events)
super
return unless @list?
@listen [
@list,
'select': ... | Use mousedown instead of click | Use mousedown instead of click
| CoffeeScript | unknown | CaffeinatedCode/nitro,nitrotasks/nitro,nitrotasks/nitro |
fc0f6216139da8c6cbd4147d65e2d519260c6b58 | src/components/buttons/back-button.cjsx | src/components/buttons/back-button.cjsx | React = require 'react'
BS = require 'react-bootstrap'
_ = require 'underscore'
{History, Link} = require 'react-router'
{TransitionActions, TransitionStore} = require '../../flux/transition'
BackButton = React.createClass
displayName: 'BackButton'
propTypes:
fallbackLink: React.PropTypes.shape(
to: Re... | React = require 'react'
BS = require 'react-bootstrap'
_ = require 'underscore'
{History, Link} = require 'react-router'
{TransitionActions, TransitionStore} = require '../../flux/transition'
BackButton = React.createClass
displayName: 'BackButton'
propTypes:
bsStyle: React.PropTypes.string
fallbackLink:... | Use router Link to prevent full page reload | Use router Link to prevent full page reload
| CoffeeScript | agpl-3.0 | openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js |
29b5280e8c425d98bceccb3eacb880f1f1fd1996 | lib/adapters/nest/NestThermostatNode.coffee | lib/adapters/nest/NestThermostatNode.coffee |
NestNode = require('./NestNode')
module.exports = class NestThermostatNode extends NestNode
aspects:
"temperature-sensor": {}
"humidity-sensor": {}
"temperature-set-point":
commands:
"set-target": (node, temp) -> node.adapter.setTemperature(node.id, temp)
events:
"target-chan... |
NestNode = require('./NestNode')
module.exports = class NestThermostatNode extends NestNode
aspects:
"temperature-sensor":
events:
changed: (prev, cur) -> prev.value != cur.value
"humidity-sensor":
events:
changed: (prev, cur) -> prev.value != cur.value
"temperature-set-point... | Support events on nest temp and humidity | Support events on nest temp and humidity | CoffeeScript | mit | monitron/jarvis-ha,monitron/jarvis-ha |
db61de6cf3755926884be79286b36a10c5233beb | build/tasks/generate-license-task.coffee | build/tasks/generate-license-task.coffee | fs = require 'fs'
path = require 'path'
module.exports = (grunt) ->
grunt.registerTask 'generate-license', 'Generate the license, including the licenses of all dependencies', (mode) ->
legalEagle = require 'legal-eagle'
done = @async()
options =
path: process.cwd()
overrides: require './lice... | fs = require 'fs'
path = require 'path'
module.exports = (grunt) ->
grunt.registerTask 'generate-license', 'Generate the license, including the licenses of all dependencies', (mode) ->
legalEagle = require 'legal-eagle'
done = @async()
options =
path: process.cwd()
overrides: require './lice... | Add .md extension to generated license | Add .md extension to generated license
| CoffeeScript | mit | chengky/atom,DiogoXRP/atom,folpindo/atom,tjkr/atom,gabrielPeart/atom,batjko/atom,G-Baby/atom,ezeoleaf/atom,stuartquin/atom,vjeux/atom,johnrizzo1/atom,deoxilix/atom,t9md/atom,kandros/atom,pkdevbox/atom,jacekkopecky/atom,efatsi/atom,vinodpanicker/atom,bryonwinger/atom,dannyflax/atom,kittens/atom,nucked/atom,Jandersoft/at... |
2001ceaa216f1db2ea6537bf2a7ca094eb5c0d05 | src/yayson.coffee | src/yayson.coffee |
tryRequire = (dep) ->
try
require dep
catch
undefined
@window ||= {}
Q = @window.Q
_ = @window._
Q ||= tryRequire 'q'
_ ||= tryRequire 'lodash/dist/lodash.underscore'
_ ||= tryRequire 'underscore'
utils = require('./yayson/utils')(_, Q)
Adapter = require('./yayson/adapter')
adapters = require('./yayso... | @window ||= {}
Q = @window.Q
_ = @window._
Q ||= (try require? 'q')
_ ||= (try require? 'lodash/dist/lodash.underscore')
_ ||= (try require? 'underscore')
utils = require('./yayson/utils')(_, Q)
Adapter = require('./yayson/adapter')
adapters = require('./yayson/adapters')
presenterFactory = require('./yayson/presen... | Change optional require format to make webpack happier | Change optional require format to make webpack happier
| CoffeeScript | mit | magicpat/yayson,magicpat/yayson,ajcobo/yayson,lsanwick/yayson,confetti/yayson,lsanwick/yayson,confetti/yayson |
dced8143cf1c6cbbc516654e5977bb4f187d40ee | src/trix/views/image_attachment_view.coffee | src/trix/views/image_attachment_view.coffee | #= require trix/views/attachment_view
#= require trix/models/image_attachment
{defer, makeElement, measureElement} = Trix
class Trix.ImageAttachmentView extends Trix.AttachmentView
getPreloadOperation: ->
if @attachment.preloadOperation?.hasSucceeded()
@attachment.preloadOperation
else if @attachment.... | #= require trix/views/attachment_view
#= require trix/models/image_attachment
{defer, makeElement, measureElement} = Trix
class Trix.ImageAttachmentView extends Trix.AttachmentView
getPreloadOperation: ->
if @attachment.preloadOperation?.hasSucceeded()
@attachment.preloadOperation
else if @attachment.... | Add figcaptions to image attachments | Add figcaptions to image attachments
| CoffeeScript | mit | ChenMichael/trix,ChenMichael/trix,GabiGrin/trix,basecamp/trix,ChenMichael/trix,urossmolnik/trix,GabiGrin/trix,basecamp/trix,urossmolnik/trix,basecamp/trix,basecamp/trix,urossmolnik/trix,GabiGrin/trix |
af5994e1ad113bae812649d662fc39de1b30b854 | lib/helpers/custom_exception.coffee | lib/helpers/custom_exception.coffee | #global $, _
((NS) ->
"use strict"
# Filename: helpers/error_helper.js */
NS = NS or {}
isInBrowser = typeof module is 'undefined' and typeof window isnt 'undefined'
# Exception class
###
* Creates a new CustomException.
* @class Exception class.
###
class CustomException
# @constructor
c... | #global $, _
"use strict"
# Filename: helpers/error_helper.js */
# Exception class
###
* Creates a new CustomException.
* @class Exception class.
###
class CustomException
# @constructor
constructor:(@name, @message,@options) ->
@log()
#Log the content of the exception.
log: ->
... | Clean the custom exception module. | Clean the custom exception module.
| CoffeeScript | mit | Jerom138/focus,Jerom138/focus,Jerom138/focus,KleeGroup/focus-core |
9f536d092594a810a4ece826f8994e4302884559 | port/EditableText.Editable.coffee | port/EditableText.Editable.coffee | ###
A text region that can be clicked to edit its contents.
###
class window.EditableText extends Editable
inherited:
editClass: "TextBox"
# True if the pressing Escape in edit mode cancels edit mode.
# The default is true.
cancelOnEscape: Control.property( null, true )
editing: ( editing ) ->
re... | ###
A text region that can be clicked to edit its contents.
###
class window.EditableText extends Editable
inherited:
editClass: "TextBox"
# True if the pressing Escape in edit mode cancels edit mode.
# The default is true.
cancelOnEscape: Control.property( null, true )
editing: ( editing ) ->
re... | Change $.andSelf() to $.addBack(), which is now preferred. | Change $.andSelf() to $.addBack(), which is now preferred.
| CoffeeScript | mit | JanMiksovsky/quickui-catalog |
8af93229d32525d880e4f1bf1685b97ccc7e2d1d | lms/static/coffee/spec/requirejs_spec.coffee | lms/static/coffee/spec/requirejs_spec.coffee | describe "RequireJS", ->
it "check that the RequireJS object is present in the global namespace", ->
expect(RequireJS).toEqual jasmine.any(Object)
expect(window.RequireJS).toEqual jasmine.any(Object)
it "check that requirejs(), require(), and define() are not in the global namespace", ->
... | describe "RequireJS", ->
beforeEach ->
@addMatchers requirejsTobeUndefined: ->
typeof requirejs is "undefined"
it "check that the RequireJS object is present in the global namespace", ->
expect(RequireJS).toEqual jasmine.any(Object)
expect(window.RequireJS).toEqual jasmine.any(Object)
it "che... | Work on RequireJS Jasmine test. | Work on RequireJS Jasmine test.
| CoffeeScript | agpl-3.0 | wwj718/edx-platform,auferack08/edx-platform,jelugbo/tundex,alu042/edx-platform,vasyarv/edx-platform,kalebhartje/schoolboost,syjeon/new_edx,JioEducation/edx-platform,4eek/edx-platform,zadgroup/edx-platform,jamiefolsom/edx-platform,pomegranited/edx-platform,zadgroup/edx-platform,eduNEXT/edx-platform,defance/edx-platform,... |
f355c9d4b600e701f35b4390ba318ac6beef8cf1 | src/scripts/modules/media/title/title.coffee | src/scripts/modules/media/title/title.coffee | define (require) ->
_ = require('underscore')
Backbone = require('backbone')
router = require('cs!router')
BaseView = require('cs!helpers/backbone/views/base')
#MailPopoverView = require('cs!./popovers/mail/mail')
template = require('hbs!./title-template')
require('less!./title')
return class MediaTitl... | define (require) ->
_ = require('underscore')
Backbone = require('backbone')
settings = require('cs!settings')
router = require('cs!router')
BaseView = require('cs!helpers/backbone/views/base')
#MailPopoverView = require('cs!./popovers/mail/mail')
template = require('hbs!./title-template')
require('less... | Include location.origin in URL for share links | Include location.origin in URL for share links
| CoffeeScript | agpl-3.0 | Connexions/webview,dak/webview,Connexions/webview,katalysteducation/webview,Connexions/webview,dak/webview,katalysteducation/webview,carolinelane10/webview,katalysteducation/webview,dak/webview,katalysteducation/webview,Connexions/webview |
3905df08f6a369e858c7030968b21bc943e1956a | app/assets/javascripts/services/heartbeat_service.js.coffee | app/assets/javascripts/services/heartbeat_service.js.coffee | ETahi.HeartbeatService = Em.Object.extend
interval: 10 * 1000
intervalId: null
resource: null
url: null
init: ->
resource = @get('resource')
throw new Error("need to specify resource") unless resource
@set('url', "#{resource.path()}/heartbeat")
start: ->
@heartbeat() # immediate heartbeat
... | ETahi.HeartbeatService = Em.Object.extend
interval: 90 * 1000
intervalId: null
resource: null
url: null
init: ->
resource = @get('resource')
throw new Error("need to specify resource") unless resource
@set('url', "#{resource.path()}/heartbeat")
start: ->
@heartbeat() # immediate heartbeat
... | Set heartbeat pulse to 90 seconds | Set heartbeat pulse to 90 seconds | CoffeeScript | mit | johan--/tahi,johan--/tahi,johan--/tahi,johan--/tahi |
f8c3b69fb675f33607315acfacb4fdac170a3635 | 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, calendar_activities_path) ->
cal = new CalHeatMap()
cal.init
itemName: ["contribution"]
data: timestamps
start: new Date(starting_year, starting_mon... | class @Calendar
constructor: (timestamps, starting_year, starting_month, calendar_activities_path) ->
cal = new CalHeatMap()
cal.init
itemName: ["contribution"]
data: timestamps
start: new Date(starting_year, starting_month)
domainLabelFormat: "%b"
id: "cal-heatmap"
domain:... | Remove unused "options" object from Calendar JS | Remove unused "options" object from Calendar JS
| CoffeeScript | mit | martijnvermaat/gitlabhq,Datacom/gitlabhq,jrjang/gitlab-ce,Soullivaneuh/gitlabhq,allysonbarros/gitlabhq,jrjang/gitlabhq,htve/GitlabForChinese,dplarson/gitlabhq,dwrensha/gitlabhq,duduribeiro/gitlabhq,Soullivaneuh/gitlabhq,dplarson/gitlabhq,yatish27/gitlabhq,axilleas/gitlabhq,martijnvermaat/gitlabhq,mr-dxdy/gitlabhq,jrjan... |
0445d2e98cd2500c34f65469fc1d5ef1b41b552c | client/skr/components/CustomerFinder.cjsx | client/skr/components/CustomerFinder.cjsx | class Skr.Components.CustomerFinder extends Lanes.React.Component
propTypes:
model: Lanes.PropTypes.Model.isRequired
commands: React.PropTypes.object
autoFocus: React.PropTypes.bool
name: React.PropTypes.string
selectField: React.PropTypes.bool
getDefaul... | class Skr.Components.CustomerFinder extends Lanes.React.Component
propTypes:
model: Lanes.PropTypes.Model.isRequired
commands: React.PropTypes.object
autoFocus: React.PropTypes.bool
name: React.PropTypes.string
selectField: React.PropTypes.bool
getDefaul... | Set a defaultLabel if it exists | Set a defaultLabel if it exists
| CoffeeScript | agpl-3.0 | argosity/stockor,argosity/stockor,argosity/stockor,argosity/stockor |
17ab977cf202a4942cea7513643dce5c69694314 | app/scripts/views/board_view.coffee | app/scripts/views/board_view.coffee | class window.BoardView extends Backbone.View
el: $('.board__tiles')
initialize: ->
@listenTo @collection, 'reset', @render
@collection.view = @
@collection.shuffle()
render: =>
els = []
@$el.html('')
@collection.each (tile) ->
view = new TileView( model: tile )... | class window.BoardView extends Backbone.View
el: $('.board__tiles')
initialize: ->
@listenTo @collection, 'reset', @render
@collection.shuffle()
@collection.view = @
render: =>
$.fx.off = yes
els = []
@$el.html('')
@collection.each (tile) ->
view = new Ti... | Disable animations on new game | Disable animations on new game
| CoffeeScript | mit | okonet/fifteens-trix,okonet/fifteens-trix |
8d09f13bad57012b007641b9103dfb3f61c56fb9 | atom/common/api/lib/callbacks-registry.coffee | atom/common/api/lib/callbacks-registry.coffee | module.exports =
class CallbacksRegistry
constructor: ->
@emptyFunc = -> throw new Error "Browser trying to call a non-exist callback
in renderer, this usually happens when renderer code forgot to release
a callback installed on objects in browser when renderer was going to be
unloaded or releas... | global = global # the "global.global" might be deleted later
module.exports =
class CallbacksRegistry
constructor: ->
@emptyFunc = -> throw new Error "Browser trying to call a non-exist callback
in renderer, this usually happens when renderer code forgot to release
a callback installed on objects in... | Fix running callback when global.global is deleted | Fix running callback when global.global is deleted
Close #2366.
| CoffeeScript | mit | roadev/electron,leethomas/electron,coderhaoxin/electron,anko/electron,abhishekgahlot/electron,iftekeriba/electron,Rokt33r/electron,jonatasfreitasv/electron,Andrey-Pavlov/electron,saronwei/electron,chriskdon/electron,jsutcodes/electron,cqqccqc/electron,deed02392/electron,tonyganch/electron,setzer777/electron,xiruibing/e... |
ced2dd2b353b7e4588ccf8632e434f2ffbba80eb | api.coffee | api.coffee | window.zooniverse ?= {}
EventEmitter = window.zooniverse?.EventEmitter or require 'zooniverse/lib/event-emitter'
$ = window.jQuery
class Api extends EventEmitter
@current: null
project: '.'
headers: {}
constructor: ({@project, @host, loadTimeout} = {}) ->
super
@select()
request: (type, url, dat... | window.zooniverse ?= {}
EventEmitter = window.zooniverse?.EventEmitter or require 'zooniverse/lib/event-emitter'
$ = window.jQuery
class Api extends EventEmitter
@current: null
project: '.'
headers: {}
constructor: ({@project, @host, loadTimeout} = {}) ->
super
@select()
request: (type, url, dat... | Add facebook annotation to submitted classifications | Add facebook annotation to submitted classifications
| CoffeeScript | apache-2.0 | zooniverse/penguin-watch-fb,zooniverse/penguin-watch-fb |
bd4e5a40673e966af84678d05735341bf77bc237 | client/admin/lib/views/integrations/adminintegrationsview.coffee | client/admin/lib/views/integrations/adminintegrationsview.coffee | kd = require 'kd'
AdminIntegrationsListView = require './adminintegrationslistview'
AdminConfiguredIntegrationsListView = require './adminconfiguredintegrationslistview'
module.exports = class AdminMembersView extends kd.View
constructor: (options = {}, data) ->
options.cssClass = 'integ... | kd = require 'kd'
AdminIntegrationsListView = require './adminintegrationslistview'
AdminConfiguredIntegrationsListView = require './adminconfiguredintegrationslistview'
module.exports = class AdminMembersView extends kd.View
constructor: (options = {}, data) ->
options.cssClass = 'integ... | Fix typo to show configured tabs by router. | Integrations: Fix typo to show configured tabs by router.
| CoffeeScript | agpl-3.0 | usirin/koding,rjeczalik/koding,andrewjcasal/koding,jack89129/koding,alex-ionochkin/koding,szkl/koding,cihangir/koding,gokmen/koding,koding/koding,rjeczalik/koding,gokmen/koding,rjeczalik/koding,mertaytore/koding,andrewjcasal/koding,mertaytore/koding,cihangir/koding,andrewjcasal/koding,alex-ionochkin/koding,sinan/koding... |
3502b995bb50738d6e8fe9238bd7f62181086e85 | src/config.coffee | src/config.coffee | _ = require('underscore')
fs = require('fs')
class Config
constructor: () ->
filePath = @findConfig()
data = @parse(filePath)
@validate(data)
return Object.freeze(data)
findConfig: () ->
if(process.env.HUBOT_PULSAR_CONFIG)
return process.env.HUBOT_PULSAR_CONFIG
hubotConfPath = './pul... | _ = require('underscore')
fs = require('fs')
class Config
constructor: () ->
filePath = Config.findConfig()
data = @parse(filePath)
@validate(data)
return Object.freeze(data)
parse: (filePath) ->
content = fs.readFileSync(filePath, {encoding: 'utf8'})
return JSON.parse(content)
validate... | Make `Config.findConfig` to be a static. | Make `Config.findConfig` to be a static.
| CoffeeScript | mit | cargomedia/hubot-pulsar,vogdb/hubot-pulsar,vogdb/hubot-pulsar,cargomedia/hubot-pulsar |
792d5bd82faf7b383ea0c5498e08049aab92de0c | src/configs/projects.cson | src/configs/projects.cson | [
{
title: "@Atom Theme"
paths: [
"/Users/johngardner/Labs/Atom-PhoenixTheme"
]
devMode: true
}
{
title: ".files"
paths: [
"/Users/johngardner/.files"
]
devMode: true
}
{
title: "language-roff"
paths: [
"/Users/johngardner/Labs/language-roff"
]
devMode: true
}
{
title: "file-ic... | [
{
title: "@Atom Theme"
paths: [
"/Users/johngardner/Labs/Atom-PhoenixTheme"
]
devMode: true
}
{
title: ".files"
paths: [
"/Users/johngardner/.files"
]
devMode: true
}
{
title: "language-roff"
paths: [
"/Users/johngardner/Labs/language-roff"
]
devMode: true
}
{
title: "file-ic... | Add link to GNU Groff mirror in project listing | Add link to GNU Groff mirror in project listing
| CoffeeScript | isc | Alhadis/Atom-PhoenixTheme |
5070f9ec88ed7fa4d1a6f5e680b524423a3db96c | src/coffee/edsl.coffee | src/coffee/edsl.coffee | angular.module 'qbn.edsl', ['qbn.quality', 'qbn.storylet', 'qbn.choice']
.factory 'qbnEdsl', (qualities, storylets, frontalChoices, choiceFactory) ->
api =
quality: (id, name, description, args = {}) ->
{defaultValue, defaultProgress, maxProgress, hasProgress, progressEscalation,
visible} =... | angular.module 'qbn.edsl', ['qbn.quality', 'qbn.storylet', 'qbn.choice']
.factory 'qbnEdsl', (qualities, storylets, frontalChoices, choiceFactory) ->
api =
quality: (id, name, description, args = {}) ->
{defaultValue, defaultProgress, maxProgress, hasProgress, progressEscalation,
visible} =... | Fix Typo in Choice EDSL | Fix Typo in Choice EDSL
| CoffeeScript | unlicense | arashikou/exper3-2015 |
eff5b8134feed882037cfb00cc77ba5329fbfe83 | base/assets/javascripts/base.coffee | base/assets/javascripts/base.coffee | # Toggle the administration system.
($ document).keypress (e) ->
($ '.administration').toggleClass 'visible' if (e.keyCode || e.which) == 96
# "Hero" image fade-in.
window.onload = ->
($ '.hero-image img').animate({opacity: 1}, 300)
# Search field highlighting.
($ document).ready ->
($ '#id_q').focus ->
($ ... | # Toggle the administration system.
($ document).keypress (e) ->
($ '.administration').toggleClass 'visible' if (e.keyCode || e.which) == 96
# "Hero" image fade-in.
window.onload = ->
($ '.hero-image img').animate({opacity: 1}, 300)
# Search field highlighting.
($ document).ready ->
($ '#id_q').focus ->
($ ... | Switch that dropdown icon when we toggle things. | Switch that dropdown icon when we toggle things.
| CoffeeScript | apache-2.0 | hello-base/web,hello-base/web,hello-base/web,hello-base/web |
e9509898b79e55b2fbf4fa9807e02c3d73621310 | lib/middleware/locals.coffee | lib/middleware/locals.coffee | #
# Inject common project-wide [view locals](http://expressjs.com/api.html#app.locals).
#
# uuid = require 'node-uuid'
{ parse, format } = require 'url'
_ = require 'underscore'
{ NODE_ENV } = require '../../config'
module.exports = (req, res, next) ->
res.locals.sd.CURRENT_PATH = parse(req.url).pathname
res.loca... | #
# Inject common project-wide [view locals](http://expressjs.com/api.html#app.locals).
#
# uuid = require 'node-uuid'
{ parse, format } = require 'url'
_ = require 'underscore'
{ NODE_ENV } = require '../../config'
module.exports = (req, res, next) ->
res.locals.sd.CURRENT_PATH = parse(req.url).pathname
res.loca... | Set DNT setting on middleware | Set DNT setting on middleware
| CoffeeScript | mit | aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell |
d4a8bc72b36cf6f02469acdf2c878803bcb17e3d | src/upload.coffee | src/upload.coffee | fs = require 'fs'
path = require 'path'
chalk = require 'chalk'
request = require 'request'
restapi = require './restapi'
validator = require './validator'
bundle = require './bundle'
module.exports = (dir, options, callback) ->
console.log chalk.yellow 'Validating gadget'
apiUrl = options.apiUrl + '/gadgets'
v... | fs = require 'fs'
path = require 'path'
chalk = require 'chalk'
request = require 'request'
restapi = require './restapi'
validator = require './validator'
bundle = require './bundle'
module.exports = (dir, options, callback) ->
console.log chalk.yellow 'Validating gadget'
apiUrl = options.apiUrl + '/gadgets'
v... | Comment makes less sense now | Comment makes less sense now
| CoffeeScript | mit | Versal/sdk,Versal/sdk |
d98f25480c8d2fb5b3cf2adea0a56628706a9360 | src/scripts/helpers/handlers/analytics.coffee | src/scripts/helpers/handlers/analytics.coffee | define (require) ->
Backbone = require('backbone')
settings = require('settings')
# Class to handle loading analytics scripts and wrapping
# handlers around them so that modules don't have to
# interact with global variables directly
return new class AnalyticsHandler
constructor: () ->
# Setup te... | define (require) ->
Backbone = require('backbone')
settings = require('settings')
# Class to handle loading analytics scripts and wrapping
# handlers around them so that modules don't have to
# interact with global variables directly
return new class AnalyticsHandler
constructor: () ->
# Setup te... | Fix handling of multiple GA tracking numbers | Fix handling of multiple GA tracking numbers
| CoffeeScript | agpl-3.0 | katalysteducation/webview,Connexions/webview,katalysteducation/webview,katalysteducation/webview,katalysteducation/webview,Connexions/webview,Connexions/webview,Connexions/webview |
d348e3e48aabb9e3cd6b9f3c79b5c9c2b1df905f | snippets/paper-input-elements.cson | snippets/paper-input-elements.cson | # Paper Input components snippets
".text.html":
"paper-input-container":
"prefix": "paper-input"
"body": """
<paper-input-container id="$1">
<label>${2:Input label}</label>
<input is="iron-input"$3>
</paper--container>
"""
"paper input error":
"prefix": "paper-input-error"
"... | # Paper Input components snippets
".text.html":
"paper-input-container":
"prefix": "paper-input-container"
"body": """
<paper-input-container id="$1">
<label>${2:Input label}</label>
<input is="iron-input"$3>
</paper--container>
"""
"paper input error":
"prefix": "paper-input-er... | Fix improperly named snippet prefix | Fix improperly named snippet prefix
| CoffeeScript | mit | zacharytamas/atom-polymer |
294121563d2944b70fe1b3a82c144904c5962b29 | src/impromptu.coffee | src/impromptu.coffee | # Allow `.coffee` files in `require()`.
require 'coffee-script'
fs = require 'fs'
_ = require 'underscore'
HOME = process.env.HOME
class Impromptu
paths: ["#{HOME}/.impromptu.coffee", "#{HOME}/.impromptu.js", "#{HOME}/.impromptu"]
constructor: ->
@prompt = new Impromptu.Prompt
configPath = _.find @paths... | # Allow `.coffee` files in `require()`.
require 'coffee-script'
fs = require 'fs'
_ = require 'underscore'
CONFIG_DIR = "#{process.env.HOME}/.impromptu"
class Impromptu
paths: "#{CONFIG_DIR}/prompt.#{ext}" for ext in ['coffee', 'js']
constructor: ->
@prompt = new Impromptu.Prompt
configPath = _.find @pa... | Move prompt config file to subdirectory | Move prompt config file to subdirectory
We want to allow prompts to use modules, but we shouldn't make your whole home directory the parent for our node_modules directory.
Uses ~/.impromptu and renames the file to prompt.(js|coffee), which is now more descriptive.
| CoffeeScript | mit | impromptu/impromptu,impromptu/impromptu |
15f809bebaa302fc385dc5bacbe961dbb65ed830 | lib/adapter.coffee | lib/adapter.coffee | Router = require 'routes'
_ = require 'lodash'
noService = require './noService'
resolve = require './resolve'
makeRouter = require './makeRouter'
# Given a collection of route defs with resolved law services
# and a request object, return an object containing the service,
# and the HTTP request-extracted arguments ... | Router = require 'routes'
_ = require 'lodash'
noService = require './noService'
resolve = require './resolve'
makeRouter = require './makeRouter'
expandResources = require './expandResources'
# Given a collection of route defs with resolved law services
# and a request object, return an object containing the servic... | Include resource expansion in middleware route def processing | Include resource expansion in middleware route def processing
| CoffeeScript | mit | TorchlightSoftware/law-connect |
af9672b100d17a1dc5193f32d2a9d7f0c8ae5793 | src/plugins/jsonparser.coffee | src/plugins/jsonparser.coffee | module.exports =
processResponse: (res) ->
# Check to see if the contentype is "something/json" or
# "something/somethingelse+json"
if res.contentType and (/^.*\/(?:.*\+)?json(;|\z)/i).test res.contentType
# If the body hasn't been parsed yet, parse it.
raw = if typeof res.body is 'string' the... | module.exports =
processResponse: (res) ->
# Check to see if the contentype is "something/json" or
# "something/somethingelse+json"
if res.contentType and (/^.*\/(?:.*\+)?json(;|$)/i).test res.contentType
# If the body hasn't been parsed yet, parse it.
raw = if typeof res.body is 'string' then... | Use $ to match end of string | Use $ to match end of string
It seems like some JS RE engines don't support \z
| CoffeeScript | mit | matthewwithanm/httpplease.js,matthewwithanm/httpplease.js |
c2dc8bade5d2ca141622988216ae78bd7da35cb7 | app/assets/javascripts/main_form.js.coffee | app/assets/javascripts/main_form.js.coffee | # Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
if window.location.pathname.match(/\/apply$/)
$ ->
changeSection = (e, noscroll)->
h... | if window.location.pathname.match(/\/apply$/)
$ ->
changeSection = (e, noscroll)->
hash = window.location.hash
sectionId = hash.substring 1
$('.section').each ()->
section = $ @
if section.attr('id') is sectionId
section.toggleClass 'hide', false
else
... | Use spaces instead of tabs for coffeescript indent | Use spaces instead of tabs for coffeescript indent
As dictated by coffeelint, and the coffeescript style guide at
https://github.com/polarmobile/coffeescript-style-guide
| CoffeeScript | mit | jrunningen/districthousing,dclegalhackers/districthousing,MetricMike/districthousing,uncompiled/districthousing,jrunningen/districthousing,codefordc/districthousing,adelevie/districthousing,adelevie/districthousing,codefordc/districthousing,meiao/districthousing,lankyfrenchman/dchousing-apps,meiao/districthousing,lanky... |
5451e91499808991d8be0d3ae942ed73713f4ab0 | static/script.coffee | static/script.coffee | define ['jquery', 'semantic', 'utils', 'charts'], ($, semantic, utils, charts) ->
currentCity = utils.getCookie('city')
availableCity = ['Guangzhou', 'Beijing', 'Shanghai', 'Chengdu', 'Shenyang']
currentCity = 'Guangzhou' if currentCity not in availableCity
charts.renderChart currentCity
# listen city click... | define ['jquery', 'semantic', 'utils', 'charts'], ($, semantic, utils, charts) ->
currentCity = utils.getCookie('city')
availableCity = ['Guangzhou', 'Beijing', 'Shanghai', 'Chengdu', 'Shenyang']
currentCity = 'Guangzhou' if currentCity not in availableCity
charts.renderChart currentCity
# listen city click... | Revert "Clean dropdown binding code" | Revert "Clean dropdown binding code"
This reverts commit fda52379e8674e44445ad7f0c246f88ca036dd6d.
Code is broken
| CoffeeScript | mit | banbanchs/leda,banbanchs/leda,banbanchs/leda |
ea9c3dbfded1e5aaaed4a75fb15c1d2eabf26267 | docpad.coffee | docpad.coffee | # DocPad Configuration File
# http://docpad.org/docs/config
path = require 'path'
#@poweredByDocPad = false
@templateData =
site:
title: "My Website"
getPreparedTitle: ->
if @document.title
"#{@document.title} | #{@site.title}"
else
@site.title
@collections =
pages: ->
@getCollect... | # DocPad Configuration File
# http://docpad.org/docs/config
path = require 'path'
#@poweredByDocPad = false
@templateData =
site:
title: "My Website"
getPreparedTitle: ->
if @document.title
"#{@document.title} | #{@site.title}"
else
@site.title
@collections =
pages: ->
@getCollect... | Use path, since required it | Use path, since required it
| CoffeeScript | isc | ukoloff/docpad.ukoloff.tk,ukoloff/docpad.ukoloff.tk,ukoloff/docpad.ukoloff.tk |
231579ad1ad67e3e4da74bca6b4797b5772dc491 | client/admin/lib/views/stacks/editors/stacktemplateeditorview.coffee | client/admin/lib/views/stacks/editors/stacktemplateeditorview.coffee | BaseStackEditorView = require './basestackeditorview'
module.exports = class StackTemplateEditorView extends BaseStackEditorView
constructor: (options = {}, data) ->
unless options.content
options.content = require '../defaulttemplate'
super options, data
ace = @getAce()
@once 'EditorRea... | BaseStackEditorView = require './basestackeditorview'
module.exports = class StackTemplateEditorView extends BaseStackEditorView
constructor: (options = {}, data) ->
unless options.content
options.content = require '../defaulttemplate'
super options, data
if options.showHelpContent
@onc... | Refactor inserting help text into stack template editor | Refactor inserting help text into stack template editor
| CoffeeScript | agpl-3.0 | mertaytore/koding,andrewjcasal/koding,cihangir/koding,usirin/koding,alex-ionochkin/koding,acbodine/koding,usirin/koding,szkl/koding,mertaytore/koding,koding/koding,koding/koding,alex-ionochkin/koding,acbodine/koding,cihangir/koding,cihangir/koding,drewsetski/koding,kwagdy/koding-1,alex-ionochkin/koding,acbodine/koding,... |
ce793ec86d6034074076ffa4b622c8918d1e1ffb | atom/browser/lib/guest-view-manager.coffee | atom/browser/lib/guest-view-manager.coffee | ipc = require 'ipc'
webContents = require 'web-contents'
webViewManager = null # Doesn't exist in early initialization.
nextInstanceId = 0
guestInstances = {}
# Generate guestInstanceId.
getNextInstanceId = (webContents) ->
++nextInstanceId
# Create a new guest instance.
createGuest = (embedder, params) ->
webV... | ipc = require 'ipc'
webContents = require 'web-contents'
webViewManager = null # Doesn't exist in early initialization.
nextInstanceId = 0
guestInstances = {}
# Generate guestInstanceId.
getNextInstanceId = (webContents) ->
++nextInstanceId
# Create a new guest instance.
createGuest = (embedder, params) ->
webV... | Destroy guest when the embedder is gone | Destroy guest when the embedder is gone
| CoffeeScript | mit | benweissmann/electron,fomojola/electron,leolujuyi/electron,biblerule/UMCTelnetHub,thingsinjars/electron,eriser/electron,GoooIce/electron,cqqccqc/electron,voidbridge/electron,bwiggs/electron,fireball-x/atom-shell,gstack/infinium-shell,Zagorakiss/electron,jacksondc/electron,jiaz/electron,wan-qy/electron,BionicClick/elect... |
17423b2080f5e902b64a3e664fd8262d8d65d448 | client/src/views/visualisation_view.coffee | client/src/views/visualisation_view.coffee | window.Backbone ||= {}
window.Backbone.Views ||= {}
class Backbone.Views.VisualisationView extends Backbone.Diorama.NestingView
template: Handlebars.templates['visualisation.hbs']
events:
"click .download-visualisation": "download"
initialize: (options) ->
@visualisation = options.visualisation
# I... | window.Backbone ||= {}
window.Backbone.Views ||= {}
class Backbone.Views.VisualisationView extends Backbone.Diorama.NestingView
template: Handlebars.templates['visualisation.hbs']
events:
"click .download-visualisation": "download"
initialize: (options) ->
@visualisation = options.visualisation
# I... | Fix typo in visualisation download url | Fix typo in visualisation download url
| CoffeeScript | bsd-3-clause | unepwcmc/NRT,unepwcmc/NRT |
112fcb842248199bfeea9de61cce880d72ab8868 | components/DetectAnimatedGif.coffee | components/DetectAnimatedGif.coffee | noflo = require 'noflo'
animated = require 'animated-gif-detector'
fs = require 'fs'
# @runtime noflo-nodejs
# @name DetectAnimatedGif
exports.getComponent = ->
c = new noflo.Component
c.icon = 'expand'
c.description = 'Detect if a given GIF is animated'
c.inPorts.add 'buffer',
datatype: 'all'
descri... | noflo = require 'noflo'
animated = require 'animated-gif-detector'
fs = require 'fs'
# @runtime noflo-nodejs
# @name DetectAnimatedGif
exports.getComponent = ->
c = new noflo.Component
c.icon = 'expand'
c.description = 'Detect if a given GIF is animated'
c.inPorts.add 'buffer',
datatype: 'all'
descri... | Send only on finish event | Send only on finish event
| CoffeeScript | mit | noflo/noflo-image,GabiThume/noflo-image,GabiThume/noflo-image,noflo/noflo-image |
ca96ac7fb161f429c9da261e8ca0ff6183341712 | methods/feeds.coffee | methods/feeds.coffee | Feeds = require '/imports/collections/feeds'
{ regexEscape } = require '/imports/utils'
Meteor.methods
addFeed: (feed) ->
url = feed.url
user = Meteor.user()
urlWithoutProtocol = url.replace(/^https?\:\/\//i, '');
regex = new RegExp "^https?:\/\/#{regexEscape(urlWithoutProtocol)}"
if Feeds.findOn... | Feeds = require '/imports/collections/feeds'
{ regexEscape } = require '/imports/utils'
Meteor.methods
addFeed: (feed) ->
url = feed.url
user = Meteor.user()
urlWithoutProtocol = url.replace(/^https?\:\/\//i, '');
regex = new RegExp "^https?:\/\/#{regexEscape(urlWithoutProtocol)}"
if Feeds.findOn... | Fix feed removal - get user id by calling meteors user method | Fix feed removal - get user id by calling meteors user method
| CoffeeScript | apache-2.0 | ecohealthalliance/eidr-connect,ecohealthalliance/eidr-connect,ecohealthalliance/eidr-connect,ecohealthalliance/eidr-connect |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.