commit stringlengths 40 40 | old_file stringlengths 9 134 | new_file stringlengths 9 134 | old_contents stringlengths 0 2.21k | new_contents stringlengths 34 3.19k | subject stringlengths 14 340 | message stringlengths 15 1.43k | lang stringclasses 1
value | license stringclasses 13
values | repos stringlengths 9 29k |
|---|---|---|---|---|---|---|---|---|---|
496a03f4c69b40ece9c8403adfebd1bf76f4c433 | app/assets/javascripts/lib/models/scenario.coffee | app/assets/javascripts/lib/models/scenario.coffee | class @Scenario extends Backbone.Model
apiSessionID: ->
key = App.settings.get('api_session_id')
return if key? then key else null
api_session_id: ->
@apiSessionID()
apiAttributes: ->
s = App.settings
data =
area_code: s.get('area_code')
end_year: s.get('end_year')
preset_s... | class @Scenario extends Backbone.Model
apiSessionID: ->
key = App.settings.get('api_session_id')
return if key? then key else null
api_session_id: =>
@apiSessionID()
apiAttributes: ->
s = App.settings
data =
area_code: s.get('area_code')
end_year: s.get('end_year')
preset_s... | Fix inability to dismiss "Results" attention grabber | Fix inability to dismiss "Results" attention grabber
| CoffeeScript | mit | quintel/etmodel,quintel/etmodel,quintel/etmodel,quintel/etmodel |
56186475b73d0d3beb2563020b0bac2d8d2bd82f | lib/json2json.coffee | lib/json2json.coffee |
exports.ObjectTemplate = require './ObjectTemplate'
exports.TemplateConfig = require './TemplateConfig'
|
# load modules in CommonJS/Node.js environment, not needed in browser
if exports? && require?
exports.ObjectTemplate = require './ObjectTemplate'
exports.TemplateConfig = require './TemplateConfig'
| Handle loading classes in browser | Handle loading classes in browser | CoffeeScript | mit | joelvh/json2json,djelic/json2json,qweasd1/json2json |
1b8a558e4978b13160e6ca913a0d323c2ed787b8 | app/client/js/react/link.coffee | app/client/js/react/link.coffee | goog.provide 'app.react.Link'
class app.react.Link
###*
@param {app.Routes} routes
@param {app.react.Touch} touch
@constructor
###
constructor: (@routes, @touch) ->
###*
@param {este.Route} route
@param {string} text
@param {Object=} params
###
to: (route, text, params) ->
{a}... | goog.provide 'app.react.Link'
class app.react.Link
###*
@param {app.Routes} routes
@param {app.react.Touch} touch
@constructor
###
constructor: (@routes, @touch) ->
###*
@param {este.Route} route
@param {string} text
@param {Object=} urlParams
@param {Object=} props
###
to: (r... | Add arg props to app.react.Link | Add arg props to app.react.Link
| CoffeeScript | mit | steida/songary |
d03b05b4a0a6fc68cac588803a326ef056ec62c3 | assets/game_state.coffee | assets/game_state.coffee | class GameState
customers: []
agents: []
requestQueues: {}
chanceOfRequest: 0.02
tickables: []
tick: 0
money: 1000000
reputation: 0.5
agentSpawner: new AgentSpawner()
addAgent: (agent) ->
@agents.push(agent)
@tickables.push(agent)
fireAgent: (agent) ->
@agents.filter((item) ->
... | class GameState
customers: []
agents: []
requestQueues: {}
chanceOfRequest: 0.005
tickables: []
tick: 0
money: 1000000
reputation: 0.5
agentSpawner: new AgentSpawner()
addAgent: (agent) ->
@agents.push(agent)
@tickables.push(agent)
fireAgent: (agent) ->
@agents.filter((item) ->
... | Make requests significantly rarer (more realistic) | Make requests significantly rarer (more realistic)
| CoffeeScript | mit | guts2014/TEAM-NAME-PHP,guts2014/TEAM-NAME-PHP |
a69607e6aa27299fcc4301d79f2152cb2c6abb65 | packages/rocketchat-gitlab/common.coffee | packages/rocketchat-gitlab/common.coffee | config =
serverURL: 'https://gitlab.com'
identityPath: '/api/v3/user'
addAutopublishFields:
forLoggedInUser: ['services.gitlab']
forOtherUsers: ['services.gitlab.username']
Gitlab = new CustomOAuth 'gitlab', config
if Meteor.isServer
Meteor.startup ->
RocketChat.models.Settings.findById('API_Gitlab_URL').ob... | config =
serverURL: 'https://gitlab.com'
identityPath: '/api/v3/user'
scope: 'api'
addAutopublishFields:
forLoggedInUser: ['services.gitlab']
forOtherUsers: ['services.gitlab.username']
Gitlab = new CustomOAuth 'gitlab', config
if Meteor.isServer
Meteor.startup ->
RocketChat.models.Settings.findById('API_G... | Set gitlabs scope to 'api', the only support scope. | Set gitlabs scope to 'api', the only support scope.
Fixes #3987
| CoffeeScript | mit | snaiperskaya96/Rocket.Chat,galrotem1993/Rocket.Chat,trt15-ssci-organization/Rocket.Chat,k0nsl/Rocket.Chat,trt15-ssci-organization/Rocket.Chat,wtsarchive/Rocket.Chat,tntobias/Rocket.Chat,galrotem1993/Rocket.Chat,AimenJoe/Rocket.Chat,Kiran-Rao/Rocket.Chat,matthewshirley/Rocket.Chat,JamesHGreen/Rocket_API,yuyixg/Rocket.Ch... |
e2288aa8777cab79af034163e37ebedfcd213d41 | app/assets/javascripts/static.js.coffee | app/assets/javascripts/static.js.coffee | # Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
roundUpBy = (value, round_to) ->
return round_to * Math.ceil(value / round_to)
$ ->
animateMetric = $("... | # Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
roundUpBy = (value, round_to) ->
return round_to * Math.ceil(value / round_to)
$ ->
animateMetric = $("... | Reduce the animation duration more | Reduce the animation duration more
| CoffeeScript | agpl-3.0 | openaustralia/morph,otherchirps/morph,openaustralia/morph,openaustralia/morph,openaustralia/morph,openaustralia/morph,otherchirps/morph,otherchirps/morph,otherchirps/morph,openaustralia/morph,otherchirps/morph,otherchirps/morph,otherchirps/morph,openaustralia/morph |
06e0dc4b61a0c8ae5e4e7dbe8f38762ec94b1a3f | src/cacheable.coffee | src/cacheable.coffee | Impromptu = require './impromptu'
class Cacheable
constructor: (@impromptu, @name, @options) ->
run: (fn) => throw Impromptu.AbstractError
get: (fn) -> throw Impromptu.AbstractError
set: (fn) -> throw Impromptu.AbstractError
unset: (fn) -> throw Impromptu.AbstractError
# Expose `Cacheable`.
exports = module... | Impromptu = require './impromptu'
# An abstract class that manages how a method is cached.
class Cacheable
constructor: (@impromptu, @name, @options) ->
# The main method.
#
# Accepts a `fn` with a signature of `err, results`, where `results` is the
# cached value. Optionally updates the cache.
#
# Thi... | Document the abstract Cacheable class. | Document the abstract Cacheable class.
| CoffeeScript | mit | impromptu/impromptu,impromptu/impromptu |
0ecc8bee15d881eae7aebf25fc0c319bf1f28adf | client/src/scripts/scoring-list-view.coffee | client/src/scripts/scoring-list-view.coffee | Steam.ScoringListView = (_) ->
_items = do nodes$
#TODO ugly
_isLive = node$ yes
activateItem = (item) ->
for other in _items()
if other is item
other.isActive yes
else
other.isActive no
_.displayScoring item.data
createItem = (scoring) ->
#TODO replace with type ch... | Steam.ScoringListView = (_) ->
_items = do nodes$
_hasItems = lift$ _items, (items) -> items.length > 0
#TODO ugly
_isLive = node$ yes
activateItem = (item) ->
for other in _items()
if other is item
other.isActive yes
else
other.isActive no
_.displayScoring item.data
... | Handle empty scoring lists properly PP-8 | Handle empty scoring lists properly
PP-8
| CoffeeScript | apache-2.0 | elkingtonmcb/h2o-2,elkingtonmcb/h2o-2,h2oai/h2o-2,vbelakov/h2o,111t8e/h2o-2,h2oai/h2o,eg-zhang/h2o-2,eg-zhang/h2o-2,eg-zhang/h2o-2,calvingit21/h2o-2,calvingit21/h2o-2,h2oai/h2o-2,111t8e/h2o-2,eg-zhang/h2o-2,calvingit21/h2o-2,111t8e/h2o-2,eg-zhang/h2o-2,111t8e/h2o-2,vbelakov/h2o,100star/h2o,elkingtonmcb/h2o-2,calvingit2... |
84cdcacbba4eea7fa58dbd073dd78f564790f944 | client/templates/editor/date/date.js.coffee | client/templates/editor/date/date.js.coffee | Template.date.helpers
Template.date.rendered = ->
template = @
$editor = template.$("input")
$editor.datepicker(
changeMonth: true
changeYear: true
dateFormat: "yy/mm/dd"
constrainInput: false
onSelect: (date) ->
$set = {}
$set[template.data.property] = date
editor = share.E... | Template.date.helpers
Template.date.rendered = ->
template = @
$editor = template.$("input")
$editor.datepicker(
changeMonth: true
changeYear: true
dateFormat: "yy/mm/dd"
constrainInput: false
onSelect: (date) ->
$set = {}
$set[template.data.property] = date
editor = share.E... | Fix date with hours display | Fix date with hours display
| CoffeeScript | agpl-3.0 | chrissanders/FlowBAT,chrissanders/FlowBAT,chrissanders/FlowBAT,rbouqueau/FlowBAT,rbouqueau/FlowBAT,rbouqueau/FlowBAT |
6cbf4411993e6308760854d479a375933839c0e1 | lib/transforms/renderFileTree.coffee | lib/transforms/renderFileTree.coffee | ###
# # Write JSON File Tree
###
fs = require 'fs'
path = require 'path'
through = require 'through2'
log = require '../utils/log'
module.exports = (fileName, opts={}) ->
unless fileName
throw new PluginError("Render File Tree", "Missing fileName option")
filePrefix = opts.filePrefix or "window.#{opts.varNa... | ###
# # Write JSON File Tree
###
fs = require 'fs'
path = require 'path'
through = require 'through2'
_ = require 'lodash'
log = require '../utils/log'
module.exports = (fileName, opts={}) ->
unless fileName
throw new PluginError("Render File Tree", "Missing fileName option")
filePrefix = opts.filePrefix or... | Choose First h1 for File Title | Choose First h1 for File Title | CoffeeScript | mit | legomushroom/grock,killercup/grock,killercup/grock,legomushroom/grock,killercup/grock,legomushroom/grock |
e110d431e23f6181a0fb2ae3022fa1754f86327f | lib/minimap-editor-view.coffee | lib/minimap-editor-view.coffee | {EditorView, ScrollView} = require 'atom'
module.exports =
class MinimapEditorView extends ScrollView
@content: ->
@div class: 'minimap-editor editor editor-colors', =>
@div class: 'scroll-view', outlet: 'scrollView', =>
@div class: 'lines', outlet: 'lines'
initialize: ->
super
update: (... | {EditorView, ScrollView, $} = require 'atom'
module.exports =
class MinimapEditorView extends ScrollView
@content: ->
@div class: 'minimap-editor editor editor-colors', =>
@div class: 'scroll-view', outlet: 'scrollView', =>
@div class: 'lines', outlet: 'lines', =>
@div class: 'lines-wrap... | Optimize minimap update by removing a wrapper instead of all lines | Optimize minimap update by removing a wrapper instead of all lines
| CoffeeScript | mit | xndcn/atom-minimap,atom-minimap/minimap |
6229fb5f653e6339a4141f4025731b7de7670229 | assets/javascripts/views/permissions_fields_toggle.js.coffee | assets/javascripts/views/permissions_fields_toggle.js.coffee | Marbles.Views.PermissionsFieldsToggle = class PermissionsFieldsToggleView extends TentStatus.View
@template_name: 'permissions_fields_toggle'
@view_name: 'permissions_fields_toggle'
constructor: ->
super
@once 'ready', =>
setImmediate @bindEvents
@render()
context: (permissions = @parentVi... | Marbles.Views.PermissionsFieldsToggle = class PermissionsFieldsToggleView extends TentStatus.View
@template_name: 'permissions_fields_toggle'
@view_name: 'permissions_fields_toggle'
constructor: ->
super
@once 'ready', =>
setImmediate @bindEvents
@render()
context: (permissions) =>
per... | Fix permissions toggle label for new posts | Fix permissions toggle label for new posts
| CoffeeScript | bsd-3-clause | tent/tent-status,tent/tent-status |
2f20e6bfaf78cc7bc6bb23fc3d8d6556cec36a78 | app/assets/javascripts/views/application.js.coffee | app/assets/javascripts/views/application.js.coffee | class Views.Application extends View
@content: ->
@div id: 'application', class: 'container', =>
@div class: 'navbar navbar-fixed-top navbar-inverse', =>
@div class: 'navbar-inner', =>
@div class: 'container', =>
@a "Hyperarchy", class: 'brand', href: '/'
@ul class:... | class Views.Application extends View
@content: ->
@div id: 'application', =>
@div class: 'navbar navbar-fixed-top navbar-inverse', =>
@div class: 'navbar-inner', =>
@div class: 'container', =>
@a "Hyperarchy", class: 'brand', href: '/'
@ul class: 'nav pull-right', =... | Fix title bar appearance at smaller screen widths | Fix title bar appearance at smaller screen widths | CoffeeScript | agpl-3.0 | nathansobo/hyperarchy,maxbrunsfeld/hyperarchy,schuyler1d/hyperarchy |
c631f384185d43d7665812dc3b5d876932530c67 | src/ext/components/stacktrace-output.coffee | src/ext/components/stacktrace-output.coffee | H2O.StackTraceOutput = (_, _stackTrace) ->
_activeNode = signal null
createThread = (thread) ->
lines = split thread, '\n'
title: head lines
stackTrace: join (tail lines), '\n'
createNode = (node) ->
display = -> _activeNode self
self =
name: node._node
timestamp: new Date node... | H2O.StackTraceOutput = (_, _stackTrace) ->
_activeNode = signal null
createThread = (thread) ->
lines = split thread, '\n'
title: head lines
stackTrace: join (tail lines), '\n'
createNode = (node) ->
display = -> _activeNode self
self =
name: node.node
timestamp: new Date node.... | Fix stack trace processing to match refactored API PUBDEV-371 | Fix stack trace processing to match refactored API PUBDEV-371
| CoffeeScript | mit | h2oai/h2o-flow,h2oai/h2o-flow,nilbody/h2o-flow,junwucs/h2o-flow,nilbody/h2o-flow,printedheart/h2o-flow,nilbody/h2o-flow,printedheart/h2o-flow,printedheart/h2o-flow,junwucs/h2o-flow,junwucs/h2o-flow |
d94daafca98ad17e97cd58680e08bf449b5a7b16 | client/source/controllers/install_controller.coffee | client/source/controllers/install_controller.coffee | Controller = require 'lib/controller'
User = require 'models/user'
FirstUserView = require 'views/install/firstuser'
mediator = require('chaplin').mediator
module.exports = class InstallController extends Controller
firstuser: ->
@adjustTitle 'Install'
newUser = new User
@view = new FirstUserView
... | Controller = require 'lib/controller'
User = require 'models/user'
FirstUserView = require 'views/install/firstuser'
mediator = require('chaplin').mediator
module.exports = class InstallController extends Controller
firstuser: ->
@adjustTitle 'Install'
newUser = new User
roles: [{name: 'administrato... | Make the first installed user an administrator by default | Make the first installed user an administrator by default
| CoffeeScript | agpl-3.0 | mikesmithmsm/buckets,edolyne/hive,edolyne/buckets,bucketsio/buckets,artelse/buckets,dut3062796s/buckets,mikesmithmsm/buckets,edolyne/hive,dut3062796s/buckets,mamute/buckets,nishant8BITS/buckets,edolyne/buckets,bucketsio/buckets,asm-products/buckets,nishant8BITS/buckets,artelse/buckets,mamute/buckets,asm-products/bucket... |
fd8295dc652ca9da1636adb342f85ae77fc0d5b0 | src/coffee/cilantro/ui/concept/panel.coffee | src/coffee/cilantro/ui/concept/panel.coffee | define [
'../core'
'./index'
'./search'
'tpl!templates/concept/panel.html'
], (c, index, search, templates...) ->
templates = c._.object ['panel'], templates
class ConceptSearch extends search.ConceptSearch
events:
'typeahead:autocompleted input': 'autocomplete'
a... | define [
'../core'
'./index'
'./search'
'tpl!templates/concept/panel.html'
], (c, index, search, templates...) ->
templates = c._.object ['panel'], templates
class ConceptSearch extends search.ConceptSearch
events:
'typeahead:autocompleted input': 'autocomplete'
a... | Add comments to ConceptPanel for clarity of implementation | Add comments to ConceptPanel for clarity of implementation
| CoffeeScript | bsd-2-clause | chop-dbhi/cilantro,chop-dbhi/cilantro,chop-dbhi/cilantro |
acf78a9ea811eb31124784eb8985b2f024f72d76 | test/integration/instance-lookup-test.coffee | test/integration/instance-lookup-test.coffee | fs = require('fs')
instanceLookup = require('../../lib/instance-lookup')
getConfig = ->
server: JSON.parse(fs.readFileSync(process.env.HOME + '/.tedious/test-connection.json', 'utf8')).config.server
instanceName: JSON.parse(fs.readFileSync(process.env.HOME + '/.tedious/test-connection.json', 'utf8')).instanceName
... | fs = require('fs')
instanceLookup = require('../../lib/instance-lookup')
getConfig = ->
server: JSON.parse(fs.readFileSync(process.env.HOME + '/.tedious/test-connection.json', 'utf8')).config.server
instanceName: JSON.parse(fs.readFileSync(process.env.HOME + '/.tedious/test-connection.json', 'utf8')).instanceName
... | Allow integration test looking up by instance name to be bypassed (if SQL Server Browser not available). | Allow integration test looking up by instance name to be bypassed (if SQL Server Browser not available).
| CoffeeScript | mit | pekim/tedious,Sage-ERP-X3/tedious,arthurschreiber/tedious,LeanKit-Labs/tedious,tediousjs/tedious,tediousjs/tedious,spanditcaa/tedious |
e6a38aba094c2f402d6b6aaf1e9015341f8bd098 | guts/getControllers.coffee | guts/getControllers.coffee | Promise = require 'bluebird'
fs = Promise.promisifyAll require 'fs'
_ = require 'lodash'
module.exports = () ->
# For performance reasons, we'll do this asynchronously.
fs.readdirAsync('./controllers/').then (controllers) ->
#This probably isn't necessary: I wanted to parse t... | Promise = require 'bluebird'
fs = Promise.promisifyAll require 'fs'
_ = require 'lodash'
module.exports = () ->
# For performance reasons, we'll do this asynchronously.
fs.readdirAsync('./controllers/').then (controllers) ->
#This probably isn't necessary: I wanted to parse through and grab all these controlle... | Convert to using tabs so as to allow editor diversity. | Convert to using tabs so as to allow editor diversity.
| CoffeeScript | unlicense | Tombert/frameworkeyPromiseEdition,Tombert/frameworkeyPromiseEdition |
37042f6dcd6c7420c327487fd5cf308532b92b6a | coffee/core/util.coffee | coffee/core/util.coffee | window.LC = window.LC ? {}
slice = Array.prototype.slice
LC.util =
last: (array, n = null) ->
if n
return slice.call(array, Math.max(array.length - n, 0))
else
return array[array.length - 1]
sizeToContainer: (canvas, callback = ->) ->
$canvas = $(canvas)
$container = $canvas.parent()... | window.LC = window.LC ? {}
slice = Array.prototype.slice
LC.util =
last: (array, n = null) ->
if n
return slice.call(array, Math.max(array.length - n, 0))
else
return array[array.length - 1]
sizeToContainer: (canvas, callback = ->) ->
$canvas = $(canvas)
$container = $canvas.parent()... | Fix sizeToContainer - actually set width | Fix sizeToContainer - actually set width
| CoffeeScript | bsd-2-clause | ivanisidrowu/literallycanvas,irskep/lc-demo,shawinder/literallycanvas,bartuspan/literallycanvas,shawinder/literallycanvas,aiwenlg007/literallycanvas,literallycanvas/literallycanvas,aiwenlg007/literallycanvas,178620086/literallycanvas,bartuspan/literallycanvas,irskep/lc-demo,irskep/literallycanvas,178620086/literallycan... |
27101fb366ce8a7dff075adea191d63bef520e33 | src/ubret/subject_viewer.coffee | src/ubret/subject_viewer.coffee | BaseTool = window.Ubret.BaseTool or require('./base_tool')
class SubjectViewer extends BaseTool
name: 'Subject Viewer'
template:
"""
<ul>
<% for(i = 0; i < keys.length; i++) { %>
<li>
<%- keys[i] %>: <%- subject[keys[i]] %>
</li>
<% } %>
</ul>
"""
start: =>
... | BaseTool = window.Ubret.BaseTool or require('./base_tool')
class SubjectViewer extends BaseTool
constructor: (opts) ->
super
@count = 0
@div = d3.select(@selector)
@start()
start: =>
subjects = new Array
if @selectedElements.length isnt 0
subjects = @dimensions.uid.top(Infinity).fil... | Revert to multi-select version of subejct_viewer | Revert to multi-select version of subejct_viewer
| CoffeeScript | mit | willettk/Ubret,zooniverse/Ubret,zooniverse/Ubret |
dc811872e1a71c60d4356096ffae3ef45bcca93c | app/assets/javascripts/rocket_job_mission_control/base.js.coffee | app/assets/javascripts/rocket_job_mission_control/base.js.coffee | $(document).load ->
readyMenuToggle()
registerJobPriority()
$(document).on 'ready page:change', ->
readyMenuToggle()
registerJobPriority()
readyMenuToggle = ->
$('#menu-toggle').click (e) ->
e.preventDefault()
$('#wrapper').toggleClass 'toggled'
$('#menu-close').click (e) ->
e.preventDefault(... | $(document).load ->
readyMenuToggle()
registerJobPriority()
$(document).on 'ready page:change', ->
readyMenuToggle()
registerJobPriority()
readyMenuToggle = ->
$('#menu-toggle').click (e) ->
e.preventDefault()
$('#wrapper').toggleClass 'toggled'
$('#menu-close').click (e) ->
e.preventDefault(... | Remove console log message from decrease job priority button. | Remove console log message from decrease job priority button.
| CoffeeScript | apache-2.0 | lambcr/rocket_job_mission_control,lambcr/rocket_job_mission_control,rocketjob/rocketjob_mission_control,rocketjob/rocketjob_mission_control,rocketjob/rocketjob_mission_control,lambcr/rocket_job_mission_control |
96733fd702dd399bc351706ba5bed1582ab54245 | tests/server/GoogleTranslateTest.coffee | tests/server/GoogleTranslateTest.coffee | googleTranslate = new practical.GoogleTranslate()
Tinytest.add 'Google Translate - should translate text' , (test)->
translation = googleTranslate.translate("My name is Brandon", "es")
expect(translation).to.be.an("Object")
expect(translation.translatedText).to.equal("Mi Nombre Es Brandon") | googleTranslate = new practical.GoogleTranslate()
Tinytest.add 'Google Translate - should translate text' , (test)->
translation = googleTranslate.translate("my name is Brandon", "es")
expect(translation).to.be.an("Object")
expect(translation.translatedText).to.equal("mi nombre es Brandon")
Tinytest.add 'Google... | Add test for multiple lines translation | Add test for multiple lines translation
| CoffeeScript | mit | practicalmeteor/meteor-google-translate |
6648b8668d30aaad8cf4df00b3ba2cdb3e5a8f05 | test/base58_test.coffee | test/base58_test.coffee | require 'should'
Base58 = require '..'
examples = require './examples'
describe 'Base58', ->
describe '.encode', ->
it 'encodes number to Base58 string', ->
for str, num of examples
Base58.encode(num).should.eql(str)
describe 'when passed a string only containing numbers', ->
it 'encod... | should = require 'should'
Base58 = require '..'
describe 'Base58', ->
beforeEach ->
@examples = require './examples' unless @examples?
should.exist(@examples)
describe '.encode', ->
it 'encodes number to Base58 string', ->
for str, num of @examples
Base58.encode(num).should.eql(str)
... | Update test with slightly cleaner and safer code | Update test with slightly cleaner and safer code
| CoffeeScript | mit | jimeh/node-base58 |
cfe77f1c1b5212b56dd5a3c73c5fb7e201574244 | server/lib/presenters/theme.coffee | server/lib/presenters/theme.coffee | Q = require('q')
async = require('async')
Theme = require('../../models/theme').model
HeadlineService = require('../services/headline')
module.exports = class ThemePresenter
constructor: (@theme) ->
@populateIndicatorRecencyStats: (themes) ->
for theme in themes
theme.outOfDateIndicatorCount = 0
... | Q = require('q')
async = require('async')
Theme = require('../../models/theme').model
HeadlineService = require('../services/headline')
module.exports = class ThemePresenter
constructor: (@theme) ->
@populateIndicatorRecencyStats: (themes) ->
for theme in themes
theme.outOfDateIndicatorCount = 0
... | Use catch rather than fail, as bluebird only supports catch | Use catch rather than fail, as bluebird only supports catch
| CoffeeScript | bsd-3-clause | unepwcmc/NRT,unepwcmc/NRT |
d8b8aa9a7108476a0fa7e6854cc945c9fb13ed35 | app/assets/javascripts/partystreusel/slider.js.coffee | app/assets/javascripts/partystreusel/slider.js.coffee | #= require partystreusel/base
#= require partystreusel/scroll_to
#= require jquery.cycle2
#= require jquery.cycle2.swipe
class Slider extends Partystreusel.Base
@className = 'Slider'
constructor: (el) ->
super
@initializeCycle()
initializeCycle: ->
# see for documenation and options:
# https://... | #= require partystreusel/base
#= require partystreusel/scroll_to
#= require jquery.cycle2
#= require jquery.cycle2.swipe
class Slider extends Partystreusel.Base
@className = 'Slider'
constructor: (el) ->
super
@slidelist = @$el.find('.slider__list')
@initializeCycle()
initializeCycle: ->
# see ... | Initialize slider on top element of slider | Initialize slider on top element of slider | CoffeeScript | mit | brandleadership/partystreusel,brandleadership/partystreusel |
6fbe7194c5cd625c88aef415f77b722fefdf876c | app/js/filters/format_votes.coffee | app/js/filters/format_votes.coffee | angular.module("app").filter "formatVotes", () ->
(number) -> # TODO use real precision, not available in web wallet yet
return number / 100000
| angular.module("app").filter "formatVotes", ($filter) ->
(number) -> # TODO use real precision, not available in web wallet yet
return $filter('number')(number / 100000,0)+' BTS'
| Make votes format a bit prettier: Add number formatting and BTS unit | Make votes format a bit prettier: Add number formatting and BTS unit
| CoffeeScript | unlicense | bitsuperlab/web_play,dacsunlimited/web_play,dacsunlimited/web_play,bitsuperlab/web_play,bitsuperlab/web_play,bitshares/web_wallet,bitshares/web_wallet,dacsunlimited/web_play |
3c6b432cf16b92a752ad28d21ae1db1438de98e5 | src/model.coffee | src/model.coffee | {Serenade} = require './serenade'
{Cache} = require './cache'
{Associations} = require './associations'
{extend} = require './helpers'
class Serenade.Model
extend(@prototype, Serenade.Properties)
extend(@prototype, Associations)
@property: -> @prototype.property(arguments...)
@collection: -> @prototype.collec... | {Serenade} = require './serenade'
{Cache} = require './cache'
{Associations} = require './associations'
{extend} = require './helpers'
class Serenade.Model
extend(@prototype, Serenade.Properties)
extend(@prototype, Associations)
@property: -> @prototype.property(arguments...)
@collection: -> @prototype.collec... | Work around CS identity map bug | Work around CS identity map bug | CoffeeScript | mit | elabs/serenade.js |
fa0329229c34af130315f3143757e6540a579f8c | app/lib/config.coffee | app/lib/config.coffee | config =
data_file_location: 'http://www.chimpandsee.org/identified-chimps/identified-species.json'
is_scientist: 'no' # This doesn't do anything yet.
speciesToTrack: ['chimpanzee', 'other-primate']
pairs = location.search.slice(1).split(',')
for pair in pairs
for key, value of pair
continue unless config.... | config =
data_file_location: 'https://www.chimpandsee.org/identified-chimps/identified-species.json'
is_scientist: 'no' # This doesn't do anything yet.
speciesToTrack: ['chimpanzee', 'other-primate']
pairs = location.search.slice(1).split(',')
for pair in pairs
for key, value of pair
continue unless config... | Update data file location to use https | Update data file location to use https
| CoffeeScript | apache-2.0 | zooniverse/identified-chimps-site,zooniverse/identified-chimps-site |
ba5026fdf5806b75ada59e4e650a08daf065828d | atom/config.cson | atom/config.cson | "*":
core:
disabledPackages: [
"background-tips"
"exception-reporting"
"metrics"
"styleguide"
"timecop"
"welcome"
]
telemetryConsent: "no"
editor:
invisibles: {}
showIndentGuide: true
showInvisibles: true
"file-icons":
forceShow: true
onChanges: ... | "*":
core:
disabledPackages: [
"background-tips"
"exception-reporting"
"metrics"
"styleguide"
"timecop"
"welcome"
]
telemetryConsent: "no"
editor:
invisibles: {}
showIndentGuide: true
showInvisibles: true
"file-icons":
forceShow: true
onChanges: ... | Set Atom spell-check locales to en-US | Set Atom spell-check locales to en-US
A workaround to fix the "Cannot load the system dictionary..." error
message when opening Atom.
| CoffeeScript | mit | jmlntw/dotfiles,jmlntw/dotfiles |
ea2cb4e6c09c9336fe8766d968894c57946c4f29 | app/assets/javascripts/admin/utils/directives/date_picker.js.coffee | app/assets/javascripts/admin/utils/directives/date_picker.js.coffee | angular.module("admin.utils").directive "datepicker", ($window, $timeout) ->
require: "ngModel"
link: (scope, element, attrs, ngModel) ->
$timeout ->
flatpickr(element, Object.assign(
{},
$window.FLATPICKR_DATE_DEFAULT, {
... | angular.module("admin.utils").directive "datepicker", ($window, $timeout) ->
require: "ngModel"
link: (scope, element, attrs, ngModel) ->
$timeout ->
flapickrInstance = flatpickr(element, Object.assign(
{},
$window.FLATPICKR_DATE_DEFAULT, {
... | Update flatpickr input value if ng-model change | Update flatpickr input value if ng-model change
| CoffeeScript | agpl-3.0 | openfoodfoundation/openfoodnetwork,openfoodfoundation/openfoodnetwork,Matt-Yorkley/openfoodnetwork,lin-d-hop/openfoodnetwork,mkllnk/openfoodnetwork,mkllnk/openfoodnetwork,Matt-Yorkley/openfoodnetwork,Matt-Yorkley/openfoodnetwork,mkllnk/openfoodnetwork,lin-d-hop/openfoodnetwork,lin-d-hop/openfoodnetwork,openfoodfoundati... |
8e7af2b5c62d0f39cc7d4ca92af39d681b25c41c | client/lanes/components/shared/Input.cjsx | client/lanes/components/shared/Input.cjsx | class Lanes.Components.Input extends Lanes.React.Component
mixins: [
Lanes.Components.Form.FieldMixin
]
formGroupClass: 'input'
propTypes:
unlabled: React.PropTypes.bool
getValue: ->
@refs.input.getValue()
renderEdit: (label) ->
colProps = _.omit(@props, 'nam... | class Lanes.Components.Input extends Lanes.React.Component
mixins: [
Lanes.Components.Form.FieldMixin
]
formGroupClass: 'input'
propTypes:
unlabled: React.PropTypes.bool
getValue: ->
@refs.input.getValue()
renderEdit: (label) ->
colProps = _.omit(@props, 'nam... | Set to empty string instead of undefined | Set to empty string instead of undefined
| CoffeeScript | mit | argosity/hippo,argosity/hippo,argosity/lanes,argosity/lanes,argosity/hippo,argosity/lanes |
abe9ff92e3bf4b1dc53b993bc96fff5c90553261 | app/assets/javascripts/visualization/simple.js.coffee | app/assets/javascripts/visualization/simple.js.coffee | class visualization.Simple
constructor: (@layer, @data, @options = {}) ->
# Build layer as wanted
buildLayerGroup: (widget, globalStyle = {}) ->
group = []
for zone in @data
zoneLayer = new L.GeoJSON(zone.shape, globalStyle)
widget._bindPopup(zoneLayer, zone)
group.push(zoneLayer)
... | class visualization.Simple
constructor: (@layer, @data, @options = {}) ->
# Build layer as wanted
buildLayerGroup: (widget, globalStyle = {}) ->
group = []
for zone in @data
zoneLayer = new L.GeoJSON(zone.shape, globalStyle)
zoneLayer.bindLabel(zone.name, globalStyle)
widget._bindPopup... | Add static label in simple visualisation map. | Add static label in simple visualisation map.
| CoffeeScript | agpl-3.0 | ekylibre/ekylibre,ekylibre/ekylibre,ekylibre/ekylibre,ekylibre/ekylibre,ekylibre/ekylibre |
bf55f989790c1892e3fab536c8188e7a6e70ae16 | scripts/bugzilla.coffee | scripts/bugzilla.coffee | # Description:
# In which Hubot gives you bugzilla information
#
# Dependencies:
# None
#
# Configuration:
# None
#
# Commands:
# hubot bug <number> - Shows bug summary
#
# Author:
# greenb
QS = require 'querystring'
Cheerio = require 'cheerio'
module.exports = (robot) ->
domain = 'http://bugs.sfola... | # Description:
# In which Hubot gives you bugzilla information
#
# Dependencies:
# None
#
# Configuration:
# None
#
# Commands:
# hubot bug <number> - Shows bug summary
#
# Author:
# greenb
QS = require 'querystring'
Cheerio = require 'cheerio'
module.exports = (robot) ->
domain = 'http://bugs.sfola... | Fix issue with incorrect bug links when multiple bug numbers given The "bug" variable was not closed over in the for loop. Fix is to move it out into a separate function. | Fix issue with incorrect bug links when multiple bug numbers given
The "bug" variable was not closed over in the for loop. Fix is to
move it out into a separate function.
| CoffeeScript | apache-2.0 | bigfix/hubot-scripts,bigfix/hubot-scripts |
4b7941424c5eccc584304f1e5421a7509fb5da90 | 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 .preview class for img attachments, since we display a preview | Add .preview class for img attachments, since we display a preview
| CoffeeScript | mit | ChenMichael/trix,ChenMichael/trix,basecamp/trix,GabiGrin/trix,basecamp/trix,GabiGrin/trix,urossmolnik/trix,urossmolnik/trix,urossmolnik/trix,basecamp/trix,basecamp/trix,GabiGrin/trix,ChenMichael/trix |
3109a48e1f308f810be3396788cad342dd2337a0 | astroid-web.coffee | astroid-web.coffee | Tasks = new Meteor.Collection("tasks")
Lists = new Meteor.Collection("lists")
Folders = new Meteor.Collection("folders")
if Meteor.isClient
Template.todos.tasks = ->
Tasks.find()
Template.todos.events
'click a.completeBox': (e) ->
Tasks.update this._id,
$set: completed: not @completed
Tem... | Tasks = new Meteor.Collection("tasks")
Lists = new Meteor.Collection("lists")
Folders = new Meteor.Collection("folders")
if Meteor.isClient
Template.todos.tasks = ->
Tasks.find()
Template.todos.events
'click a.completeBox': (e) ->
now = moment()
Tasks.update this._id,
$set:
c... | Update dateCompleted and modified when completing task | Update dateCompleted and modified when completing task
| CoffeeScript | agpl-3.0 | adelq/astroid-web |
f9a50d9d9dadef2eafd9fd42f7190e4e95ad400d | js-library/app/js/jail_iframe/util/annotated_site_receiver.coffee | js-library/app/js/jail_iframe/util/annotated_site_receiver.coffee | # Object which holds the methods that can be called from the factlink core iframe
modalOpen = false
FactlinkJailRoot.annotatedSiteReceiver =
modalFrameReady: (featureToggles) ->
FactlinkJailRoot.can_haz = featureToggles
window.FACTLINK_ON_CORE_LOAD?()
openModalOverlay: ->
return if modalOpen
Fact... | # Object which holds the methods that can be called from the factlink core iframe
modalOpen = false
FactlinkJailRoot.annotatedSiteReceiver =
modalFrameReady: (featureToggles) ->
FactlinkJailRoot.can_haz = featureToggles
window.FACTLINK_ON_CORE_LOAD?()
openModalOverlay: ->
if modalOpen
console.e... | Add warning logging when unusual things happen | Add warning logging when unusual things happen
| CoffeeScript | mit | Factlink/factlink-core,daukantas/factlink-core,daukantas/factlink-core,Factlink/factlink-core,Factlink/factlink-core,daukantas/factlink-core,Factlink/factlink-core,daukantas/factlink-core |
692b54fc5c1ac9b0e5d68694aebf7c26800fc24e | app/config.coffee | app/config.coffee | ### Configuration file
This file contains all the necessary options for running an instance of the
hog winrate calculator.
###
# Database and daemon settings
module.exports.docker =
socket: "/var/run/docker.sock"
runner:
image: "arbiter"
networkDisabled: true
memory: 50e6
timeout: 1e5
maxLen... | ### Configuration file
This file contains all the necessary options for running an instance of the
hog winrate calculator.
###
# Database and daemon settings
module.exports.docker =
socket: "/var/run/docker.sock"
runner:
image: "arbiter"
networkDisabled: true
memory: 50e6
timeout: 15e3
maxLe... | Change timeout to 15 seconds | Change timeout to 15 seconds
| CoffeeScript | apache-2.0 | kvchen/hog-winrate-web,kvchen/hog-winrate-web,kvchen/hog-winrate-web |
dee9cccae77fb4e37ddc5c69fadea2e10f0c6234 | build/tasks/compile-packages-slug-task.coffee | build/tasks/compile-packages-slug-task.coffee | path = require 'path'
CSON = require 'season'
fs = require 'fs-plus'
module.exports = (grunt) ->
{spawn} = require('./task-helpers')(grunt)
grunt.registerTask 'compile-packages-slug', 'Add package metadata information to to the main package.json file', ->
appDir = grunt.config.get('atom.appDir')
modulesD... | path = require 'path'
CSON = require 'season'
fs = require 'fs-plus'
module.exports = (grunt) ->
{spawn} = require('./task-helpers')(grunt)
grunt.registerTask 'compile-packages-slug', 'Add package metadata information to to the main package.json file', ->
appDir = grunt.config.get('atom.appDir')
modulesD... | Use proper relative paths in cache | Use proper relative paths in cache
| CoffeeScript | mit | omarhuanca/atom,h0dgep0dge/atom,yalexx/atom,Jandersoft/atom,synaptek/atom,DiogoXRP/atom,kc8wxm/atom,abcP9110/atom,isghe/atom,dannyflax/atom,t9md/atom,batjko/atom,kjav/atom,scippio/atom,scv119/atom,niklabh/atom,Neron-X5/atom,sillvan/atom,Neron-X5/atom,vcarrera/atom,ObviouslyGreen/atom,xream/atom,Mokolea/atom,harshdattan... |
3ce2e23cdc865fea23635004bfd53d4c7fb1f4f9 | src/view/bindings/route_binding.coffee | src/view/bindings/route_binding.coffee | #= require ./abstract_binding
class Batman.DOM.RouteBinding extends Batman.DOM.AbstractBinding
onAnchorTag: false
onlyObserve: Batman.BindingDefinitionOnlyObserve.Data
@accessor 'dispatcher', ->
@view.lookupKeypath('dispatcher') || Batman.App.get('current.dispatcher')
bind: ->
if @node.nodeName.toUpp... | #= require ./abstract_binding
class Batman.DOM.RouteBinding extends Batman.DOM.AbstractBinding
onAnchorTag: false
onlyObserve: Batman.BindingDefinitionOnlyObserve.Data
@accessor 'dispatcher', ->
@view.lookupKeypath('dispatcher') || Batman.App.get('current.dispatcher')
bind: ->
if @node.nodeName.toUpp... | Allow click events to propagate for anchors with target="_blank" | Allow click events to propagate for anchors with target="_blank"
| CoffeeScript | mit | getshuvo/batman,getshuvo/batman |
c5ad50b0d98791b26cbb212d611bec114e2dbef4 | site/server/indexes.coffee | site/server/indexes.coffee |
exports.site_docs =
index: (doc) ->
blocks = ['site_intro','site_home']
types = ['essay','scene','video','profile']
if doc.site and doc.type and types.indexOf(doc.type) >= 0 and doc.published is true
content = doc.title + ' ' + doc.intro + ' ' + doc.body
published = parseInt(doc.p... |
exports.site_docs =
index: (doc) ->
blocks = ['site_intro','site_home']
types = ['essay','scene','video','profile']
if doc.site and doc.type and types.indexOf(doc.type) >= 0 and doc.published is true
content = doc.title + ' ' + doc.intro + ' ' + doc.body
published = parseInt(doc.p... | Fix collection names to show up in search results | Fix collection names to show up in search results
| CoffeeScript | mit | markuso/kleks,markuso/kleks |
18e4631b987f61b694ee14f1fab25cffe15fb970 | app/assets/javascripts/static.js.coffee | app/assets/javascripts/static.js.coffee | # Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
$ ->
animateMetric = $(".metric-box strong").each ->
$this = $(this)
jQuery(counter: 0).animate { ... | # Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
$ ->
animateMetric = $(".metric-box strong").each ->
$this = $(this)
starting_point = 0
$targe... | Convert number animation to use TweenJS | Convert number animation to use TweenJS
| CoffeeScript | agpl-3.0 | otherchirps/morph,openaustralia/morph,otherchirps/morph,openaustralia/morph,otherchirps/morph,openaustralia/morph,openaustralia/morph,otherchirps/morph,otherchirps/morph,otherchirps/morph,openaustralia/morph,openaustralia/morph,otherchirps/morph,openaustralia/morph |
7041c37b7c9b738a8005d36a09e7d6ba405fd76c | client/skr/screens/locations/Locations.cjsx | client/skr/screens/locations/Locations.cjsx | class Skr.Screens.Locations extends Skr.Screens.Base
dataObjects:
location: ->
@props.location || new Skr.Models.Location
getInitialState: ->
commands: new Lanes.Screens.Commands(this, modelName: 'location')
render: ->
<LC.ScreenWrapper identifier="locations">
... | class Skr.Screens.Locations extends Skr.Screens.Base
dataObjects:
location: ->
@props.location || new Skr.Models.Location
getInitialState: ->
commands: new Lanes.Screens.Commands(this, modelName: 'location')
render: ->
<LC.ScreenWrapper identifier="locations">
... | Add image chooser for logo | Add image chooser for logo
| CoffeeScript | agpl-3.0 | argosity/stockor,argosity/stockor,argosity/stockor,argosity/stockor |
0a60876e67b606ed12b1d9149b9349027c7facd6 | test/spec.coffee | test/spec.coffee | assert = chai.assert
$ = Rye
suite 'Basic functionality', ->
test 'Rye()', ->
assert.instanceof Rye('div'), Rye, 'returns instance of Rye'
suite 'Querying', ->
test 'ID query', ->
el = $('#hello')
assert.lengthOf el, 1, 'result has length 1'
| assert = chai.assert
$ = Rye
setup ->
document.getElementById('test').style.display = 'block'
teardown ->
document.getElementById('test').style.display = 'none'
suite 'Basic functionality', ->
test 'Rye()', ->
assert.instanceOf Rye('div'), Rye, 'returns instance of Rye'
suite 'Querying', ->
... | Hide test HTML on teardown, fix tests | Hide test HTML on teardown, fix tests
| CoffeeScript | isc | ryejs/rye,ryejs/rye |
cb1640a51ca5e16123941d6451c30d10e21173e3 | core/app/assets/javascripts/frontend/framedFactlinkCoreClient.coffee | core/app/assets/javascripts/frontend/framedFactlinkCoreClient.coffee | window.initClientCommunicator = ->
local =
showFactlink: (id) -> showUrl "/client/facts/#{id}"
prepareNewFactlink: (displaystring, url, fact_title, current_user_opinion='no_vote') ->
showUrl "/client/facts/new" +
"?displaystring=" + encodeURIComponent(displaystring) +
"&url=" + encodeUR... | window.initClientCommunicator = ->
local =
showFactlink: (id) -> showUrl "/client/facts/#{id}"
prepareNewFactlink: (displaystring, url, fact_title, current_user_opinion='no_vote') ->
showUrl "/client/facts/new" +
"?displaystring=" + encodeURIComponent(displaystring) +
"&url=" + encodeUR... | Fix js tests in client | Fix js tests in client
| CoffeeScript | mit | Factlink/factlink-core,daukantas/factlink-core,daukantas/factlink-core,Factlink/factlink-core,daukantas/factlink-core,Factlink/factlink-core,daukantas/factlink-core,Factlink/factlink-core |
2f08af0de5a59257889ae05ed2016f9a6798c577 | spec_app/spec/javascripts/helpers/show_lib_versions.coffee | spec_app/spec/javascripts/helpers/show_lib_versions.coffee | showVersions = ->
$('.jasmine-version').text """
jQuery #{$.fn.jquery}
Unpoly #{up.version}
Jasmine #{jasmine.version}
"""
$ ->
# Give Jasmine time to initialize
setTimeout(showVersions, 0) | showVersions = ->
$('.jasmine-version').text """
jQuery #{$.fn.jquery}
Jasmine #{jasmine.version}
"""
$ ->
# Give Jasmine time to initialize
setTimeout(showVersions, 0) | Remove Unpoly version from Jasmine spec runner | Remove Unpoly version from Jasmine spec runner
| CoffeeScript | mit | unpoly/unpoly,unpoly/unpoly,unpoly/unpoly |
865cba56221dfb6a553bd8a163ffb5395bcbf75f | src/scripts/pages/browse-content/browse-content.coffee | src/scripts/pages/browse-content/browse-content.coffee | define (require) ->
subjects = require('cs!collections/subjects')
BaseView = require('cs!helpers/backbone/views/base')
MainPageView = require('cs!modules/main-page/main-page')
FindContentView = require('cs!modules/find-content/find-content')
template = require('hbs!./browse-content-template')
require('less!... | define (require) ->
subjects = require('cs!collections/subjects')
BaseView = require('cs!helpers/backbone/views/base')
MainPageView = require('cs!modules/main-page/main-page')
FindContentView = require('cs!modules/find-content/find-content')
template = require('hbs!./browse-content-template')
require('less!... | Move findContentView to page code | Move findContentView to page code
The way the Find Content bar was being inserted was causing it to
appear twice.
| CoffeeScript | agpl-3.0 | katalysteducation/webview,dak/webview,Connexions/webview,katalysteducation/webview,dak/webview,katalysteducation/webview,Connexions/webview,katalysteducation/webview,dak/webview,Connexions/webview,Connexions/webview |
0b7587f452126612460dd6262d331234814c6d72 | src/helper/paramHandler/paramHandler.coffee | src/helper/paramHandler/paramHandler.coffee | class ParamHandler
all: (callback) ->
process = 'src/server --port 8000 --env development'
match = process.match /--[a-zA-Z]* ([a-zA-Z0-9]*)/g
payload = {}
match.map (found) ->
parse = found.match(/--([a-zA-Z]*)\s/)
payload[parse[1]] = found.replace parse[0], ''
callback payload
... | class ParamHandler
constructor: (@payload = {}) ->
getArguments: (process, callback) ->
match = process.argv.join(' ').match /--[a-zA-Z]* ([a-zA-Z0-9]*)/g
match.map (found) =>
parse = found.match(/--([a-zA-Z]*)\s/)
@payload[parse[1]] = found.replace parse[0], ''
callback @payload
module... | Handle with Process-Arguments and tidy | Handle with Process-Arguments and tidy
| CoffeeScript | mit | sm0k1nggnu/entertain.io |
46bf2ad0d6c19479a4e541f2cd383cd0e7571e27 | app/scripts/controllers/main.coffee | app/scripts/controllers/main.coffee | 'use strict'
angular.module('taarifaWaterpointsApp')
.controller 'MainCtrl', ($scope, Waterpoint) ->
$scope.waterpoints = Waterpoint.query()
| 'use strict'
angular.module('taarifaWaterpointsApp')
.controller 'MainCtrl', ($scope, Waterpoint) ->
$scope.waterpoints = Waterpoint.query()
.controller 'MapCtrl', ($scope, Waterpoint) ->
$scope.dar =
lat: -6.7701973
lng: 39.2664484
zoom: 6
$scope.markers = {}
Waterpoint.query (wa... | Add MapCtrl to build markers grouped by district | Add MapCtrl to build markers grouped by district
| CoffeeScript | apache-2.0 | gwob/Maarifa,gwob/Maarifa,gwob/Maarifa,gwob/Maarifa,gwob/Maarifa |
679929506f418d102d9c86f4253a11de0c37b850 | client/landing/app/Applications/WebTerm.kdapplication/AppController.coffee | client/landing/app/Applications/WebTerm.kdapplication/AppController.coffee | class WebTermController extends AppController
KD.registerAppClass this,
name : "WebTerm"
route : "/Develop"
multiple : yes
hiddenHandle : no
behavior : "application"
preCondition :
condition : (options, cb)->
KD.singletons.vmController.info (err, vm, info... | class WebTermController extends AppController
KD.registerAppClass this,
name : "WebTerm"
route : "/Develop"
multiple : yes
hiddenHandle : no
behavior : "application"
preCondition :
condition : (options, cb)->
{params} = options
vmName = params?.... | Fix WebTerm to work correctly with multiple VMs | Fix WebTerm to work correctly with multiple VMs
| CoffeeScript | agpl-3.0 | andrewjcasal/koding,acbodine/koding,szkl/koding,drewsetski/koding,drewsetski/koding,usirin/koding,kwagdy/koding-1,andrewjcasal/koding,kwagdy/koding-1,cihangir/koding,andrewjcasal/koding,cihangir/koding,acbodine/koding,gokmen/koding,kwagdy/koding-1,koding/koding,sinan/koding,drewsetski/koding,jack89129/koding,mertaytore... |
e8fa3192c5b74d4ccbb157426af73385034dc736 | node_modules_koding/koding-config-manager/config.coffee | node_modules_koding/koding-config-manager/config.coffee | _ = require 'underscore'
traverse = require 'traverse'
KONFIG = {}
try
module.exports = KONFIG = JSON.parse process.env.KONFIG_JSON
catch err
console.error 'error: could not parse KONFIG_JSON environment variable'
console.error err
process.exit 1
traverse.forEach KONFIG, (node) ->
if val = process.env["KO... | _ = require 'underscore'
traverse = require 'traverse'
KONFIG = {}
do ->
unless 'first' of Array.prototype
Object.defineProperty Array.prototype, 'first',
get: -> this[0]
unless 'last' of Array.prototype
Object.defineProperty Array.prototype, 'last',
get: -> this[this.length-1]
try
module... | Add Array::first and Array::last back | node: Add Array::first and Array::last back
| CoffeeScript | agpl-3.0 | gokmen/koding,acbodine/koding,cihangir/koding,rjeczalik/koding,rjeczalik/koding,alex-ionochkin/koding,mertaytore/koding,cihangir/koding,jack89129/koding,sinan/koding,jack89129/koding,szkl/koding,sinan/koding,drewsetski/koding,koding/koding,andrewjcasal/koding,cihangir/koding,andrewjcasal/koding,gokmen/koding,drewsetski... |
f812f17df756ac35c01e8d5541b34718155c2196 | app/assets/javascripts/welcome.coffee | app/assets/javascripts/welcome.coffee | # Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
jQuery ->
console.log 'Page loaded!'
map = L.map('mapid').setView([40.75, -74.00], 12)
# OSM Tile l... | # Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
jQuery ->
console.log 'Page loaded!'
if $('#mapid').length > 0
map = L.map('mapid').setView([40.7... | Customize geojson markers based on dataset styles | Customize geojson markers based on dataset styles
| CoffeeScript | mit | glampr/simplevis,glampr/simplevis,glampr/simplevis |
ff32d0c457281ba30c1a344fe567bd90c6a80c14 | deployment/grouptoenvmapping.coffee | deployment/grouptoenvmapping.coffee | proxies = [
'koding-proxy-ap-s-e-1'
'koding-proxy-us-east-1'
'koding-proxy-eu-west-1'
'koding-proxy-us-west-2'
'koding-proxy-dev-us-e-1'
'koding-proxy-dev-us-e-1-v2'
]
envs = [
'dev'
'default'
'koding-latest'
'koding-monitor'
'koding-prod'
'koding-sandbox'
]
groupToEnv =
'webserver' : en... | proxies = [
'koding-proxy-ap-s-e-1'
'koding-proxy-us-east-1'
'koding-proxy-eu-west-1'
'koding-proxy-us-west-2'
'koding-proxy-dev-us-e-1'
'koding-proxy-dev-us-e-1-v2'
]
envs = [
'dev'
'default'
'koding-latest'
'koding-monitor'
'koding-prod'
'koding-sandbox'
]
groupToEnv =
'webserver' : en... | Add external group to worker environment mapping | Add external group to worker environment mapping
Signed-off-by: Sonmez Kartal <d2d15c3d37396a5f2a09f8b42cf5f27d43a3fbde@koding.com>
| CoffeeScript | agpl-3.0 | koding/koding,koding/koding,cihangir/koding,szkl/koding,koding/koding,szkl/koding,rjeczalik/koding,mertaytore/koding,koding/koding,rjeczalik/koding,mertaytore/koding,koding/koding,gokmen/koding,mertaytore/koding,gokmen/koding,rjeczalik/koding,rjeczalik/koding,cihangir/koding,szkl/koding,koding/koding,szkl/koding,rjecza... |
ec167994fca3077f4047d1fc5ae1cd678418d208 | client/source/views/users/edit.coffee | client/source/views/users/edit.coffee | _ = require 'underscore'
View = require 'lib/view'
tpl = require 'templates/users/edit'
FormMixin = require 'views/base/mixins/form'
mediator = require('chaplin').mediator
module.exports = class EditUserView extends View
@mixin FormMixin
template: tpl
autoRender: yes
region: 'contactCard'
events:
'su... | _ = require 'underscore'
View = require 'lib/view'
tpl = require 'templates/users/edit'
FormMixin = require 'views/base/mixins/form'
mediator = require('chaplin').mediator
module.exports = class EditUserView extends View
@mixin FormMixin
template: tpl
autoRender: yes
region: 'contactCard'
events:
'su... | Add a success message when saving a user | Add a success message when saving a user
| CoffeeScript | agpl-3.0 | edolyne/hive,asm-products/buckets,bucketsio/buckets,artelse/buckets,mamute/buckets,edolyne/hive,mikesmithmsm/buckets,asm-products/buckets,dut3062796s/buckets,nishant8BITS/buckets,nishant8BITS/buckets,dut3062796s/buckets,mamute/buckets,artelse/buckets,mikesmithmsm/buckets,edolyne/buckets,edolyne/buckets,bucketsio/bucket... |
c45d5c9521d714ab695e2c325ebe1896a97fecfa | storage/lib/geolog/index.coffee | storage/lib/geolog/index.coffee | debug = require('debug') 'gc:geologs'
upsert = require '../db/upsert'
Promise = require 'bluebird'
module.exports = (db) ->
upsert: (data) ->
debug "upsert #{data.Code?.toLowerCase()}"
upsert db, 'logs', data
latest: Promise.coroutine (username) ->
debug "latest #{username}"
[c... | debug = require('debug') 'gc:geologs'
upsert = require '../db/upsert'
Promise = require 'bluebird'
module.exports = (db) ->
upsert: (data) ->
debug "upsert #{data.Code?.toLowerCase()}"
upsert db, 'logs', data
latest: Promise.coroutine (username) ->
debug "latest #{username}"
[c... | Trim username for latest geolog | Trim username for latest geolog
| CoffeeScript | mit | foobert/gc,foobert/gc,foobert/gc,foobert/gc |
4c6c48fb44f1bb1b966fe5c8af69d31d2535eb7f | src/index.cjsx | src/index.cjsx | React = require 'react'
deep = require 'deep-get-set'
module.exports = React.createClass
displayName: "SimpleTable"
propTypes:
columns: React.PropTypes.array
data: React.PropTypes.array
render: ->
columns = @props.columns.map (column) ->
if typeof column is "string"
<th key={column}>{... | React = require 'react'
deep = require 'deep-get-set'
module.exports = React.createClass
displayName: "SimpleTable"
propTypes:
columns: React.PropTypes.array
data: React.PropTypes.array
render: ->
columns = @props.columns.map (column) ->
if typeof column is "string"
<th key={column}>{... | Allow for accessing data with dot-notation in simple column case as well | Allow for accessing data with dot-notation in simple column case as well
| CoffeeScript | mit | KyleAMathews/react-simple-table |
efd263cd4b15c25995bfa0e4d8a3ccd77a37ca05 | public/html.coffee | public/html.coffee | # Ctrl-e switches to edit mode
$(window).keydown (event) ->
if event.ctrlKey && String.fromCharCode(event.keyCode) == "E"
href = window.location.href.replace(/\.html/, '')
href = href.replace(/\/index$/, '/')
window.location = href
| # Ctrl-e switches to edit mode
$(window).keydown (event) ->
if event.ctrlKey && String.fromCharCode(event.keyCode) == "E"
href = window.location.href.replace(/\.html(#.*)?/, '')
href = href.replace(/\/index$/, '/')
window.location = href
| Switch to edit mode even with a hashtag in the URL | Switch to edit mode even with a hashtag in the URL | CoffeeScript | mit | sunny/edith,sunny/edith |
5914e3ab799f36a6c7bb5707e88598540d04e804 | BackofficeBundle/Resources/public/coffee/mediatheque/orchestraMediaType.coffee | BackofficeBundle/Resources/public/coffee/mediatheque/orchestraMediaType.coffee | #--[ MEDIA SELECTED ]--#
$(document).on "dblclick", ".mediaModalContainer img.selectable", (event) ->
event.preventDefault()
mediaModalContainer = $(event.target).parents(".mediaModalContainer")
mediaSrc = $(event.target).attr('src')
mediaId = $(event.target).data('id')
inputId = '#' + mediaModalContainer.da... | #--[ MEDIA SELECTED ]--#
$(document).on "dblclick", ".mediaModalContainer img.selectable", (event) ->
event.preventDefault()
mediaModalContainer = $(event.target).parents(".mediaModalContainer")
mediaSrc = $(event.target).attr('src')
mediaId = $(event.target).data('id')
inputId = '#' + mediaModalContainer.da... | Add css for no src image | Add css for no src image
| CoffeeScript | apache-2.0 | open-orchestra/open-orchestra-media-admin-bundle,open-orchestra/open-orchestra-media-admin-bundle,open-orchestra/open-orchestra-cms-bundle,open-orchestra/open-orchestra-cms-bundle,open-orchestra/open-orchestra-cms-bundle,open-orchestra/open-orchestra-media-admin-bundle |
f152be73f0c76eff47352f0765ee9e09ced995f5 | atom/dot-atom/projects.glasbren-oryxpro.cson | atom/dot-atom/projects.glasbren-oryxpro.cson | [
{
title: "Spyns"
group: "Development"
paths: [
"~/Development/spyns"
]
}
{
title: "CSI-702: Homework02 Instructor Attempt"
group: "Mason Fall 2017"
paths: [
"~/Documents/work/teaching/2017_Spring_Semester/CSI-702_High_Performance_Computing/assignments/homework02-instructo... | [
{
title: "CDS-411 Instructors"
group: "CDS-411"
paths: [
"~/Courses/CDS-411/instructors"
]
}
{
title: "Spyns"
group: "Development"
paths: [
"~/Development/spyns"
]
}
{
title: "CSI-702 Spr17: Homework02 Instructor Attempt"
group: "CSI-702"
paths: [
... | Update projects on oryx pro | Update projects on oryx pro
| CoffeeScript | unlicense | jkglasbrenner/dotfiles,jkglasbrenner/dotfiles,jkglasbrenner/dotfiles,jkglasbrenner/dotfiles,jkglasbrenner/dotfiles,jkglasbrenner/dotfiles |
5c4d59a95e83aa937583c18cd2d721959be00b64 | lib/sensu-dashboard/assets/javascripts/collections/base.coffee | lib/sensu-dashboard/assets/javascripts/collections/base.coffee | namespace 'SensuDashboard.Collections', (exports) ->
class exports.Base extends Backbone.Collection
longPolling: false
intervalSeconds: 10
startLongPolling: (intervalSeconds) =>
@longPolling = true
if intervalSeconds
@intervalSeconds = @intervalSeconds
@executeLongPolling()
... | namespace 'SensuDashboard.Collections', (exports) ->
class exports.Base extends Backbone.Collection
longPolling: false
intervalSeconds: 10
startLongPolling: (intervalSeconds) =>
@longPolling = true
@intervalSeconds = intervalSeconds if intervalSeconds
@executeLongPolling()
stopLo... | Use correct interval for polling | Use correct interval for polling
| CoffeeScript | mit | sensu/sensu-dashboard,pantheon-systems/sensu-dashboard,sensu/sensu-dashboard,pantheon-systems/sensu-dashboard |
5b42c71f59ca1242641d03c959e8b061d897cd4d | assets/javascripts/controllers/index_controller.js.coffee | assets/javascripts/controllers/index_controller.js.coffee | App.IndexController = Ember.ArrayController.extend
needs: ["application"]
currentUser: Ember.computed.alias("controllers.application.currentUser")
itemController: "RoomUserStateItem"
| App.IndexController = Ember.ArrayController.extend
needs: ["application"]
currentUser: Ember.computed.alias("controllers.application.currentUser")
itemController: "RoomUserStateItem"
detectMessageType: (msgTxt)->
if msgTxt.match("\n")
"paste"
else
"text"
actions:
postMessage: (msgT... | Add new msg posting to IndexController | Add new msg posting to IndexController
| CoffeeScript | mit | sashafklein/bloc-mogo,HashNuke/mogo-chat,HashNuke/mogo-chat,louishawkins/mogo-chat,di-stars/mogo-chat,louishawkins/mogo-chat,HashNuke/mogo-chat,sashafklein/bloc-mogo,di-stars/mogo-chat,sashafklein/bloc-mogo,di-stars/mogo-chat,louishawkins/mogo-chat |
892ff7f331fbb61eefdeb2bba71b6f031d5d70b2 | app/assets/javascripts/comply/index.js.coffee | app/assets/javascripts/comply/index.js.coffee | #= require comply/config
#= require_tree .
$ -> $('[data-validate-model]').each -> new Comply.ValidatableForm $(this)
| #= require comply/config
#= require_tree .
$ ->
$('[data-validate-model]').each ->
$(this).data('comply-form', new Comply.ValidatableForm($(this)))
| Store ValidatableForm object on DOM element | Store ValidatableForm object on DOM element
| CoffeeScript | mit | lumoslabs/comply,lumoslabs/comply,lumoslabs/comply |
0229ebb7e319263f6ccc92ec011bcbba728d70e3 | components/inquiry_questionnaire/index.coffee | components/inquiry_questionnaire/index.coffee | modalize = require '../modalize/index.coffee'
FlashMessage = require '../flash/index.coffee'
# We intentionally escape HTML in the template due to an XSS vulnerability.
# Consciously and manually override that here for this instance:
FlashMessage::template = -> "<span>#{@message}</span>"
InquiryQuestionnaireView = requ... | modalize = require '../modalize/index.coffee'
FlashMessage = require '../flash/index.coffee'
# We intentionally escape HTML in the template due to an XSS vulnerability.
# Consciously and manually override that here for this instance:
FlashMessage::template = -> "<span>#{@message}</span>"
InquiryQuestionnaireView = requ... | Create an anonymous session if one does not exist | Create an anonymous session if one does not exist
| CoffeeScript | mit | artsy/force,izakp/force,yuki24/force,damassi/force,cavvia/force-1,cavvia/force-1,anandaroop/force,mzikherman/force,yuki24/force,cavvia/force-1,erikdstock/force,dblock/force,xtina-starr/force,anandaroop/force,izakp/force,anandaroop/force,yuki24/force,artsy/force,eessex/force,joeyAghion/force,kanaabe/force,mzikherman/for... |
5ba541fb430e86d0a151f4b455e978f247b9d6ad | app/routes/accounts/index.coffee | app/routes/accounts/index.coffee | `import TravisRoute from 'travis/routes/basic'`
Route = TravisRoute.extend
redirect: ->
# TODO: setting accounts model in ProfileRoute is wrong, but
# at this stage it's better than what we had before
accounts = @modelFor('accounts')
login = @controllerFor('currentUser').get('model.login')
... | `import TravisRoute from 'travis/routes/basic'`
Route = TravisRoute.extend
redirect: ->
# TODO: setting accounts model in ProfileRoute is wrong, but
# at this stage it's better than what we had before
accounts = @modelFor('accounts')
login = @controllerFor('currentUser').get('model.login')
... | Use transitionTo instead of replaceWith on profile page | Use transitionTo instead of replaceWith on profile page
| CoffeeScript | mit | fotinakis/travis-web,fotinakis/travis-web,fauxton/travis-web,2947721120/travis-web,mjlambert/travis-web,Tiger66639/travis-web,jlrigau/travis-web,jlrigau/travis-web,fauxton/travis-web,fauxton/travis-web,fauxton/travis-web,fotinakis/travis-web,Tiger66639/travis-web,2947721120/travis-web,Tiger66639/travis-web,travis-ci/tr... |
8cb7aa2d2d5dbef0b0f21a69fd7d0e32108e8e47 | app/assets/javascripts/sprangular/controllers/cart.coffee | app/assets/javascripts/sprangular/controllers/cart.coffee | Sprangular.controller "CartCtrl", (
$scope,
Cart,
Account,
Status,
Angularytics,
Env
) ->
$scope.user = Account.user
$scope.cart = Cart.current
$scope.status = Status
$scope.currencySymbol = Env.currency.symbol
$scope.removeAdjustment = (adjustment) ->
Angularytics.trackEvent("Cart", "Coupon... | Sprangular.controller "CartCtrl", (
$scope,
Cart,
Account,
Status,
Angularytics,
Env
) ->
$scope.user = Account.user
$scope.status = Status
$scope.currencySymbol = Env.currency.symbol
$scope.$watch (-> Cart.current), (newOrder) ->
$scope.cart = newOrder
$scope.removeAdjustment = (adjustment... | Add $watch for Cart.current in CartCtrl | Add $watch for Cart.current in CartCtrl
| CoffeeScript | mit | sprangular/sprangular,sprangular/sprangular,sprangular/sprangular |
0a0b8c1ad8f42f5a5e2ab83676ac876ff9e5cdb6 | core/spec/javascripts-konacha/views/conversations/start_conversation_view_spec.coffee | core/spec/javascripts-konacha/views/conversations/start_conversation_view_spec.coffee | #= require application
#= require frontend
describe 'StartConversationView', ->
it 'initial state', ->
view = new window.StartConversationView
view.render()
content = view.$('.js-message-textarea').val()
content.should.equal "Check out this Henk!"
| #= require application
#= require frontend
describe 'StartConversationView', ->
it 'initial state', ->
view = new window.StartConversationView
view.render()
content = view.$('.js-message-textarea').val()
content.should.equal "Check out this Factlink!"
| Revert "intentionally failed the konacha test" | Revert "intentionally failed the konacha test"
This reverts commit 29026a7bbfb69445453e3ba7f5fb2c80c997c7f7.
| CoffeeScript | mit | Factlink/factlink-core,Factlink/factlink-core,daukantas/factlink-core,daukantas/factlink-core,daukantas/factlink-core,Factlink/factlink-core,daukantas/factlink-core,Factlink/factlink-core |
645f41309abf975345cff20e3d4c9e7212e783af | lib/minimap-selection-view.coffee | lib/minimap-selection-view.coffee | {CompositeDisposable} = require 'event-kit'
module.exports =
class MinimapSelectionView
decorations: []
constructor: (@minimap) ->
editor = @minimap.getTextEditor()
@subscriptions = new CompositeDisposable
@subscriptions.add editor.onDidAddCursor @handleSelection
@subscriptions.add editor.onDidC... | {CompositeDisposable} = require 'event-kit'
module.exports =
class MinimapSelectionView
decorations: []
constructor: (@minimap) ->
editor = @minimap.getTextEditor()
@subscriptions = new CompositeDisposable
@subscriptions.add editor.onDidAddCursor @handleSelection
@subscriptions.add editor.onDidC... | Add plugin origin to created decorations | Add plugin origin to created decorations
| CoffeeScript | mit | atom-minimap/minimap-selection |
62e5e9f16a7346b22d076c3c059a4866f20585d5 | lib/grammar-status-view.coffee | lib/grammar-status-view.coffee | {View} = require 'atom'
# View to show the grammar name in the status bar.
module.exports =
class GrammarStatusView extends View
@content: ->
@div class: 'grammar-status', =>
@a href: '#', class: 'inline-block', outlet: 'grammarLink'
initialize: (@statusBar) ->
@subscribe @statusBar, 'active-buffer-... | {View} = require 'atom'
# View to show the grammar name in the status bar.
module.exports =
class GrammarStatusView extends View
@content: ->
@div class: 'grammar-status', =>
@a href: '#', class: 'inline-block', outlet: 'grammarLink'
initialize: (@statusBar) ->
@subscribe @statusBar, 'active-buffer-... | Set grammar data attr on link | Set grammar data attr on link
| CoffeeScript | mit | atom/grammar-selector |
14b73149be046b45bca1be8a4b8be08cfc413781 | app/assets/javascripts/darkswarm/controllers/authentication/signup_controller.js.coffee | app/assets/javascripts/darkswarm/controllers/authentication/signup_controller.js.coffee | Darkswarm.controller "SignupCtrl", ($scope, $http, $window, $location, Redirections, AuthenticationService) ->
$scope.path = "/signup"
$scope.spree_user.password_confirmation = ''
$scope.errors =
email: null
password: null
$scope.submit = ->
$http.post("/user/spree_user", {spree_user: $scope.spre... | Darkswarm.controller "SignupCtrl", ($scope, $http, $window, $location, Redirections, AuthenticationService) ->
$scope.path = "/signup"
$scope.spree_user.password_confirmation = ''
$scope.errors =
email: null
password: null
$scope.submit = ->
$http.post("/user/spree_user", {spree_user: $scope.spre... | Remove stale form validation messages when showing new confirmation sent message | Remove stale form validation messages when showing new confirmation sent message
| CoffeeScript | agpl-3.0 | mkllnk/openfoodnetwork,Matt-Yorkley/openfoodnetwork,oeoeaio/openfoodnetwork,oeoeaio/openfoodnetwork,Matt-Yorkley/openfoodnetwork,lin-d-hop/openfoodnetwork,mkllnk/openfoodnetwork,lin-d-hop/openfoodnetwork,openfoodfoundation/openfoodnetwork,Matt-Yorkley/openfoodnetwork,oeoeaio/openfoodnetwork,openfoodfoundation/openfoodn... |
8f120f1d27cb065c2443e5d937df1bc9d963cbce | 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(true).toBe true
| 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", ->
... | Work on RequireJS Jasmine test. | Work on RequireJS Jasmine test.
| CoffeeScript | agpl-3.0 | arifsetiawan/edx-platform,Kalyzee/edx-platform,chand3040/cloud_that,jazkarta/edx-platform-for-isc,ESOedX/edx-platform,BehavioralInsightsTeam/edx-platform,cselis86/edx-platform,Kalyzee/edx-platform,antonve/s4-project-mooc,EduPepperPD/pepper2013,gsehub/edx-platform,xuxiao19910803/edx,cpennington/edx-platform,Softmotions/... |
2aee77dc8651670b1de85cfa9b8bdaea2b5267e8 | lib/to-the-hubs.coffee | lib/to-the-hubs.coffee | GitHubFile = require './github-file'
module.exports =
activate: ->
return unless project.getRepo()?
rootView.command 'github:open', ->
if itemPath = rootView.getActivePaneItem()?.getPath?()
GitHubFile.fromPath(itemPath).open()
rootView.command 'github:blame', ->
if itemPath = rootV... | GitHubFile = require './github-file'
module.exports =
activate: ->
return unless project.getRepo()?
rootView.eachPane (pane) ->
pane.command 'github:open', ->
if itemPath = rootView.getActivePaneItem()?.getPath?()
GitHubFile.fromPath(itemPath).open()
pane.command 'github:blam... | Enable commands only when a file pane is active | Enable commands only when a file pane is active
If there are no file panes open in Atom, it doesn't make sense to show the
github:open and github:blame commands in the command palette. So, instead of
_always_ making these commands available, let's make them available only when
a file pane is active.
| CoffeeScript | mit | atom/open-on-github |
07f56a6093cea045a78f6616b73a51064a853e36 | components/logged_out_cta/index.coffee | components/logged_out_cta/index.coffee | Cookies = require 'cookies-js'
module.exports = ->
$el = $('.lo-cta')
unless Cookies.get('lo-cta')
$el.addClass 'lo-cta--visible'
$el.on 'click', '.lo-cta__close', (e) ->
$el.removeClass 'lo-cta--visible'
# Cookie expires in 1 day
Cookies.set 'lo-cta', true, { expires: 86400000 } | Cookies = require 'cookies-js'
analytics = require '../../lib/analytics.coffee'
module.exports = ->
$el = $('.lo-cta')
unless Cookies.get('lo-cta')
$el.addClass 'lo-cta--visible'
$el.on 'click', '.lo-cta__close', (e) ->
$el.removeClass 'lo-cta--visible'
analytics.track.click 'Clicked on Learn... | Add tracking to logged out cta | Add tracking to logged out cta
| CoffeeScript | mit | aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell |
bc5bb04dd7598b35209c7f9a91c81d9cb306ee39 | lib/archive-editor.coffee | lib/archive-editor.coffee | path = require 'path'
archive = require 'ls-archive'
{File} = require 'pathwatcher'
fs = require 'fs-plus'
Serializable = require 'serializable'
module.exports=
class ArchiveEditor extends Serializable
atom.deserializers.add(this)
@activate: ->
atom.project.registerOpener (filePath) ->
new ArchiveEditor... | path = require 'path'
archive = require 'ls-archive'
{File} = require 'pathwatcher'
fs = require 'fs-plus'
Serializable = require 'serializable'
module.exports=
class ArchiveEditor extends Serializable
atom.deserializers.add(this)
@activate: ->
atom.project.registerOpener (filePath) ->
new ArchiveEditor... | Use absolute path as URI | Use absolute path as URI
| CoffeeScript | mit | atom/archive-view |
61675041f7e187a4d4fb8325e4c75b263233c6df | client/app/collections/application.coffee | client/app/collections/application.coffee | BaseCollection = require 'lib/base_collection'
Application = require 'models/application'
# List of installed applications.
module.exports = class ApplicationCollection extends BaseCollection
model: Application
url: 'api/applications/'
apps: []
get: (idorslug) ->
out = super idorslug
... | BaseCollection = require 'lib/base_collection'
Application = require 'models/application'
# List of installed applications.
module.exports = class ApplicationCollection extends BaseCollection
model: Application
url: 'api/applications/'
apps: []
get: (idorslug) ->
out = super idorslug
... | Fix for when an app has no displayName | Fix for when an app has no displayName
| CoffeeScript | agpl-3.0 | babolivier/cozy-home,jsilvestre/cozy-home,clochix/cozy-home,frankrousseau/cozy-home,frankrousseau/cozy-home,babolivier/cozy-home,jsilvestre/cozy-home,clochix/cozy-home |
b2b717698241579bf390f1f0cc733e42561da0dc | controllers/temperature-controller.coffee | controllers/temperature-controller.coffee | request = require 'request'
_ = require 'lodash'
class TemperatureController
celsius: (req, res) =>
{city, state, country} = req.query
location = _.compact([city, state, country]).join ','
@request 'metric', location, (error, response, body) =>
return res.status(500).send(error) if error?
... | request = require 'request'
_ = require 'lodash'
class TemperatureController
celsius: (req, res) =>
{city, state, country} = req.query
location = _.compact([city, state, country]).join ','
@request 'metric', location, (error, response, body) =>
return res.status(500).send(error) if error?
... | Return JSON object instead of a primitive | Return JSON object instead of a primitive
| CoffeeScript | mit | octoblu/weather-service,miql/weather-service,octoblu/weather-service,octoblu/weather-service,miql/weather-service |
7574fd8bbd78bf2f620a0de6d3180d1bb2e5972f | src/app/api/models/project.coffee | src/app/api/models/project.coffee | angular.module("doubtfire.api.models.project", [])
.factory("Project", (resourcePlus) ->
Project = resourcePlus "/projects/:id", { id: "@id" }
Project.tutorialEnrolment = resourcePlus "/units/:id/tutorials/:tutorial_abbreviation/enrolments/:project_id", {id: "@id", tutorial_abbreviation: "@tutorial_abbreviation", ... | angular.module("doubtfire.api.models.project", [])
.factory("Project", (resourcePlus) ->
Project = resourcePlus "/projects/:id", { id: "@id" }
Project.tutorialEnrolment = resourcePlus "/units/:id/tutorials/:tutorial_abbreviation/enrolments/:project_id", {id: "@id", tutorial_abbreviation: "@tutorial_abbreviation", ... | Add refresh task end point | CONFIG: Add refresh task end point
| CoffeeScript | agpl-3.0 | doubtfire-lms/doubtfire-web,doubtfire-lms/doubtfire-web,doubtfire-lms/doubtfire-web,doubtfire-lms/doubtfire-web |
796396d9ec174fd580d5b9e4a9493fd221c2f620 | collections/connection_blocks.coffee | collections/connection_blocks.coffee | #
# Collection for a group of results in a connection search
#
UserBlocks = require("./user_blocks.coffee")
sd = require("sharify").data
_ = require 'underscore'
Block = require("../models/block.coffee")
params = require 'query-params'
module.exports = class ConnectionBlocks extends UserBlocks
defaultOptions:
p... | # Collection for a group of results in a connection search
qs = require 'qs'
{ API_URL } = require('sharify').data
UserBlocks = require './user_blocks.coffee'
module.exports = class ConnectionBlocks extends UserBlocks
defaultOptions:
page: 1
per: 20
url: ->
"#{sd.API_URL}/search/connection?#{qs.strin... | Clean up and annotate collection | Clean up and annotate collection
| CoffeeScript | mit | aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell |
511a2e9734fb9e6e3ee6a7c3662a3ac3e18142ce | src/save.coffee | src/save.coffee | window.Save =
save: new Bacon.Bus
load: new Bacon.Bus
GameState.state
.sampledBy(Save.save)
.onValue((state) -> window.localStorage['WRECK_SAVE'] = JSON.stringify(state))
Save.load.onValue ->
GameState.start JSON.parse(window.localStorage['WRECK_SAVE'])
$ ->
Save.save.plug ($('#opt-save').a... | window.Save =
save: new Bacon.Bus
load: new Bacon.Bus
GameState.state
.sampledBy(Save.save)
.onValue((state) -> window.localStorage['WRECK_SAVE'] = JSON.stringify(state))
Save.load.onValue ->
value = window.localStorage['WRECK_SAVE']
return unless value?
GameState.start JSON.parse(window.l... | Add sanity-checking for load mechanism | Add sanity-checking for load mechanism
| CoffeeScript | mit | prophile/shipwreck |
798a629a8efce3da30ab75bfd89ae3a9c60c63a4 | app/assets/javascripts/login_prompt.js.coffee | app/assets/javascripts/login_prompt.js.coffee | $(document).on 'ajax:error', (event, xhr, status, error) ->
if error == 'Unauthorized'
$.fancybox.open
href: '#js-login-prompt'
$('.js-login-confirm').click ->
window.location = '/auth/facebook'
$('.js-login-cancel').click ->
$.fancybox.close()
| $(document).on 'ajax:error', (event, xhr, status, error) ->
if error == 'Unauthorized'
$.fancybox.open
href: '#js-login-prompt'
scrolling: 'visible' # for button outlines and shadows
$('.js-login-confirm').click ->
window.location = '/auth/facebook'
$('.js-login-cancel').click ->
$.fancybox.clos... | Fix login prompt button shadows and outlines | Fix login prompt button shadows and outlines
| CoffeeScript | mit | RobinClowers/photo-album,RobinClowers/photo-album,RobinClowers/photo-album,RobinClowers/photo-album |
a75f904e910802e071f04c8611544a3f20d43e33 | src/components/header.cjsx | src/components/header.cjsx | React = require 'react'
class Header extends React.Component
@displayName = 'Header'
render: =>
<div className="header-inner">
{@_renderLogo()}
<ul className="list list-reset tabs-list">
<li className="tabs-tab active">
<a className="tabs-item">MAMP/wordpress</a>
<span... | React = require 'react'
class Header extends React.Component
@displayName = 'Header'
render: =>
<div className="header-inner">
{@_renderLogo()}
<ul className="list list-reset tabs-list">
<li className="tabs-tab active">
<a className="tabs-item">MAMP/wordpress</a>
<span... | Fix platform check when rendering logo | Fix platform check when rendering logo
| CoffeeScript | mit | zenit/zenit,iiegor/zenit,iiegor/zenit,zenit/zenit |
1b64bae2649ab2743c656d4d48f6079428dc3c14 | scripts/clojure.coffee | scripts/clojure.coffee | # Description:
# Evaluate one line of Clojure script
#
# Dependencies:
# None
#
# Configuration:
# None
#
# Commands:
# hubot clojure|clj <script> - Evaluate one line of Clojure script
#
# Author:
# jingweno
ringSessionID = ''
module.exports = (robot) ->
robot.hear /(\(.*\))/i, (msg)->
script = msg.ma... | # Description:
# Evaluate one line of Clojure script
#
# Dependencies:
# None
#
# Configuration:
# None
#
# Commands:
# hubot clojure|clj <script> - Evaluate one line of Clojure script
#
# Author:
# jingweno
ringSessionID = ''
module.exports = (robot) ->
robot.hear /(\(.*\))/i, (msg)->
script = msg.ma... | Send response instead of reply | Send response instead of reply
| CoffeeScript | mit | J3RN/J3RNBOT,J3RN/J3RNBOT |
487d12164a04160f82ac2dace91615418b50415e | app/coffee/DockerRunner.coffee | app/coffee/DockerRunner.coffee | spawn = require("child_process").spawn
exec = require("child_process").exec
logger = require "logger-sharelatex"
module.exports = DockerRunner =
_docker: 'docker'
_baseCommand: ['run', '--rm=true', '-t', '-v', '$COMPILE_DIR:/source', '--name=texlive-$PROJECT_ID', 'texlive']
run: (project_id, command, directory... | spawn = require("child_process").spawn
exec = require("child_process").exec
logger = require "logger-sharelatex"
Settings = require "settings-sharelatex"
module.exports = DockerRunner =
_docker: 'docker'
_baseCommand: ['run', '--rm=true', '-t', '-v', '$COMPILE_DIR:/source', '--name=texlive-$PROJECT_ID']
run: ... | Implement docker based latex compilation. | Implement docker based latex compilation.
Implement a docker based command runner that runs compilation in a docker container, for added isolation and security.
This implementation also supports timeouts.
| CoffeeScript | agpl-3.0 | EDP-Sciences/clsi-sharelatex |
c3e1b257c500c28aa8c1addd82f173eb52d7d2f0 | src/list-string.coffee | src/list-string.coffee | _ = require 'lodash'
assert = require 'assert'
module.exports = class ListString
string: ""
push = (how, elems...) ->
for elem in elems
if _.isArray elem
push how, elem...
else if _.isString elem
elem = _.trim elem, ' '
continue i... | _ = require 'lodash'
assert = require 'assert'
module.exports = class ListString
string: ""
push = (how, elems...) ->
for elem in elems
if _.isArray elem
push how, elem...
else if _.isString elem
elem = _.trim elem, ' '
continue i... | Fix ListString bug when pushing ListString elems | Fix ListString bug when pushing ListString elems
| CoffeeScript | mit | albertsgrc/optim |
cf32ce004045d0a167767a569e4bcc6050243002 | client/landing/app/Applications/Chat.kdapplication/Controllers/conversationlistcontroller.coffee | client/landing/app/Applications/Chat.kdapplication/Controllers/conversationlistcontroller.coffee | class ChatConversationListController extends CommonChatController
constructor:->
super
@getListView().on 'moveToIndexRequested', @bound 'moveItemToIndex'
addItem:(data)->
# Make sure there is one conversation with same channel name
{conversation, chatChannel} = data
for chat in @itemsOrdered
... | class ChatConversationListController extends CommonChatController
constructor:->
super
@getListView().on 'moveToIndexRequested', @bound 'moveItemToIndex'
addItem:(data)->
# Make sure there is one conversation with same channel name
{conversation, chatChannel} = data
for chat in @itemsOrdered
... | Make sure there is a conversations variable | Make sure there is a conversations variable
| CoffeeScript | agpl-3.0 | gokmen/koding,usirin/koding,sinan/koding,drewsetski/koding,rjeczalik/koding,kwagdy/koding-1,drewsetski/koding,cihangir/koding,sinan/koding,szkl/koding,koding/koding,acbodine/koding,sinan/koding,sinan/koding,usirin/koding,alex-ionochkin/koding,acbodine/koding,rjeczalik/koding,acbodine/koding,koding/koding,rjeczalik/kodi... |
6c2adb44bfc582abc9ed170986d8e5e579cc29ed | atom/init.coffee | atom/init.coffee | # Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# Settings to assign based on grammar name.
fileTypes =
"GitHub Markdown": (editor) ->
editor.setSoftWrap(true)
edit... | # Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# Settings to assign based on grammar name.
grammarSettings =
'GitHub Markdown':
softWrap: true
tabLength: 4
Java:... | Simplify the grammar settings code even further | Simplify the grammar settings code even further
Since we're now using standard CoffeeScript object notation, the
code can be simplified even further to make things more modular and
obvious.
| CoffeeScript | mit | lee-dohm/dotfiles,lee-dohm/dotfiles,lee-dohm/dotfiles,lee-dohm/dotfiles |
0b3ffc67277254d49c3e643555273ea6d12e2492 | app/assets/javascripts/sprangular/controllers/account.coffee | app/assets/javascripts/sprangular/controllers/account.coffee | Sprangular.controller 'AccountCtrl', ($scope, $location, $routeParams, Status, Account) ->
Status.pageTitle = 'My Account'
user = Account.user
user.password = ''
user.password_confirmation = ''
$scope.editing = false
$scope.user = user
refreshAccount = ->
Account.init().then ->
$scope.user = ... | Sprangular.controller 'AccountCtrl', ($scope, $location, $routeParams, Status, Account) ->
Status.pageTitle = 'My Account'
user = Account.user
$scope.editing = false
$scope.user = user
refreshAccount = ->
Account.init().then ->
user = Account.user
user.password = ''
user.password_conf... | Adjust user reloading, to ensure password is always empty | Adjust user reloading, to ensure password is always empty
| CoffeeScript | mit | sprangular/sprangular,sprangular/sprangular,sprangular/sprangular |
4f5384c6676312d2de0ca8d55abcd5da27cc21bd | app/assets/javascripts/components/yale-login.cjsx | app/assets/javascripts/components/yale-login.cjsx | React = require 'react'
module.exports = React.createClass
displayName: 'YaleLogin'
render:->
return <div className="login-page">
<div className="hero-overlay-container">
<div className="hero-overlay-title">Welcome</div>
<div className="hero-overlay-text">To begin marking and transcr... | React = require 'react'
module.exports = React.createClass
displayName: 'YaleLogin'
render:->
return <div className="login-page">
<div className="hero-overlay-container">
<div className="hero-overlay-title">Welcome</div>
<div className="hero-overlay-text">To begin marking and transcr... | Make clearer social buttons = login, not share | Make clearer social buttons = login, not share | CoffeeScript | mit | YaleDHLab/ensemble-at-yale,YaleDHLab/ensemble-at-yale,YaleDHLab/ensemble-at-yale,YaleDHLab/ensemble-at-yale |
7b5dc83b82edf6ed8a57215daa39e6e6beb09bca | lib/spell-check-handler.coffee | lib/spell-check-handler.coffee | SpellChecker = require 'spellchecker'
module.exports =
findMisspellings: (text) ->
wordRegex = /(?:^|[\s\[\]])([a-zA-Z']+)(?=[\s\.\[\]]|$)/g
row = 0
misspellings = []
for line in text.split('\n')
while matches = wordRegex.exec(line)
word = matches[1]
continue unless SpellChecker... | SpellChecker = require 'spellchecker'
module.exports =
findMisspellings: (text) ->
wordRegex = /(?:^|[\s\[\]])([a-zA-Z']+)(?=[\s\.\[\]:]|$)/g
row = 0
misspellings = []
for line in text.split('\n')
while matches = wordRegex.exec(line)
word = matches[1]
continue unless SpellChecke... | Include colon as a word boundary | Include colon as a word boundary
| CoffeeScript | mit | atom/spell-check |
9caa84d90b54b0d3cab3c5852ce9e6750dc91884 | lib/assets/javascripts/views/post/post_action_repost.js.coffee | lib/assets/javascripts/views/post/post_action_repost.js.coffee | Marbles.Views.PostActionRepost = class PostActionRepostView extends Marbles.Views.PostAction
@view_name: 'post_action_repost'
performAction: =>
post = TentStatus.Models.Post.find(cid: @parentView().post_cid)
data = {
permissions:
public: true
type: "https://tent.io/types/repost/v0##{(ne... | Marbles.Views.PostActionRepost = class PostActionRepostView extends Marbles.Views.PostAction
@view_name: 'post_action_repost'
performAction: =>
post = TentStatus.Models.Post.find(cid: @parentView().post_cid)
data = {
permissions:
public: true
type: "https://tent.io/types/repost/v0##{(ne... | Include type in refs and mentions for reposts | Include type in refs and mentions for reposts
| CoffeeScript | bsd-3-clause | tent/tent-status,tent/tent-status |
5535ec43d13cd7c78414282513f87753222bd7bc | internal_packages/message-list/lib/message-toolbar-items.cjsx | internal_packages/message-list/lib/message-toolbar-items.cjsx | _ = require 'underscore'
React = require 'react'
classNames = require 'classnames'
{Actions,
WorkspaceStore,
FocusedContentStore} = require 'nylas-exports'
{Menu,
Popover,
RetinaImg,
InjectedComponentSet} = require 'nylas-component-kit'
class MessageToolbarItems extends React.Component
@displayName: "MessageT... | _ = require 'underscore'
React = require 'react'
classNames = require 'classnames'
{Actions,
WorkspaceStore,
FocusedContentStore} = require 'nylas-exports'
{Menu,
Popover,
RetinaImg,
InjectedComponentSet} = require 'nylas-component-kit'
class MessageToolbarItems extends React.Component
@displayName: "MessageT... | Handle scenario where toolbar items rapidly removed (Sentry 2861) | fix(message-toolbar): Handle scenario where toolbar items rapidly removed (Sentry 2861)
| CoffeeScript | mit | simonft/nylas-mail,nylas/nylas-mail,nylas/nylas-mail,nylas-mail-lives/nylas-mail,simonft/nylas-mail,simonft/nylas-mail,nirmit/nylas-mail,nylas-mail-lives/nylas-mail,nylas/nylas-mail,nylas-mail-lives/nylas-mail,simonft/nylas-mail,simonft/nylas-mail,nylas-mail-lives/nylas-mail,nirmit/nylas-mail,nylas/nylas-mail,nylas-mai... |
0387dfa7207210b265494c939001c6d4d0b5b25f | client/file-list.coffee | client/file-list.coffee | uploader = new Slingshot.Upload('files')
Template.fileList.helpers
'files': -> FileList.find {}, sort: LastModified: -1
'date': -> moment(@LastModified).fromNow()
handleFiles = (event) ->
if event.type == "drop"
files = event.originalEvent.dataTransfer.files
else
files = event.target.files
file = fi... | uploader = new Slingshot.Upload('files')
Template.fileList.helpers
'files': -> FileList.find {}, sort: LastModified: -1
'date': -> moment(@LastModified).fromNow()
handleFiles = (event) ->
if event.type == "drop"
files = event.originalEvent.dataTransfer.files
else
files = event.target.files
file = fi... | Send an actual flash error. | Send an actual flash error.
| CoffeeScript | apache-2.0 | scopely/clonewars |
f9312bdadd4d60bb20e1a612c1c73b938519c23f | resources/assets/coffee/react/_components/user-avatar.coffee | resources/assets/coffee/react/_components/user-avatar.coffee | ###
# Copyright 2015-2017 ppy Pty. Ltd.
#
# This file is part of osu!web. osu!web is distributed with the hope of
# attracting more community contributions to the core ecosystem of osu!.
#
# osu!web is free software: you can redistribute it and/or modify
# it under the terms of the Affero GNU General Pub... | ###
# Copyright 2015-2017 ppy Pty. Ltd.
#
# This file is part of osu!web. osu!web is distributed with the hope of
# attracting more community contributions to the core ecosystem of osu!.
#
# osu!web is free software: you can redistribute it and/or modify
# it under the terms of the Affero GNU General Pub... | Update UserAvatar to use bem helper | Update UserAvatar to use bem helper
| CoffeeScript | agpl-3.0 | nanaya/osu-web,kj415j45/osu-web,nanaya/osu-web,nanaya/osu-web,nanaya/osu-web,ppy/osu-web,nanaya/osu-web,LiquidPL/osu-web,nekodex/osu-web,notbakaneko/osu-web,omkelderman/osu-web,nekodex/osu-web,LiquidPL/osu-web,nekodex/osu-web,omkelderman/osu-web,omkelderman/osu-web,kj415j45/osu-web,ppy/osu-web,notbakaneko/osu-web,kj415... |
a227b5525520c4956cf9817799e24baee2fc6df2 | app/assets/javascripts/autocompleter.js.coffee | app/assets/javascripts/autocompleter.js.coffee | username_strategy =
match: /(^|\s)@(\w*)$/;
search: (name, callback)->
search_call = $.getJSON("/user_lookup",{query: name})
search_call.done (result)->
callback( result.map (r)-> r.name)
search_call.fail -> callback([],true)
replace: (entry)->
"@#{entry} "
template: (entry)->
"@#{entr... | username_strategy =
match: /(^|\s)@(\w*)$/;
search: (name, callback)->
search_call = $.getJSON("/user_lookup", {query: name})
search_call.done (result)->
callback( result.map (r)-> r.name)
search_call.fail -> callback([],true)
replace: (entry)->
"@#{entry} "
template: (entry)->
"@#{ent... | Format link to be proper Markdown link. | Format link to be proper Markdown link. | CoffeeScript | mit | openjournals/brief-ideas,openjournals/brief-ideas,openjournals/brief-ideas |
a956aa182cec4695cca679257f467ffbaac8683a | angular/core/services/user_help_service.coffee | angular/core/services/user_help_service.coffee | angular.module('loomioApp').factory 'UserHelpService', (CurrentUser) ->
new class UserHelpService
helpLocale: ->
switch CurrentUser.locale
when 'es', 'an', 'ca', 'gl' then 'es'
else 'en'
helpLink: ->
"https://loomio.gitbooks.io/manual/content/#{@helpLocale()}/index.html"
| angular.module('loomioApp').factory 'UserHelpService', (CurrentUser) ->
new class UserHelpService
helpLocale: ->
switch CurrentUser.locale
when 'es', 'an', 'ca', 'gl' then 'es'
when 'zh-TW' then 'zh'
when 'ar' then 'ar'
else 'en'
helpLin... | Add links to zh-TW and ar help manual translations | Add links to zh-TW and ar help manual translations
| CoffeeScript | agpl-3.0 | mhjb/loomio,sicambria/loomio,piratas-ar/loomio,sicambria/loomio,loomio/loomio,sicambria/loomio,sicambria/loomio,mhjb/loomio,mhjb/loomio,loomio/loomio,mhjb/loomio,piratas-ar/loomio,piratas-ar/loomio,loomio/loomio,loomio/loomio,piratas-ar/loomio |
7d71f6f180d19cce27957d5860fc2a3f4e9b2575 | app/assets/javascripts/panels/image_library.coffee | app/assets/javascripts/panels/image_library.coffee | class CMSimple.Panels.ImageLibrary extends Mercury.Panel
@toggle: (region)->
@instance ?= new CMSimple.Panels.ImageLibrary()
@instance.toggle()
constructor: ()->
super(null, 'insertMedia', title: 'Image Library', appendTo: '.mercury-toolbar-container', closeButton: true)
@button = $('.mercury-inser... | class CMSimple.Panels.ImageLibrary extends Mercury.Panel
@toggle: (region)->
@instance ?= new CMSimple.Panels.ImageLibrary()
@instance.toggle()
constructor: ()->
super(null, 'insertMedia', title: 'Image Library', appendTo: '.mercury-toolbar-container', closeButton: true)
@button = $('.mercury-inser... | Add resizing to toggled image panel | Add resizing to toggled image panel | CoffeeScript | mit | modeset/cmsimple,modeset/cmsimple,modeset/cmsimple |
d0dfc7f1f35aa6549ac5a848c6ebd2b7d993f7d0 | app/assets/javascripts/views/wip_event_view.coffee | app/assets/javascripts/views/wip_event_view.coffee | #= require_tree ../../../templates/events
#= require marked
markdown = (text) ->
marked(text || '')
underscore = (text) ->
text.replace(/([a-z\d])([A-Z]+)/g, '$1_$2')
.replace(/[-\s]+/g, '_')
.toLowerCase()
endsWith = (str, suffix)->
str.indexOf(suffix, str.length - suffix.length) != -1
pluralize ... | #= require_tree ../../../templates/events
#= require marked
markdown = (text) ->
marked(text || '')
underscore = (text) ->
text.replace(/([a-z\d])([A-Z]+)/g, '$1_$2')
.replace(/[-\s]+/g, '_')
.toLowerCase()
endsWith = (str, suffix)->
str.indexOf(suffix, str.length - suffix.length) != -1
pluralize ... | Fix weird discussion padding bug. | Fix weird discussion padding bug.
| CoffeeScript | agpl-3.0 | assemblymade/meta,assemblymade/meta,assemblymade/meta,lachlanjc/meta,lachlanjc/meta,lachlanjc/meta,lachlanjc/meta,assemblymade/meta |
ecbcd7b793216971d67b87af340141fa2faec2f3 | app/templates/extras/mvc-coffee/model-index.coffee | app/templates/extras/mvc-coffee/model-index.coffee | fs = require('fs')
path = require('path')
Sequelize = require('sequelize')
lodash = require('lodash')
config = require('../../config/config')
db = {}
sequelize = new Sequelize config.db
fs.readdirSync(__dirname)
.filter (file) ->
~file.indexOf('.') and file != 'index.coffee'
.forEach (file) ->
model = seq... | fs = require('fs')
path = require('path')
Sequelize = require('sequelize')
lodash = require('lodash')
config = require('../../config/config')
db = {}
sequelize = new Sequelize config.db
fs.readdirSync(__dirname)
.filter (file) ->
file.indexOf('.') != 0 and file != 'index.coffee'
.forEach (file) ->
model =... | Correct Mistake in file check | Correct Mistake in file check | CoffeeScript | mit | VictorParraCant/generator-express,madtec-dev/generator-madtec,Atrox/generator-express,madtec-dev/generator-madtec,Atrox/generator-express,markogresak/generator-express,petecoop/generator-express,bernardhamann/generator-yebobase,SteveCastle/generator-express,f3rnando/generator-express,VictorParraCant/generator-express,b... |
c9030b67e421538d803afeabbf987edf94f81aa2 | spec/spec-bootstrap.coffee | spec/spec-bootstrap.coffee | @pkgJson = require '../../package.json'
# Start the crash reporter before anything else.
require('crash-reporter').start(productName: @pkgJson.name, companyName: 'atom-shell-starter')
| @pkgJson = require 'package.json'
# Start the crash reporter before anything else.
require('crash-reporter').start(productName: @pkgJson.name, companyName: 'atom-shell-starter')
h1 = document.createElement 'h1'
h1.innerText = 'Spec Suite'
document.body.appendChild h1
| Fix the spec bootstrap to load the package file | Fix the spec bootstrap to load the package file
| CoffeeScript | mit | kittens/atom-shell-starter,xmail-client/xmail,sebmck/atom-shell-starter,dkfiresky/electron-starter,atom/electron-starter,liuxiong332/xmail,atom-archive/electron-starter,amine7536/electron-starter,sebmck/atom-shell-starter,xmail-client/xmail,atom/electron-starter,xmail-client/xmail,xmail-client/xmail,kittens/atom-shell-... |
ac7475c1860533642ef9786e9a3a781ea224773d | source/js/controllers/dictionary_controller.coffee | source/js/controllers/dictionary_controller.coffee | class Controller
constructor: ($scope, $rootScope, $location, entryService, i18nService) ->
$rootScope.$emit 'navigationConfig',
labelForTitle: i18nService.get 'dictionaryTitle'
backAction: () ->
$location.path('/home')
entryService.all().then (entries) =>
first_letters = _.map(entr... | class Controller
constructor: ($scope, $rootScope, $location, entryService, i18nService) ->
$rootScope.$emit 'navigationConfig',
labelForTitle: i18nService.get 'dictionaryTitle'
backAction: () ->
$location.path('/home')
entryService.all().then (entries) =>
first_letters = _.map(entr... | Fix dictionary page letters sorting problem | Fix dictionary page letters sorting problem
| CoffeeScript | mit | benfoley/jila-mobile,benfoley/jila-mobile,benfoley/jila-mobile,benfoley/jila-mobile,JilaFramework/jila-mobile,JilaFramework/jila-mobile |
97bf353fd73a11579f8cab41e33ee9d911fe5753 | src/coffee/cilantro/models/query.coffee | src/coffee/cilantro/models/query.coffee | define [
'../core'
'./base'
], (c, base) ->
class QueryModel extends base.Model
class QueryCollection extends base.Collection
model: QueryModel
url: ->
c.session.url('queries')
initialize: ->
super
c.subscribe c.SESSION_OPENED, => @fetch(re... | define [
'../core'
'./base'
], (c, base) ->
class QueryModel extends base.Model
class QueryCollection extends base.Collection
model: QueryModel
url: ->
c.session.url('queries')
initialize: ->
super
c.subscribe c.SESSION_OPENED, => @fetch(re... | Resolve promise when shared_queries collection is reset | Resolve promise when shared_queries collection is reset
| CoffeeScript | bsd-2-clause | chop-dbhi/cilantro,chop-dbhi/cilantro,chop-dbhi/cilantro |
4fb31f1c69344e49af0f278ba1875a4b88db4727 | src/dbController.coffee | src/dbController.coffee | mongo = require 'mongoskin'
uuid = require 'uuid'
DB = process.env.DBPORT || 'users'
db = mongo.db('mongodb://localhost:27017/#{DB}', {native_parser: true})
db.bind('user').bind({
getByID: (userID, callback) ->
this.findOne({userID: userID}, callback)
})
# Class for interracting with MongoDB using Mongosk... | mongo = require 'mongoskin'
uuid = require 'uuid'
DB = process.env.DBPORT || 'users'
db = mongo.db("mongodb://localhost:27017/#{DB}", {native_parser: true})
db.bind('user').bind({
getByID: (userID, callback) ->
this.findOne({userID: userID}, callback)
})
# Class for interracting with MongoDB using Mongosk... | Add validation before add user to db | Add validation before add user to db
Checking if token non empty
Also fix db link
| CoffeeScript | mit | SubmitAnIssue/IssueBot |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.