commit stringlengths 40 40 | old_file stringlengths 4 264 | new_file stringlengths 4 264 | old_contents stringlengths 0 4.24k | new_contents stringlengths 1 5.44k | subject stringlengths 14 778 | message stringlengths 15 9.92k | lang stringclasses 277
values | license stringclasses 13
values | repos stringlengths 5 127k |
|---|---|---|---|---|---|---|---|---|---|
cd61feae1f8e45f7ace5c988078d3638a5349c9b | lib/index.coffee | lib/index.coffee |
isObject = require 'is-object'
isFunction = require 'is-function'
###
when passed an object, returns an array of its keys.
when passed an array, returns an array of its indexes.
arrayify({a: 'aa', b: 'bb', c: 'cc'})
-> ['a', 'b', 'c']
arrayify(['one', 'two', 'three'])
-> [1, 2, 3]
###
arrayify = (obj) ->
(key f... |
isFunction = require 'is-function'
isObjectOrArray = require 'is-object'
isArray = require 'is-array'
###
when passed an object, returns an array of its keys.
when passed an array, returns an array of its indexes.
arrayify({a: 'aa', b: 'bb', c: 'cc'})
-> ['a', 'b', 'c']
arrayify(['one', 'two', 'three'])... | Change name of function isObject to isObejctOrArray | Change name of function isObject to isObejctOrArray
Makes the flow more clear. Also added isArray function which returnes
true only if passed an Array
| CoffeeScript | mit | simon-johansson/keyfinder |
3fc29b56c86e86b05c4b35426e1e0129cbbed720 | jigs/grid/jig.coffee | jigs/grid/jig.coffee | button = require '../../button'
grid = require '../../grid'
parser = require 'stout-client/parser'
window.onload = ->
parser.parse().then ->
grid = $stout.get('#basic-grid')
$stout.get('#btn-add').click = ->
randomSize = -> Math.max 5, Math.ceil(Math.random() * 8)
i = 2
while i--
... | button = require '../../button'
grid = require '../../grid'
parser = require 'stout-client/parser'
window.onload = ->
parser.parse().then ->
grid = $stout.get('#basic-grid')
$stout.get('#btn-add').click = ->
randomSize = -> Math.max 1, Math.ceil(Math.random() * 3)
i = 2
while i--
... | Integrate grid clearing and add random background image. | Integrate grid clearing and add random background image.
| CoffeeScript | agpl-3.0 | JoshuaToenyes/stout-ui,JoshuaToenyes/stout-ui,JoshuaToenyes/stout-ui |
19cf333e52fa93e24bf57ecf3aefe07d425d9819 | src/packages/fuzzy-finder/lib/load-paths-task.coffee | src/packages/fuzzy-finder/lib/load-paths-task.coffee | _ = require 'underscore'
BufferedProcess = require 'buffered-process'
$ = require 'jquery'
module.exports =
class LoadPathsTask
constructor: (@callback) ->
start: ->
rootPath = project.getPath()
ignoredNames = config.get('fuzzyFinder.ignoredNames') ? []
ignoredNames = ignoredNames.concat(config.get('c... | _ = require 'underscore'
BufferedProcess = require 'buffered-process'
$ = require 'jquery'
module.exports =
class LoadPathsTask
constructor: (@callback) ->
start: ->
rootPath = project.getPath()
ignoredNames = config.get('fuzzyFinder.ignoredNames') ? []
ignoredNames = ignoredNames.concat(config.get('c... | Use long opts for readability | Use long opts for readability
| CoffeeScript | mit | decaffeinate-examples/atom,amine7536/atom,florianb/atom,avdg/atom,fredericksilva/atom,PKRoma/atom,paulcbetts/atom,russlescai/atom,florianb/atom,bencolon/atom,Jdesk/atom,charleswhchan/atom,NunoEdgarGub1/atom,rmartin/atom,targeter21/atom,decaffeinate-examples/atom,ali/atom,nrodriguez13/atom,kjav/atom,ironbox360/atom,Fold... |
3fda3a8dc47d65d23bf836c3ef35569d1ed2e2b4 | keymaps/debugger-ui-default.cson | keymaps/debugger-ui-default.cson | 'atom-text-editor':
'alt-cmd-r': 'debugger:start-locally'
'alt-cmd-e': 'debugger:stop'
'alt-cmd-c': 'debugger:resume'
'alt-cmd-y': 'debugger:pause'
'f6': 'debugger:step-over'
'f7': 'debugger:step-into'
| 'atom-text-editor':
'alt-cmd-r': 'debugger:start'
'alt-cmd-e': 'debugger:stop'
'alt-cmd-c': 'debugger:resume'
'alt-cmd-y': 'debugger:pause'
'alt-cmd-7': 'debugger:toggle-breakpoint-at-current-line'
'f6': 'debugger:step-over'
'f7': 'debugger:step-into'
| Change keymap according to upstream command changes | Change keymap according to upstream command changes
| CoffeeScript | mit | AtomDebugger/debugger-ui-default |
9c0ceb69e947ce97f7d7d6218b9abfb4f3521dd5 | battle-detail.coffee | battle-detail.coffee | require 'coffee-react/register'
require "#{ROOT}/views/env"
i18n = require './node_modules/i18n'
{join} = require 'path-extra'
i18n.configure
locales: ['en-US', 'ja-JP', 'zh-CN', 'zh-TW']
defaultLocale: 'zh-CN'
directory: join(__dirname, 'assets', 'i18n')
updateFiles: false
indent: '\t'
extension: '.json'... | require 'coffee-react/register'
require "#{ROOT}/views/env"
try
require 'poi-plugin-translator'
catch error
console.error error
i18n = require './node_modules/i18n'
{join} = require 'path-extra'
i18n.configure
locales: ['en-US', 'ja-JP', 'zh-CN', 'zh-TW']
defaultLocale: 'zh-CN'
directory: join(__dirname, 'a... | Use poi-plugin-translator to translate ships and items | Use poi-plugin-translator to translate ships and items
| CoffeeScript | mit | poooi/plugin-battle-detail |
3ec6063aab6257f1e836dfefc7e2901c745d5f7e | src/watch.coffee | src/watch.coffee | fs = require 'fs'
path = require 'path'
vm = require './vm'
walk = require './walk'
{parseArgs} = require './utils'
module.exports = parseArgs (basePath, opts, cb) ->
{relative, excluded} = opts
opts.patch ?= true
modules = {}
watching = {}
watch = (dir, isModule) ->
... | fs = require 'fs'
path = require 'path'
vm = require './vm'
walk = require './walk'
{parseArgs} = require './utils'
module.exports = parseArgs (basePath, opts, cb) ->
{relative, excluded} = opts
opts.patch ?= true
opts.recurse ?= true
modules = {}
watching = {}
... | Make it possible to not recurse through dir. | Make it possible to not recurse through dir.
| CoffeeScript | mit | zeekay/vigil |
0c87a66207bc620e73122a7f7b64422e0553f8d7 | src/date-format.coffee | src/date-format.coffee | angular
.module('angular-w')
.directive('dateFormat', ['dateFilter', (dateFilter)->
restrict: 'A'
require: 'ngModel'
link: (scope, element, attrs, ngModel)->
ngModel.$formatters.push (value)->
console.log(value)
dateFilter(value, attrs.dateFormat)
ngModel.$parsers.push (value)->
new Dat... | angular
.module('angular-w')
.directive('dateFormat', ['dateFilter', (dateFilter)->
restrict: 'A'
require: 'ngModel'
link: (scope, element, attrs, ngModel)->
ngModel.$formatters.push (value)->
date = if angular.isString(value)
milis = Date.parse(value)
new Date(milis) unles... | Fix dateFormat directive to accept string model values. | Fix dateFormat directive to accept string model values.
| CoffeeScript | mit | lykmapipo/formstamp,formstamp/formstamp,formstamp/formstamp,lykmapipo/formstamp,lykmapipo/formstamp,formstamp/formstamp |
c84846970d87c3037798e65fe901ec51d3bf53ae | spec/appSpec.coffee | spec/appSpec.coffee |
describe 'Laere Module', ->
# load the controller's module
beforeEach module 'laere'
HeaderController = scope = null
# Initialize the controller and a mock scope
beforeEach inject ($controller, $rootScope) ->
scope = $rootScope.$new()
HeaderController = $controller 'HeaderController',
$scope... |
describe 'Laere Module', ->
# load the controller's module
beforeEach module 'laere'
HeaderController = scope = null
# Initialize the controller and a mock scope
beforeEach inject ($controller, $rootScope) ->
scope = $rootScope.$new()
HeaderController = $controller 'HeaderController',
$scope... | Fix test, no more menu on header. | Fix test, no more menu on header.
| CoffeeScript | mit | moongate/laere-ui,moongate/laere-ui |
ba2a06ee3f7be5e1ea4fe0c607a23603067f613a | app/assets/javascripts/langtrainer_frontend_backbone/views/unit_selector.js.coffee | app/assets/javascripts/langtrainer_frontend_backbone/views/unit_selector.js.coffee | class Langtrainer.LangtrainerApp.Views.UnitSelector extends Backbone.View
_.extend(@prototype, Langtrainer.LangtrainerApp.Views.Extensions.Localized)
template: JST['langtrainer_frontend_backbone/templates/unit_selector']
id: 'unit-selector'
events:
'change select': 'onChange'
initialize: ->
@listen... | class Langtrainer.LangtrainerApp.Views.UnitSelector extends Backbone.View
_.extend(@prototype, Langtrainer.LangtrainerApp.Views.Extensions.Localized)
template: JST['langtrainer_frontend_backbone/templates/unit_selector']
id: 'unit-selector'
events:
'change select': 'onChange'
initialize: ->
@listen... | Change all attributes of current unit when another unit is selected | Change all attributes of current unit when another unit is selected
| CoffeeScript | mit | langtrainer/langtrainer_frontend_backbone,langtrainer/langtrainer_frontend_backbone,langtrainer/langtrainer_frontend_backbone |
6ac784d6701495b865c37a7c537e8c4f8e6f7ae7 | lib/generators/rails_script/install/templates/base.js.coffee | lib/generators/rails_script/install/templates/base.js.coffee | window.App ||= {}
class App.Base
constructor: ->
return this
create: ->
$this.new()
return
update: ->
$this.edit()
return | window.App ||= {}
class App.Base
constructor: ->
return this
create: ->
if typeof $this.new == 'function'
return $this.new()
update: ->
if typeof $this.edit == 'function'
return $this.edit() | Make sure new/edit exists before calling them on create/update. | Make sure new/edit exists before calling them on create/update.
| CoffeeScript | mit | gemgento/rails_script,kpheasey/rails_script |
9afa9f12517a135a3c3a31f20dcdd33489be7f1e | lib/markdown-preview.coffee | lib/markdown-preview.coffee | url = require 'url'
fs = require 'fs-plus'
MarkdownPreviewView = require './markdown-preview-view'
module.exports =
activate: ->
atom.workspaceView.command 'markdown-preview:show', =>
@show()
atom.workspace.registerOpener (uriToOpen) ->
{protocol, pathname} = url.parse(uriToOpen)
return u... | url = require 'url'
fs = require 'fs-plus'
MarkdownPreviewView = require './markdown-preview-view'
module.exports =
activate: ->
atom.workspaceView.command 'markdown-preview:show', =>
@show()
atom.workspace.registerOpener (uriToOpen) ->
{protocol, pathname} = url.parse(uriToOpen)
return u... | Use isFileSync instead of existsSync | Use isFileSync instead of existsSync
| CoffeeScript | mit | atom/markdown-preview,grimmer0125/markdown-preview-kramdown,makyo/markdown-preview,ArnaudRinquin/markdown-preview,rugk/markdown-preview,Galadirith/markdown-preview,danielgtaylor/atom-api-blueprint-preview,tkssharma/markdown-preview,sctlee/markdown-preview |
7b179a89c09affc124251a81cf79e0fa792a0407 | .config/atom/snippets.cson | .config/atom/snippets.cson | # Your snippets
#
# Atom snippets allow you to enter a simple prefix in the editor and hit tab to
# expand the prefix into a larger code block with templated values.
#
# You can create a new snippet in this file by typing "snip" and then hitting
# tab.
#
# An example CoffeeScript snippet to expand log to console.log:
#... | # Your snippets
#
# Atom snippets allow you to enter a simple prefix in the editor and hit tab to
# expand the prefix into a larger code block with templated values.
#
# You can create a new snippet in this file by typing "snip" and then hitting
# tab.
#
# An example CoffeeScript snippet to expand log to console.log:
#... | Add use strict atom snippet | Add use strict atom snippet
| CoffeeScript | mit | glepretre/dotfiles |
06324f9095f5ee531f78b66ccdc776304b356155 | src/index.coffee | src/index.coffee | Promise = require 'zousan'
Promise.suppressUncaughtRejectionError = true
class PromiseInspection
constructor: ({@state, @value, @reason}) ->
isFulfilled: ->
@state is 'fulfilled'
isRejected: ->
@state is 'rejected'
Promise.reflect = (promise) ->
new Promise (resolve, reject) ->
promise
.t... | Promise = require 'zousan'
Promise.suppressUncaughtRejectionError = false
class PromiseInspection
constructor: ({@state, @value, @reason}) ->
isFulfilled: ->
@state is 'fulfilled'
isRejected: ->
@state is 'rejected'
Promise.reflect = (promise) ->
new Promise (resolve, reject) ->
promise
.... | Make sure to not suppress errors. | Make sure to not suppress errors.
| CoffeeScript | mit | zeekay/broken |
3817c5fca9d0ae2ac52c688560858dc8598ac813 | src/rabbitmq.coffee | src/rabbitmq.coffee |
AMQPStats = require 'amqp-stats'
debug = require('debug')('guv:rabbitmq')
url = require 'url'
amqpOptions = (str) ->
o = {}
u = url.parse str
[ user, password ] = u.auth.split ':'
o.hostname = u.host # includes port
o.username = user
o.password = password
o.protocol = 'https'
return o
exports.getStat... |
AMQPStats = require 'amqp-stats'
debug = require('debug')('guv:rabbitmq')
url = require 'url'
amqpOptions = (str) ->
o = {}
u = url.parse str
[ user, password ] = u.auth.split ':'
o.hostname = u.host # includes port
o.username = user
o.password = password
o.protocol = 'https'
return o
exports.getStat... | Read total number of messages instead of those in queue | RabbitMQ: Read total number of messages instead of those in queue
Reduces issue where workers were being shut down when they had
work in progress: the messages went back to queue and then had
to start up more workers again.
Especially painful for min=0 roles.
Will cause us to overestimate a bit generally, but thats fi... | CoffeeScript | mit | the-grid/guv,the-grid/guv,flowhub/guv |
df4197475e175e4885699a6ec561541c13e49f75 | client/ide/fs/fsfolder.coffee | client/ide/fs/fsfolder.coffee | class FSFolder extends FSFile
fetchContents:(callback, dontWatch=yes)->
{ treeController } = @getOptions()
@emit "fs.job.started"
@vmController.run
method : 'fs.readDirectory'
vmName : @vmName
withArgs :
onChange : if dontWatch then null else (change)=>
FSHe... | class FSFolder extends FSFile
fetchContents:(callback, dontWatch=yes)->
{ treeController } = @getOptions()
@emit "fs.job.started"
@vmController.run
method : 'fs.readDirectory'
vmName : @vmName
withArgs :
onChange : if dontWatch then null else (change)=>
FSHe... | Use treeController's delegate as FinderController since there is no more FinderController singleton | FSFolder: Use treeController's delegate as FinderController since there is no more FinderController singleton
| CoffeeScript | agpl-3.0 | acbodine/koding,koding/koding,mertaytore/koding,kwagdy/koding-1,jack89129/koding,cihangir/koding,szkl/koding,mertaytore/koding,mertaytore/koding,usirin/koding,jack89129/koding,rjeczalik/koding,usirin/koding,koding/koding,andrewjcasal/koding,jack89129/koding,rjeczalik/koding,drewsetski/koding,alex-ionochkin/koding,gokme... |
2ba3e21539241bd4ec956b1cbde3ed94b9e0953f | app/assets/javascripts/popover.js.coffee | app/assets/javascripts/popover.js.coffee | $(document).on 'ready page:load', ->
$("a.popover").click ->
event.preventDefault()
popover_src = $(this).children("img").attr("data-src")
popover_caption = $(this).children("img").attr("alt")
popover_width = $(this).children("img").attr("data-width")
popover_height = $(this).children("img").at... | $(document).on 'ready page:load', ->
$("a.popover").click (event) ->
event.preventDefault()
popover_src = $(this).children("img").attr("data-src")
popover_caption = $(this).children("img").attr("alt")
popover_width = $(this).children("img").attr("data-width")
popover_height = $(this).children("... | Add event parameter to popover click event | Add event parameter to popover click event
| CoffeeScript | mit | chrisalley/chris-alley-rails,chrisalley/chris-alley-rails,chrisalley/chris-alley-old,chrisalley/chris-alley-old |
ff758930a606de9c200201cf9ff49db95e5a7ab3 | tasks/gyp.coffee | tasks/gyp.coffee | gyp = require('node-gyp')()
# The first two arguments are apparently necessary as else nopt won’t include
# loglevel as an option.
defaultArgv = ['node', '.', '--loglevel=silent']
# It is necessary to execute rebuild manually as calling node-gyp’s rebuild
# programmatically fires the callback function too early.
manu... | gyp = require('node-gyp')()
# The first two arguments are apparently necessary as else nopt won’t include
# loglevel as an option.
defaultArgv = ['node', '.', '--loglevel=silent']
# It is necessary to execute rebuild manually as calling node-gyp’s rebuild
# programmatically fires the callback function too early.
manu... | Stop execution on rebuild if one command fails | Stop execution on rebuild if one command fails
Before, the callback was called with an error but execution continued on.
| CoffeeScript | bsd-2-clause | SonicHedgehog/grunt-node-gyp |
3032c72ee788a004403b91855db1cd9781d0cba4 | config.coffee | config.coffee | #
# Using ["The Twelve-Factor App"](http://12factor.net/) as a reference all
# environment configuration will live in environment variables. This file
# simply lays out all of those environment variables with sensible defaults
# for development.
#
module.exports =
NODE_ENV: "development"
PORT: 4000
APP_URL: "htt... | #
# Using ["The Twelve-Factor App"](http://12factor.net/) as a reference all
# environment configuration will live in environment variables. This file
# simply lays out all of those environment variables with sensible defaults
# for development.
#
module.exports =
NODE_ENV: "development"
PORT: 4000
APP_URL: "htt... | Revert back to production posts | Revert back to production posts
| CoffeeScript | mit | broskoski/ervell,arenahq/ervell,broskoski/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell,arenahq/ervell,aredotna/ervell |
e642374b74a0186ab01d6a6c08af6b0fc2ffffd0 | src/scripts/servant.coffee | src/scripts/servant.coffee | # Hubot is very attentive
module.exports = (robot) ->
name_regex = new RegExp("#{robot.name}\\?$", "i")
robot.hear name_regex, (msg) ->
msg.reply "Yes, master?"
| # Hubot is very attentive (ping hubot)
phrases = [
"Yes, master?"
"At your service"
"Unleash my strength"
"I'm here. As always"
"By your command"
"Ready to work!"
"Yes, milord?"
"More work?"
"Ready for action"
"Orders?"
"What do you need?"
"Say the word"
"Aye, my lord"
"Locked and loaded"
... | Add more phrases to ping hubot | Add more phrases to ping hubot
| CoffeeScript | mit | marksie531/hubot-scripts,ericjsilva/hubot-scripts,alexhouse/hubot-scripts,arcaartem/hubot-scripts,amhorton/hubot-scripts,magicstone1412/hubot-scripts,yigitbey/hubot-scripts,bruno/hubot-scripts,iilab/hubot-scripts,cycomachead/hubot-scripts,contolini/hubot-scripts,janx/hubot-scripts,markstory/hubot-scripts,Tyriont/hubot-... |
5781ac00ba3d6f28c6a60ddcc433a5effb5cddd7 | app/assets/javascripts/controllers/manuscript_manager_template_edit_controller.js.coffee | app/assets/javascripts/controllers/manuscript_manager_template_edit_controller.js.coffee | ETahi.ManuscriptManagerTemplateEditController = Ember.ObjectController.extend
dirty: false
paperTypes: (->
@get('journal.paperTypes')
).property('journal.paperTypes.@each')
sortedPhases: Ember.computed.alias 'phases'
actions:
changeTaskPhase: (task, targetPhase) ->
task.get('phase').removeTas... | ETahi.ManuscriptManagerTemplateEditController = Ember.ObjectController.extend
dirty: false
paperTypes: (->
@get('journal.paperTypes')
).property('journal.paperTypes.@each')
sortedPhases: Ember.computed.alias 'phases'
actions:
changeTaskPhase: (task, targetPhase) ->
task.get('phase').removeTas... | Fix dirty tracking after save | Fix dirty tracking after save | CoffeeScript | mit | johan--/tahi,johan--/tahi,johan--/tahi,johan--/tahi |
05de158f44e72207193c4fb86952a74b6ab3cebe | app/assets/javascripts/resolve/load_permalink.js.coffee | app/assets/javascripts/resolve/load_permalink.js.coffee | $ ->
$("*[data-umlaut-toggle-permalink]").click (event) ->
originalLink = $(this)
valueContainer = $("#umlaut-permalink-container")
loadedLink = $(".umlaut-permalink-content a")
url = loadedLink.attr("href")
if url == undefined
loadedLink = $("#umlaut-permalink-content")
url = loadedLink.attr("href")... | $ ->
$("*[data-umlaut-toggle-permalink]").click (event) ->
if $(".umlaut-permalink-container input").is(":visible")
$(".umlaut-permalink-container input").select()
permalinkLoaded = setInterval ->
if $(".umlaut-permalink-container a").is(":visible")
reformatPermalink(event)
clearInterval(permalinkLoa... | Fix permalink reformat to wait for link to load if its the first time the page opened | Fix permalink reformat to wait for link to load if its the first time the page opened
| CoffeeScript | mit | NYULibraries/getit,NYULibraries/getit,NYULibraries/getit,NYULibraries/getit |
2fc177c2e7d8f498704686c4236ee1a49f8b8c7e | assets/js/add_observation.coffee | assets/js/add_observation.coffee | $ = jQuery
$ ->
current_jd = +$("#current-jd").text()
$("#id_jd").val(current_jd)
| $ = jQuery
$ ->
current_jd = +$("#current-jd").text()
$("#id_jd").val(current_jd)
detail_fields = $("#div_id_comp1, #div_id_comp2, #div_id_comment_code, #div_id_chart, #div_id_notes")
detail_fields.hide()
| Hide detailed observation fields by default. | Hide detailed observation fields by default.
| CoffeeScript | mit | zsiciarz/variablestars.net,zsiciarz/variablestars.net,zsiciarz/variablestars.net |
f049a63b7e2fcc556d8a513db8f2729b2545cbd9 | LoggerFactory.coffee | LoggerFactory.coffee | class LoggerFactory
instance = null
@get: ->
instance ?= new LoggerFactory
createLogger: (namespace)->
log.debug 'LoggerFactory.createLogger()', arguments
if namespace?
expect(namespace).to.be.a('string').that.has.length.above(0)
prefix = namespace + ':'
expect(Loglevel).t... | class LoggerFactory
instance = null
@get: ->
instance ?= new LoggerFactory
createLogger: (namespace, defaultLevel)->
log.debug 'LoggerFactory.createLogger()', arguments
if namespace?
expect(namespace).to.be.a('string').that.has.length.above(0)
prefix = namespace + ':'
expe... | Support providing a defaultLevel when in logger factory | Support providing a defaultLevel when in logger factory
| CoffeeScript | mit | practicalmeteor/meteor-loglevel,solderzzc/meteor-loglevel |
dffbe9a5bf905b07adb27e7ac6f387c3a6a489dc | app/config.coffee | app/config.coffee | storage = require 'node-persist'
storage.initSync()
config = storage.getItemSync 'config'
module.exports =
getConfig: ->
defaultDelay: 3
defaultDuration: 0.5
defaultTransition: "none"
checkCycles: 2 | storage = require 'node-persist'
storage.initSync()
config = storage.getItemSync 'config'
module.exports =
getConfig: ->
defaultDelay: 3
defaultDuration: 0.5
defaultTransition: "none"
checkCycles: 1 | Check for new slides after every cycle | Check for new slides after every cycle
| CoffeeScript | mit | Rezonation/sisetv,Rezonation/sisetv |
d8f4763a5c6946c3323f2567cb1554244c844c05 | test/unit/model/view.coffee | test/unit/model/view.coffee | sinon = require 'sinon'
should = require 'should'
describe 'Client model: View', ->
helper = require '../helper'
helper.evalConcatenatedFile 'client/code/model/tool.coffee'
helper.evalConcatenatedFile 'client/code/model/view.coffee'
describe 'URL', ->
beforeEach ->
@tool = Cu.Model.Tool.findOrCreate... | sinon = require 'sinon'
should = require 'should'
describe 'Client model: View', ->
helper = require '../helper'
helper.evalConcatenatedFile 'client/code/model/tool.coffee'
helper.evalConcatenatedFile 'client/code/model/view.coffee'
describe 'URL', ->
beforeEach ->
@tool = Cu.Model.Tool.findOrCreate... | Remove old View test, which can't possibly work as Views don't have their own persistent model on server side | Remove old View test, which can't possibly work as Views don't have their own persistent model on server side
| CoffeeScript | agpl-3.0 | scraperwiki/custard,scraperwiki/custard,scraperwiki/custard |
83ad5fd520b3c132724732474759db92a8b7809c | client/lib/cordova/push.coffee | client/lib/cordova/push.coffee | if Meteor.isCordova
Tracker.autorun ->
if RocketChat.settings.get('Push_enable') is true
Push.Configure {}
Push.addListener 'token', (token) ->
Meteor.call 'log', 'token', arguments
Push.addListener 'error', (err) ->
Meteor.call 'log', 'error', arguments
if error.type == 'apn.cordova'
Met... | if Meteor.isCordova
Tracker.autorun ->
if RocketChat.settings.get('Push_enable') is true
Push.Configure
badge: true
sound: true
alert: true
vibrate: true
Push.addListener 'token', (token) ->
Meteor.call 'log', 'token', arguments
Push.addListener 'error', (err) ->
Meteor.call 'log',... | Add config for badge, sound, alert and vibrate for Push Notifications | Add config for badge, sound, alert and vibrate for Push Notifications
| CoffeeScript | mit | jeann2013/Rocket.Chat,LearnersGuild/Rocket.Chat,christmo/Rocket.Chat,liemqv/Rocket.Chat,BHWD/noouchat,JamesHGreen/Rocket_API,dmitrijs-balcers/Rocket.Chat,webcoding/Rocket.Chat,I-am-Gabi/Rocket.Chat,lonbaker/Rocket.Chat,fatihwk/Rocket.Chat,flaviogrossi/Rocket.Chat,rasata/Rocket.Chat,inoio/Rocket.Chat,lukaroski/traden,da... |
7c85af7b278a44d17322bf9f063d2b65d440cc91 | index.coffee | index.coffee | fs = require 'fs'
path = require 'path'
module.exports = (robot, scripts) ->
scriptsPath = path.resolve(__dirname, 'src')
fs.exists scriptsPath, (exists) ->
if exists
for script in fs.readdirSync(scriptsPath)
if scripts? and '*' not in scripts
robot.loadF... | fs = require 'fs'
path = require 'path'
module.exports = (robot, scripts) ->
scriptsPath = path.resolve(__dirname, 'src')
if fs.existsSync scriptsPath
for script in fs.readdirSync(scriptsPath).sort()
if scripts? and '*' not in scripts
robot.loadFile(scriptsPath, script) if s... | Load / run scripts synchronously | Load / run scripts synchronously
| CoffeeScript | mit | ClaudeBot/hubot-ab,ClaudeBot/hubot-ab |
7de93feed03cdf65da7672a470623ddb666cf17e | keymaps/foldingtext-markdown.cson | keymaps/foldingtext-markdown.cson | 'ft-outline-editor':
'ctrl-cmd-c': 'foldingtext-markdown:copy-markdown'
'ctrl-cmd-v': 'foldingtext-markdown:paste-markdown'
'ft-outline-editor.outlineMode':
't p': 'foldingtext-markdown:make-paragraph'
't h': 'foldingtext-markdown:make-header'
't c': 'foldingtext-markdown:make-code-block'
't q': 'foldingte... | 'ft-outline-editor':
'ctrl-cmd-c': 'foldingtext-markdown:copy-markdown'
'ctrl-cmd-v': 'foldingtext-markdown:paste-markdown'
'ft-outline-editor.outlineMode':
'm p': 'foldingtext-markdown:make-paragraph'
'm h': 'foldingtext-markdown:make-header'
'm c': 'foldingtext-markdown:make-code-block'
'm q': 'foldingte... | Change set markdown type shortcuts to start with 'm' | Change set markdown type shortcuts to start with 'm'
| CoffeeScript | mit | FoldingText/foldingtext-markdown |
0fa65999244cea8a768d673d1fbcc0163baab09c | grunt/tasks/test.coffee | grunt/tasks/test.coffee | module.exports = (grunt)->
_ = grunt.util._
init_config = grunt.config()
# mocha
mocha_requires = [
"coffee-script"
"should"
"requirejs"
"underscore"
"backbone"
"jquery"
]
mocha_requires.push "./spec/spec_helper.coffee" if require("fs").existsSync("./spec/spec_helper.coffee")
_(in... | module.exports = (grunt)->
_ = grunt.util._
init_config = grunt.config()
# mocha
mocha_requires = [
"coffee-script"
"should"
"requirejs"
"underscore"
"backbone"
"jquery"
]
mocha_requires.push "./spec/spec_helper.coffee" if require("fs").existsSync("./spec/spec_helper.coffee")
_(in... | Change mocha options: tap -> spec, colors = false | Change mocha options: tap -> spec, colors = false
| CoffeeScript | mit | sh19910711/github-issues-label-manager,sh19910711/github-issues-label-manager,sh19910711/github-issues-label-manager |
3249407464e8b06280e387623da6641c3c0595ff | lib/fs-util.coffee | lib/fs-util.coffee | path = require 'path'
{File} = require 'atom'
module.exports =
toExt: (srcPath, ext) ->
srcExt = path.extname srcPath
return path.join(
path.dirname(srcPath),
"#{path.basename(srcPath, srcExt)}.#{ext}"
)
resolvePath: (srcPath) ->
destination = atom.config.get('coffee-compile.destinatio... | path = require 'path'
{File} = require 'atom'
module.exports =
toExt: (srcPath, ext) ->
srcExt = path.extname srcPath
return path.join(
path.dirname(srcPath),
"#{path.basename(srcPath, srcExt)}.#{ext}"
)
resolvePath: (srcPath) ->
destination = atom.config.get('coffee-compile.destinatio... | Make sure all variables are string before joining | Make sure all variables are string before joining
| CoffeeScript | mit | adrianlee44/atom-coffee-compile |
6667520d70c8d1f1fe57f0acecc12515ca86d8bb | examples/hello-server/app.coffee | examples/hello-server/app.coffee | express = require "express"
jsdom = require("jsdom").jsdom
$ = require "jquery"
transparency = require "transparency"
# Register transparency as a plugin for the given jQuery instance
transparency.register $
app = express.createServer()
app.configure ->
app.use app.router
app.configure "dev... | express = require "express"
jsdom = require("jsdom").jsdom
$ = require "jquery"
transparency = require "transparency"
# Register transparency as a plugin for the given jQuery instance
transparency.register $
app = express()
app.configure ->
app.use app.router
app.configure "development", ->... | Update server example to work with latest Express | Update server example to work with latest Express
| CoffeeScript | mit | leonidas/transparency,chorks/transparency,laomu1988/transparency,chorks/transparency,cravelight/transparency,leonidas/transparency,phcomputer/template,laomu1988/transparency,phcomputer/template,cravelight/transparency |
4859997191dda5b40e7bbf817248956110636814 | lib/common-utils.coffee | lib/common-utils.coffee | debug = require('debug')('sphere-product-import-common-utils')
_ = require 'underscore'
_.mixin require 'underscore-mixins'
class CommonUtils
constructor: (@logger) ->
debug "Enum Validator initialized."
uniqueObjectFilter: (objCollection) =>
uniques = []
_.each objCollection, (obj) =>
if not ... | debug = require('debug')('sphere-product-import-common-utils')
_ = require 'underscore'
_.mixin require 'underscore-mixins'
class CommonUtils
constructor: (@logger) ->
debug "Enum Validator initialized."
uniqueObjectFilter: (objCollection) =>
uniques = []
_.each objCollection, (obj) =>
if not ... | Update -> method to use _.find. | Update -> method to use _.find.
| CoffeeScript | mit | sphereio/sphere-product-import |
8e6a78741f1169eeadc6d2d169a39dce6447a735 | jobs/index.coffee | jobs/index.coffee | # Copyright 2013 Matt Farmer
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | # Copyright 2013 Matt Farmer
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | Convert job init from "scrape people" to "scrape rep.." | Convert job init from "scrape people" to "scrape rep.."
| CoffeeScript | agpl-3.0 | gaodp/gga-api,gaodp/gga-api |
28352be72946015f3c91a8354db528a1eca440ca | app/assets/javascripts/admin/order_cycles/controllers/simple.js.coffee | app/assets/javascripts/admin/order_cycles/controllers/simple.js.coffee | angular.module('admin.order_cycles').controller "AdminSimpleCreateOrderCycleCtrl", ($scope, OrderCycle, Enterprise, EnterpriseFee) ->
$scope.enterprises = Enterprise.index (enterprises) =>
enterprise = enterprises[Object.keys(enterprises)[0]]
OrderCycle.addSupplier enterprise.id
OrderCycle.addDistributor ... | angular.module('admin.order_cycles').controller "AdminSimpleCreateOrderCycleCtrl", ($scope, OrderCycle, Enterprise, EnterpriseFee) ->
$scope.enterprises = Enterprise.index (enterprises) =>
enterprise = enterprises[Object.keys(enterprises)[0]]
OrderCycle.addSupplier enterprise.id
OrderCycle.addDistributor ... | Save pickup time and instructions | Save pickup time and instructions
| CoffeeScript | agpl-3.0 | levent/openfoodnetwork,KosenkoDmitriy/openfoodnetwork,Em-AK/openfoodnetwork,Matt-Yorkley/openfoodnetwork,Matt-Yorkley/openfoodnetwork,lin-d-hop/openfoodnetwork,openfoodfoundation/openfoodnetwork,lin-d-hop/openfoodnetwork,MikeiLL/openfoodnetwork,lin-d-hop/openfoodnetwork,RohanM/openfoodnetwork,oeoeaio/openfoodnetwork,fo... |
9401a2a7e60eee946aff65ba0918f63e0f804333 | assets/javascripts/evaluator/structure_identifier.coffee | assets/javascripts/evaluator/structure_identifier.coffee | V = Visualizer
identifyObservable = R.curryN 2, (baseId, observable) ->
rootId = baseId + 'r'
recursionLevel = (rootId.match(/r/g) || []).length - 1
observable.root.args ?= V.Roots[observable.root.type].getDefaultArgs?(recursionLevel)
root: R.assoc('id', rootId, R.pick(['type', 'args'], observable.root))
o... | V = Visualizer
identifyObservable = R.curryN 2, (baseId, observable) ->
rootId = baseId + 'r'
recursionLevel = (rootId.match(/r/g) || []).length - 1
if !observable.root.args?
observable.root.args = V.Roots[observable.root.type].getDefaultArgs?(recursionLevel)
root: R.assoc('id', rootId, R.pick(['type', '... | Fix changing args to '' | Fix changing args to ''
| CoffeeScript | mit | urmastalimaa/reactive-visualizer,urmastalimaa/reactive-visualizer,urmastalimaa/reactive-visualizer,urmastalimaa/reactive-visualizer |
cc22690a04968db2b0b7cd6d2e2b6c7188f05561 | lib/autoprefixer/selector.coffee | lib/autoprefixer/selector.coffee | Prefixer = require('./prefixer')
utils = require('./utils')
class Selector extends Prefixer
# Is rule selectors need to be prefixed
check: (rule) ->
rule.selector.indexOf(@name) != -1
# Clone and add prefixes for at-rule
add: (rule, prefix) ->
prefixed = @replace(rule.selector, prefix)
return... | Prefixer = require('./prefixer')
utils = require('./utils')
class Selector extends Prefixer
# Is rule selectors need to be prefixed
check: (rule) ->
rule.selector.indexOf(@name) != -1
# Return prefixed version of selector
prefixed: (prefix) ->
@name.replace(/^([^\w]*)/, '$1' + prefix)
# Lazy lo... | Clean up methods order in Selector prefixer | Clean up methods order in Selector prefixer
| CoffeeScript | mit | danielmorosan/autoprefixer,edisplay/autoprefixer,pskrz/autoprefixer,wangyun122/autoprefixer,zigi74/autoprefixer,ya7lelkom/autoprefixer,iamvdo/autoprefixer-core,aidenzou/autoprefixer,rmondragon/autoprefixer,avanderhoorn/autoprefixer,cnbin/autoprefixer,NateBaldwinDesign/autoprefixer,lydell/autoprefixer,ocean90/autoprefix... |
a3a6dde810283a5642c9e7551620b2664df2223a | app/assets/javascripts/components/todos/app.js.cjsx | app/assets/javascripts/components/todos/app.js.cjsx | TodoStore = require('./stores/todo_store')
TodoActions = require('./actions/todo_actions')
TodoApp = require('./components/TodoApp')
# Invoked in a Rails template with JSON data passed in.
React._initTodoApp = (options) ->
# Instantiates the stores
stores =
TodoStore: new TodoStore(options["todos"])
... | TodoStore = require('./stores/todo_store')
TodoActions = require('./actions/todo_actions')
TodoApp = require('./components/TodoApp')
# Invoked in a Rails template with JSON data passed in.
React._initTodoApp = (options) ->
# Instantiates the stores
stores =
TodoStore: new TodoStore(options["todos"] if ... | Add null checking for option argument | Add null checking for option argument
| CoffeeScript | mit | mnishiguchi/moving_estimator,mnishiguchi/moving_estimator,mnishiguchi/moving_estimator |
d2f2af45f38635ffa4d715c2e594a0a6abd2401e | components/MarqueeBranding.cjsx | components/MarqueeBranding.cjsx | React = require 'react'
module.exports = React.createClass
displayName: 'MarqueeBranding'
getDefaultProps: -> {
source : global.config?.PUBLICATION_SHORT_NAME
medium : 'MarqueeBranding'
campaign : 'sdk_site'
logo_only : false
}
render: ... | React = require 'react'
module.exports = React.createClass
displayName: 'MarqueeBranding'
getDefaultProps: -> {
source : global.config?.PUBLICATION_SHORT_NAME
medium : 'web'
campaign : 'sdk_site'
content : 'MarqueeBranding'
logo_only ... | Correct UTM paremeters for branding element. | Correct UTM paremeters for branding element. | CoffeeScript | unlicense | marquee/static-sdk |
827bab90bfa3877a8d9324e566c8b2b61a7d6ab6 | src/app/null-grammar.coffee | src/app/null-grammar.coffee | Token = require 'token'
EventEmitter = require 'event-emitter'
_ = require 'underscore'
### Internal ###
module.exports =
class NullGrammar
name: 'Null Grammar'
scopeName: 'text.plain.null-grammar'
getScore: -> 0
tokenizeLine: (line) ->
{ tokens: [new Token(value: line, scopes: ['null-grammar.text.plain'... | Token = require 'token'
EventEmitter = require 'event-emitter'
_ = require 'underscore'
### Internal ###
module.exports =
class NullGrammar
name: 'Null Grammar'
scopeName: 'text.plain.null-grammar'
getScore: -> 0
tokenizeLine: (line) ->
{ tokens: [new Token(value: line, scopes: ['null-grammar.text.plain'... | Add tokenizeLines to null grammar | Add tokenizeLines to null grammar
| CoffeeScript | mit | sekcheong/atom,wiggzz/atom,liuxiong332/atom,seedtigo/atom,john-kelly/atom,anuwat121/atom,sotayamashita/atom,lisonma/atom,NunoEdgarGub1/atom,SlimeQ/atom,sebmck/atom,Austen-G/BlockBuilder,CraZySacX/atom,burodepeper/atom,YunchengLiao/atom,johnrizzo1/atom,oggy/atom,dkfiresky/atom,yamhon/atom,bradgearon/atom,Jonekee/atom,KE... |
9e1b9dc5df058a3f726937970e0c36f5ffd3bf74 | keymaps/coffee-compile.cson | keymaps/coffee-compile.cson | # Keybindings require three things to be fully defined: A selector that is
# matched against the focused element, the keystroke and the command to
# execute.
#
# Below is a basic keybinding which registers on all platforms by applying to
# the root workspace element.
# For more detailed documentation see
# https://ato... | # Keybindings require three things to be fully defined: A selector that is
# matched against the focused element, the keystroke and the command to
# execute.
#
# Below is a basic keybinding which registers on all platforms by applying to
# the root workspace element.
# For more detailed documentation see
# https://ato... | Change win/linux key to ctrl-alt-c | Change win/linux key to ctrl-alt-c
| CoffeeScript | mit | adrianlee44/atom-coffee-compile |
70b3d39035395eb3120c23262a171b56e9b1dc63 | keymaps/git-experiment.cson | keymaps/git-experiment.cson | # Keybindings require three things to be fully defined: A selector that is
# matched against the focused element, the keystroke and the command to
# execute.
#
# Below is a basic keybinding which registers on all platforms by applying to
# the root workspace element.
# For more detailed documentation see
# https://ato... | # Keybindings require three things to be fully defined: A selector that is
# matched against the focused element, the keystroke and the command to
# execute.
#
# Below is a basic keybinding which registers on all platforms by applying to
# the root workspace element.
# For more detailed documentation see
# https://ato... | Change keymaps and add confirm | Change keymaps and add confirm | CoffeeScript | mit | atom/github,atom/github,atom/github |
bbaaa2300b2d0aca3f9831b932750da7f3757d77 | test/spec/controllers/main.coffee | test/spec/controllers/main.coffee | 'use strict'
describe 'Controller: MainCtrl', () ->
# load the controller's module
beforeEach module 'appApp'
MainCtrl = {}
scope = {}
# Initialize the controller and a mock scope
beforeEach inject ($controller, $rootScope) ->
scope = $rootScope.$new()
MainCtrl = $controller 'MainCtrl', {
... | 'use strict'
describe 'Controller: MainCtrl', () ->
# load the controller's module
beforeEach module 'appApp'
MainCtrl = {}
scope = {}
# Initialize the controller and a mock scope
beforeEach inject ($injector, $controller, $rootScope) ->
$httpBackend = $injector.get('$httpBackend')
$httpBackend.... | Test spec handles mock API requests, very general regex used (/.*/). | Test spec handles mock API requests, very general regex used (/.*/).
| CoffeeScript | agpl-3.0 | IdeaHaven/tilden |
c83e9d4e93d699ea69f77a2e6bba21e505b9b094 | src/command.coffee | src/command.coffee | numeral = require("numeral")
balance = require("./crypto-balance")
module.exports.run = ->
addr = process.argv[2]
unless addr
console.log "Usage: balance <address>"
process.exit 1
balance addr
.then (items) ->
for item in items
if item.status == 'success'
console.log "#{num... | numeral = require("numeral")
_ = require("lodash")
balance = require("./crypto-balance")
module.exports.run = ->
addr = process.argv[2]
unless addr
console.log "Usage: balance <address>"
process.exit 1
balance addr
.then (items) ->
for item in items
if item.status == 'success'
... | Clean up error output for cli tool a bit | Clean up error output for cli tool a bit
| CoffeeScript | mit | larskluge/crypto-balance |
dde77a7e71b66275342c18466cffe67682971cf2 | engine/glmatrix_extra.coffee | engine/glmatrix_extra.coffee | glm = require 'gl-matrix'
glm.quat.to_euler = (out=[0,0,0], quat, order='YZX') ->
if order != 'YZX'
throw new Error "Euler order "+order+" not supported yet."
# It will return YZX euler. TODO: implement other orders
x = quat[0]
y = quat[1]
z = quat[2]
w = quat[3]
test = x*y + z*w;
... | glm = require 'gl-matrix'
glm.quat.to_euler = (out=[0,0,0], quat, order='XZY') ->
if order != 'XZY'
throw new Error "Euler order "+order+" not supported yet."
# It will return XZY euler. TODO: implement other orders
x = quat[0]
y = quat[1]
z = quat[2]
w = quat[3]
test = x*y + z*w;
... | Add to_euler compatibility with turntable camera. Specify rotation order by Blender's nomenclature. | Add to_euler compatibility with turntable camera. Specify rotation order by Blender's nomenclature.
| CoffeeScript | mit | myou-engine/myou-engine |
1840149fa2ee04a6659c4c24233cc0b96119d17e | app/assets/javascripts/routes/application_route.js.coffee | app/assets/javascripts/routes/application_route.js.coffee | ETahi.ApplicationRoute = Ember.Route.extend
actions:
chooseNewCardTypeOverlay: (phase) ->
@controllerFor('chooseNewCardTypeOverlay').set('phase', phase)
@render('chooseNewCardTypeOverlay',
into: 'application'
outlet: 'overlay'
controller: 'chooseNewCardTypeOverlay')
showTa... | ETahi.ApplicationRoute = Ember.Route.extend
actions:
chooseNewCardTypeOverlay: (phase) ->
@controllerFor('chooseNewCardTypeOverlay').set('phase', phase)
@render('chooseNewCardTypeOverlay',
into: 'application'
outlet: 'overlay'
controller: 'chooseNewCardTypeOverlay')
showTa... | Set class on new card overlays | Set class on new card overlays | CoffeeScript | mit | johan--/tahi,johan--/tahi,johan--/tahi,johan--/tahi |
41522abad509b798673d2987dfd7a913b69964ea | 4-dual-target/brunch-config.coffee | 4-dual-target/brunch-config.coffee | module.exports = config:
files:
javascripts: joinTo:
'libraries.js': /^app\/jquery\.js/
'app.js': /^(?!app\/jquery\.js)/
stylesheets: joinTo: 'app.css'
| module.exports = config:
files:
javascripts: joinTo:
'libraries.js': /^app[\\\/]jquery\.js/
'app.js': /^(?!app[\\\/]jquery\.js)/
stylesheets: joinTo: 'app.css'
| Use both \ and / in regexes so anymatch OKs Win/POSIX paths | Use both \ and / in regexes so anymatch OKs Win/POSIX paths
| CoffeeScript | mit | brunch/brunch-guide-demos,brunch/brunch-guide-demos |
cd057e2da8f6e49201d1cd2209c26b1a1ca1b6bb | core/app/backbone/views/users/user_statistics_view.coffee | core/app/backbone/views/users/user_statistics_view.coffee | class window.UserStatisticsView extends Backbone.Marionette.ItemView
className: 'statistics'
template: 'users/statistics'
initialize: ->
@listenTo @model, 'change', @render
| class window.UserStatisticsView extends Backbone.Marionette.ItemView
className: 'statistics'
template: 'users/statistics'
templateHelpers: =>
topic: @model.user_topics().first()?.toJSON()
initialize: ->
@listenTo @model, 'change', @render
| Revert "Removed unused template helper" | Revert "Removed unused template helper"
This reverts commit 5292657dac5edf95436665e081ee41760a1a77f2.
| CoffeeScript | mit | daukantas/factlink-core,daukantas/factlink-core,daukantas/factlink-core,Factlink/factlink-core,Factlink/factlink-core,Factlink/factlink-core,Factlink/factlink-core,daukantas/factlink-core |
97b4a7a5bf87e8cc2a8de3e54fd725ae29a35ba5 | index.coffee | index.coffee | surveyor = require './lib/surveyor.coffee'
websocket = require './lib/websocket.coffee'
webserver = require './lib/webserver.coffee'
webserver.listen 4001
util = require './lib/util.coffee'
model = require './lib/model.coffee'
lock = false
check = ->
return if lock
lock = true
surveyor.getManifest (err) ->
t... | surveyor = require './lib/surveyor.coffee'
websocket = require './lib/websocket.coffee'
webserver = require './lib/webserver.coffee'
webserver.listen 4001
util = require './lib/util.coffee'
model = require './lib/model.coffee'
lock = false
lockTimer = null
lockTimeout = process.env.LOCKTIMEOUT or 30 * 1000
check = ->... | Throw if process stays locked for too long | Throw if process stays locked for too long
| CoffeeScript | bsd-3-clause | davidbanham/field-marshal |
2b62318b4eae443336cf65c6c549b5bbe15fb1e9 | models/mixins/dimensions.coffee | models/mixins/dimensions.coffee | _ = require 'underscore'
module.exports =
dimensions: (metric = @get('metric')) ->
@get('dimensions')[metric] if metric
# Wrap only X Y/Z; leave X/Y alone
superscriptFractions: (string) ->
string?.replace /(\d+)(?:\s+)(\d+\/\d+)/g, '$1 <sup>$2</sup>'
fractionToDecimal: (string) ->
split = string.s... | _ = require 'underscore'
module.exports =
dimensions: (metric = @get('metric')) ->
@get('dimensions')[metric] if metric
# Wrap only X Y/Z; leave X/Y alone
superscriptFractions: (string) ->
string?.replace /(\d+)(?:\s+)(\d+\/\d+)/g, '$1 <sup>$2</sup>'
fractionToDecimal: (string) ->
split = stri... | Throw division by zero and wrap in try/catch | Throw division by zero and wrap in try/catch
| CoffeeScript | mit | kanaabe/force,dblock/force,kanaabe/force,oxaudo/force,artsy/force,damassi/force,xtina-starr/force,artsy/force,kanaabe/force,anandaroop/force,yuki24/force,kanaabe/force,anandaroop/force,damassi/force,TribeMedia/force-public,mzikherman/force,joeyAghion/force,eessex/force,yuki24/force,dblock/force,izakp/force,artsy/force,... |
64620ee22bd22c9b301bec8c9f76c084e29d9c69 | lib/cli.iced | lib/cli.iced | fs = require 'fs'
{ diff } = require './index'
module.exports = (argv) ->
options = require('dreamopt') [
"Usage: json-diff [-v] first.json second.json"
"Arguments:"
" first.json Old file #var(file1) #required"
" second.json New file #var(file2) #required"
"General ... | fs = require 'fs'
{ diff } = require './index'
module.exports = (argv) ->
options = require('dreamopt') [
"Usage: json-diff [-v] first.json second.json"
"Arguments:"
" first.json Old file #var(file1) #required"
" second.json New file #var(file2) #required"
"General ... | Send verbose output to stderr | Send verbose output to stderr
| CoffeeScript | mit | kounoike/json-diff,andreyvit/json-diff,piotr1212/json-diff |
c5cd39308d2b1dac51ccf0522292f425544b9226 | src/app/general-config-panel.coffee | src/app/general-config-panel.coffee | ConfigPanel = require 'config-panel'
{$$} = require 'space-pen'
$ = require 'jquery'
_ = require 'underscore'
module.exports =
class GeneralConfigPanel extends ConfigPanel
@content: ->
@form id: 'general-config-panel', class: 'form-horizontal', =>
@fieldset =>
@legend "General Settings"
@d... | ConfigPanel = require 'config-panel'
{$$} = require 'space-pen'
$ = require 'jquery'
_ = require 'underscore'
module.exports =
class GeneralConfigPanel extends ConfigPanel
@content: ->
@form id: 'general-config-panel', class: 'form-horizontal', =>
@fieldset =>
@legend "General Settings"
@d... | Add "open .atom" button to general config view | Add "open .atom" button to general config view
| CoffeeScript | mit | florianb/atom,deepfox/atom,dsandstrom/atom,001szymon/atom,liuxiong332/atom,hakatashi/atom,YunchengLiao/atom,ppamorim/atom,kittens/atom,davideg/atom,RobinTec/atom,jacekkopecky/atom,Jonekee/atom,kjav/atom,hharchani/atom,john-kelly/atom,elkingtonmcb/atom,mrodalgaard/atom,dijs/atom,mertkahyaoglu/atom,rjattrill/atom,ezeolea... |
93543c3b2cb2319eb9357e74e0a0b468e3f51524 | scripts/test-instance/instance-ami.coffee | scripts/test-instance/instance-ami.coffee | module.exports =
current: 'ami-cc7842a4'
# Ordered by creation date
list: [
'ami-f464e69c'
'ami-66bbca0e'
'ami-e06c2488'
'ami-c4c397ac'
'ami-cc7842a4'
]
| module.exports =
current: 'ami-10465678'
# Ordered by creation date
list: [
'ami-f464e69c'
'ami-66bbca0e'
'ami-e06c2488'
'ami-c4c397ac'
'ami-cc7842a4'
'ami-10465678'
]
| Update test instance to AMI v6 | Update test instance to AMI v6
| CoffeeScript | agpl-3.0 | rjeczalik/koding,szkl/koding,drewsetski/koding,cihangir/koding,drewsetski/koding,alex-ionochkin/koding,gokmen/koding,drewsetski/koding,alex-ionochkin/koding,jack89129/koding,koding/koding,drewsetski/koding,rjeczalik/koding,sinan/koding,cihangir/koding,gokmen/koding,cihangir/koding,acbodine/koding,andrewjcasal/koding,go... |
dcd0853c4ef90d8dfec71c9a6f348ef06d60ae3f | server/configuration/accounts_meld.coffee | server/configuration/accounts_meld.coffee | orig_updateOrCreateUserFromExternalService = Accounts.updateOrCreateUserFromExternalService
Accounts.updateOrCreateUserFromExternalService = (serviceName, serviceData, options) ->
if serviceName not in ['facebook', 'github', 'gitlab', 'google', 'meteor-developer', 'linkedin', 'twitter']
return
if serviceName is 'm... | orig_updateOrCreateUserFromExternalService = Accounts.updateOrCreateUserFromExternalService
Accounts.updateOrCreateUserFromExternalService = (serviceName, serviceData, options) ->
if serviceName not in ['facebook', 'github', 'google', 'meteor-developer', 'linkedin', 'twitter'] and serviceData._oAuthCustom isnt true
... | Allow login from custom oAuth in accounts meld | Allow login from custom oAuth in accounts meld
| CoffeeScript | mit | cnash/Rocket.Chat,Codebrahma/Rocket.Chat,lonbaker/Rocket.Chat,snaiperskaya96/Rocket.Chat,HeapCity/Heap.City,LearnersGuild/echo-chat,wtsarchive/Rocket.Chat,mccambridge/Rocket.Chat,lonbaker/Rocket.Chat,ndarilek/Rocket.Chat,Kiran-Rao/Rocket.Chat,atyenoria/Rocket.Chat,haoyixin/Rocket.Chat,pitamar/Rocket.Chat,ImpressiveSetO... |
12c28fe32dbc1b9b86bed51c581350f76a738279 | app/assets/javascripts/prevent_double_submission.js.coffee | app/assets/javascripts/prevent_double_submission.js.coffee | App.PreventDoubleSubmission =
disable_buttons: (buttons) ->
setTimeout ->
buttons.each ->
button = $(this)
unless button.hasClass('disabled')
loading = button.data('loading') ? '...'
button.addClass('disabled').attr('disabled', 'disabled')
button.data('text', bu... | App.PreventDoubleSubmission =
disable_buttons: (buttons) ->
setTimeout ->
buttons.each ->
button = $(this)
unless button.hasClass('disabled')
loading = button.data('loading') ? '...'
button.addClass('disabled').attr('disabled', 'disabled')
button.data('text', bu... | Fix double-submission prevention not working. | Fix double-submission prevention not working.
| CoffeeScript | agpl-3.0 | consul/consul,Terciar/consul,AjuntamentdeBarcelona/barcelona-participa,AyuntamientoPuertoReal/decidePuertoReal,xJakub/consul,amiedes/consul,Terciar/consul,deivid-rodriguez/participacion,AjuntamentdeBarcelona/decidimbcn,AjuntamentdeBarcelona/decidim.barcelona,AjuntamentdeBarcelona/decidim.barcelona-legacy,PeoplesMomentu... |
6afc3c4e1f84c06a2c4f7e779678b6ec79e727ec | app/assets/javascripts/controllers/message_task_controller.js.coffee | app/assets/javascripts/controllers/message_task_controller.js.coffee | ETahi.MessageTaskController = ETahi.TaskController.extend
newCommentBody: ""
actions:
clearMessageContent: -> null
postComment: ->
commentFields =
body: @get('newCommentBody')
newComment = @store.createRecord('comment', commentFields)
| ETahi.MessageTaskController = ETahi.TaskController.extend
newCommentBody: ""
actions:
clearMessageContent: -> null
postComment: ->
userId = Tahi.currentUser.id.toString()
commenter = @store.all('user').findBy('id', userId)
commentFields =
commenter: commenter
messageTask: ... | Add comments in memory on click. | Add comments in memory on click.
| CoffeeScript | mit | johan--/tahi,johan--/tahi,johan--/tahi,johan--/tahi |
6775a62e781054d767a8b1fd07add30b3dc478b4 | src/null-grammar.coffee | src/null-grammar.coffee | Grammar = require './grammar'
# A grammar with no patterns that is always available
module.exports =
class NullGrammar extends Grammar
constructor: (registry) ->
name = 'Null Grammar'
scopeName = 'text.plain.null-grammar'
super(registry, {name, scopeName})
getScore: -> 0
| Grammar = require './grammar'
# A grammar with no patterns that is always available from a {GrammarRegistry}
module.exports =
class NullGrammar extends Grammar
constructor: (registry) ->
name = 'Null Grammar'
scopeName = 'text.plain.null-grammar'
super(registry, {name, scopeName})
getScore: -> 0
| Clarify where this is available | Clarify where this is available
| CoffeeScript | mit | soldair/first-mate,Talon1024/first-mate,klorenz/first-mate-manual-fork,burodepeper/first-mate,wiggzz/first-mate,hansonw/first-mate,atom/first-mate,rameshvarun/first-mate |
9199b7ffa99d442c8b0729f0dc1724fdc26ddfea | src/crash-reporter-start.coffee | src/crash-reporter-start.coffee | module.exports = (extra) ->
{crashReporter} = require 'electron'
crashReporter.start({
productName: 'Atom',
companyName: 'GitHub',
submitURL: 'http://54.249.141.255:1127/post'
extra: extra
})
| module.exports = (extra) ->
{crashReporter} = require 'electron'
crashReporter.start({
productName: 'Atom',
companyName: 'GitHub',
autoSubmit: false,
extra: extra
})
| Disable autosubmit of crash reporter | Disable autosubmit of crash reporter
| CoffeeScript | mit | liuderchi/atom,stinsonga/atom,CraZySacX/atom,t9md/atom,andrewleverette/atom,Mokolea/atom,FIT-CSE2410-A-Bombs/atom,helber/atom,ardeshirj/atom,atom/atom,helber/atom,AdrianVovk/substance-ide,kevinrenaers/atom,decaffeinate-examples/atom,rlugojr/atom,liuderchi/atom,kevinrenaers/atom,PKRoma/atom,Ingramz/atom,xream/atom,Arcan... |
983e8c2788c64fbb9779dc58090bb563c2c01dae | src/coffee/storylet.coffee | src/coffee/storylet.coffee | class Storylet
constructor: (@id, @title, @text, @choices, @frontFacingChoice) ->
Object.freeze @
isVisibleWith: (qualityLibrary) -> frontFacingChoice?.isVisibleWith qualityLibrary
class Choice
constructor: (@title, @text, @visibleReqs, @activeReqs, @next) ->
reqsAreMet = (reqs, qualityLibrary) ->
fo... | class Storylet
constructor: (@id, @title, @text, @choices, @frontFacingChoice) ->
Object.freeze @
isVisibleWith: (qualityLibrary) -> frontFacingChoice?.isVisibleWith qualityLibrary
class Choice
constructor: (@title, @text, @visibleReqs, @activeReqs, @next) ->
reqsAreMet = (reqs, qualityLibrary) ->
fo... | Make Front-Facing Storylets Retreatable By Default | Make Front-Facing Storylets Retreatable By Default
| CoffeeScript | unlicense | arashikou/exper3-2015 |
0bca69f34de1ea0512e64a5bd479a0c2be777d00 | src/columns.coffee | src/columns.coffee | Bacon = require('baconjs')
moment = require('moment')
module.exports = [
{
title: 'Name'
width: 60
cellContent: (item) -> item.relPath
},{
title: 'Date created'
width: 20
cellContent: (item) -> moment(item.stats.birthtime).fromNow()
},{
title: 'Date modified'
width: 20
cellCon... | Bacon = require('baconjs')
moment = require('moment')
h = require('virtual-dom/h')
Path = require('path')
module.exports = [
{
title: 'Name'
width: 60
cellContent: (item) ->
pieces = item.relPath.split(Path.sep)
[
h 'span.text-subtle', [
pieces.slice(0, -1).join(Path.sep)
... | Make file's paths more subtle in listing | :art: Make file's paths more subtle in listing
| CoffeeScript | mit | viddo/atom-textual-velocity,viddo/atom-textual-velocity,onezoomin/atom-textual-velocity |
80bc717f2c9775dde435d5ee347b229533c81507 | lib/assets/javascripts/marbles/middleware/hawk.js.coffee | lib/assets/javascripts/marbles/middleware/hawk.js.coffee | #= require hawk
Marbles.HTTP.Middleware.Hawk = class HawkMiddleware
constructor: (options = {}) ->
options = _.clone(options)
unless options.credentials
throw new Error("HawkMiddleware: credentials member of options is required!")
@credentials = {
id: options.credentials.id,
key: optio... | #= require hawk
Marbles.HTTP.Middleware.Hawk = class HawkMiddleware
constructor: (options = {}) ->
options = _.clone(options)
unless options.credentials
throw new Error("HawkMiddleware: credentials member of options is required!")
@credentials = {
id: options.credentials.id,
key: optio... | Fix hawk middleware to only add payload hash when there is a request body | Fix hawk middleware to only add payload hash when there is a request body
| CoffeeScript | bsd-3-clause | tent/tent-admin |
22b67f269c48916107f846c5a65ef59715d43bd8 | web/src/views/main-menu.cjsx | web/src/views/main-menu.cjsx | require 'semantic-ui-css/components/icon.css'
require 'semantic-ui-css/components/menu.css'
require 'semantic-ui-css/components/sidebar.css'
require '../../css/menu.css'
React = require 'react'
module.exports = React.createClass
displayName: 'MainMenu'
render: ->
active = (id) =>
if @props... | require 'semantic-ui-css/components/icon.css'
require 'semantic-ui-css/components/menu.css'
require 'semantic-ui-css/components/sidebar.css'
require '../../css/menu.css'
api = require '../backend.coffee'
React = require 'react'
module.exports = React.createClass
displayName: 'MainMenu'
render: ->
act... | Add feed link to menu | Add feed link to menu
| CoffeeScript | mit | foobert/gc,foobert/gc,foobert/gc,foobert/gc |
78b8bfaa0a56a9bf14f460f51b57bb4d9bb5c38a | test/handmade.coffee | test/handmade.coffee | fs = require 'fs'
path = require 'path'
assert = require 'assert'
valid8 = require '..'
random = require './random'
buffers = []
test = (buffer)->
buffer = new Buffer buffer unless buffer instanceof Buffer
buffers.push buffer = buffer
assert valid8 buffer
describe 'Empty buffer', ->
it 'is valid', ->
tes... | fs = require 'fs'
path = require 'path'
assert = require 'assert'
valid8 = require '..'
random = require './random'
buffers = []
test = (buffer)->
buffer = new Buffer buffer unless buffer instanceof Buffer
buffers.push buffer = buffer
assert valid8 buffer
describe 'Empty buffer', ->
it 'is valid', ->
tes... | Test for pile of poo | Test for pile of poo
| CoffeeScript | mit | ukoloff/valid-8 |
4c23bfe382c8013ac6cc91d8a4f07a7b598c148a | assets/game_state.coffee | assets/game_state.coffee | 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) ->
... | 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) ->
... | Add budget and change to left menu | Add budget and change to left menu
| CoffeeScript | mit | guts2014/TEAM-NAME-PHP,guts2014/TEAM-NAME-PHP |
835b58ad7cae919303b1ad74515a5d3cefe5947b | server/components/indicatorator/indicatorators/ede_indicatorator.coffee | server/components/indicatorator/indicatorators/ede_indicatorator.coffee | fs = require('fs')
_ = require('underscore')
class EdeIndicatorator
constructor: (indicatorType, indicatorCode) ->
indicatorType = indicatorType.toLowerCase()
@indicatorDefinition = JSON.parse(
fs.readFileSync("./definitions/#{indicatorType}_indicator_definitions.json", 'UTF8')
)[indicatorCode]
... | fs = require('fs')
_ = require('underscore')
class EdeIndicatorator
constructor: (indicatorType, indicatorCode) ->
indicatorType = indicatorType.toLowerCase()
@indicatorDefinition = JSON.parse(
fs.readFileSync(
"#{__dirname}/../definitions/#{indicatorType}_indicator_definitions.json", 'UTF8'
... | Fix relative path broken by module move | Fix relative path broken by module move
| CoffeeScript | bsd-3-clause | unepwcmc/NRT,unepwcmc/NRT |
b74da697bcaafb0f649e504e0263cb3fddd9e856 | src/commentList.coffee | src/commentList.coffee | templateName = 'commentList'
TemplateClass = Template[templateName]
TemplateClass.created = ->
series = @data?.series
unless series then throw new Error('No series ID provided for comment list.')
@isEditing = new ReactiveVar(false)
# Old subscriptions are retained if we need to view the same series later.
Me... | templateName = 'commentList'
TemplateClass = Template[templateName]
TemplateClass.created = ->
series = @data?.series
unless series then throw new Error('No series ID provided for comment list.')
@isEditing = new ReactiveVar(false)
# Old subscriptions are retained if we need to view the same series later.
Me... | Reduce wait time for scroll to bottom | Reduce wait time for scroll to bottom
| CoffeeScript | mit | aramk/meteor-comments,aramk/meteor-comments |
e23ae4793a16221e71e7b7da3cb414439bdc9e7f | src/defines.coffee | src/defines.coffee | # Defines
# =======
define [], () ->
'use strict'
defines =
# Turn off here to disable entirely (@release).
# Off by default for performance.
debugging: off
# Turn off here to disable entirely (@release).
developing: on
gameW: 416
gameH: 600
artH: 2912
mapH: 3152 # +240
... | # Defines
# =======
define [], () ->
'use strict'
defines =
# Turn off here to disable entirely (@release).
# Off by default for performance.
debugging: off
# Turn off here to disable entirely (@release).
developing: on
gameW: 416
gameH: 600
artH: 2912
mapH: 3136 # +224
... | Fix background mismatch between MenuState, PlayState. | Fix background mismatch between MenuState, PlayState. | CoffeeScript | artistic-2.0 | hlfcoding/morning-stroll |
676b7d1f53a76d5bc1da9f41eed22ba60326e41c | lib/skeleton/option_parser.coffee | lib/skeleton/option_parser.coffee | class OptionParser
###
* Parse command-line options
* @param {Array} @args
* @param {Object} opts
###
constructor: (@args, opts) ->
options = {}
for opt in opts
short = opt[0]
long = opt[1]
choices = if opt[3]? then opt[3] else null
optName = long.replace('--', '')
... | class OptionParser
###
* Parse command-line options
* @param {Array} @args
* @param {Object} opts
###
constructor: (@args, opts) ->
options = {}
for opt in opts
short = opt[0]
long = opt[1]
choices = if opt[3]? then opt[3] else null
optName = long.replace('--', '')
... | Throw error when option value is not valid | Throw error when option value is not valid
| CoffeeScript | mit | EtienneLem/skeleton |
627f0e66536479fcae37fda40f90e939b93aa961 | lib/go-to-line-element.coffee | lib/go-to-line-element.coffee | {CompositeDisposable} = require 'event-kit'
{SpacePenDSL} = require 'atom-utils'
module.exports =
class GoToLineElement extends HTMLElement
SpacePenDSL.includeInto(this)
@content: ->
@tag 'atom-text-editor', mini: true, outlet: 'miniEditor'
@div class: 'message', outlet: 'message', """
Enter a cell ro... | {SpacePenDSL} = require 'atom-utils'
module.exports =
class GoToLineElement extends HTMLElement
SpacePenDSL.includeInto(this)
@content: ->
@tag 'atom-text-editor', mini: true, outlet: 'miniEditor'
@div class: 'message', outlet: 'message', """
Enter a cell row:column to go to. The column can be either ... | Handle focus when opening go to line modal | Handle focus when opening go to line modal
| CoffeeScript | mit | abe33/atom-tablr |
3a4db27848b73a9eda6195289b6125027fe61e3e | src/trigger.coffee | src/trigger.coffee | # A generic class representing a node that activates a callback
# when intersecting with a designated `collector entity`
#
# Note that the word 'trigger' here is not connected with
# triggering as defined in the `Kona.Event` interface
#
# TODO: trigger examples
#
class Kona.Trigger extends Kona.Entity
constructor: (o... | # A generic class representing a node that activates a callback
# when intersecting with a designated `collector entity`
#
# Note that the word 'trigger' here is not connected with
# triggering as defined in the `Kona.Event` interface
#
# TODO: trigger examples
#
class Kona.Trigger extends Kona.Entity
constructor: (o... | Move withinTolerance() into Kona.Trigger to be overriden in derived classes for checking activation conditions | Move withinTolerance() into Kona.Trigger to be overriden in derived classes for checking activation conditions
| CoffeeScript | mit | andrewberls/kona,andrewberls/kona |
e1d3f24b7df0a4fd080eac87cc8e01cc6269085c | app/templates/spec/name-spec.coffee | app/templates/spec/name-spec.coffee |
<%= safeSlugname %> = require '../lib/<%= slugname %>'
<% if (testFramework === 'mocha') { %>
assert = require 'should' <% } %>
describe '<%= safeSlugname %>', ->
it 'should be awesome', -> <% if (testFramework === 'jasmine') { %>
expect(<%= safeSlugname %>()).toEqual('awesome')<% } %><% if (testFramework === ... |
<%= safeSlugname %> = require '../lib/<%= slugname %>'
<% if (testFramework === 'mocha') { %>
should = require('chai').should() <% } %>
describe '<%= safeSlugname %>', ->
it 'should be awesome', -> <% if (testFramework === 'jasmine') { %>
expect(<%= safeSlugname %>()).toEqual('awesome')<% } %><% if (testFramew... | Change should.js require to chai.js in spec | Change should.js require to chai.js in spec
| CoffeeScript | mit | liuxiong332/generator-node-gulp-coffee |
ddb99ba74e5fc43f48ef65402e0cc9d4c840fcc4 | app/routes.coffee | app/routes.coffee | module.exports = (match) ->
match '', 'home#index'
match 'u/6045251/shiny-wight/index.html', 'home#index'
match 'shiny-wight/index.html', 'home#index'
| module.exports = (match) ->
match '', 'home#index'
match 'index.html', 'home#index'
match 'u/6045251/shiny-wight/index.html', 'home#index'
match 'shiny-wight/index.html', 'home#index'
| Add neccessary route for debugging | Add neccessary route for debugging | CoffeeScript | apache-2.0 | despairblue/shiny-wight |
b5c5c9dbb7ff1b80caec1d554818778b92a48112 | assets/javascripts/routes/users_new_route.js.coffee | assets/javascripts/routes/users_new_route.js.coffee | App.UsersNewRoute = App.AuthenticatedRoute.extend
setupController: (controller, model)->
controller.set "domains", @store.find("domain")
| App.UsersNewRoute = App.AuthenticatedRoute.extend
setupController: (controller)->
controller.setProperties
"firstName": null
"lastName": null
"email": null
"password": null
"role": null
| Set properties to null before they are used to create new user | Set properties to null before they are used to create new user
| CoffeeScript | mit | sashafklein/bloc-mogo,HashNuke/mogo-chat,sashafklein/bloc-mogo,louishawkins/mogo-chat,HashNuke/mogo-chat,di-stars/mogo-chat,di-stars/mogo-chat,HashNuke/mogo-chat,louishawkins/mogo-chat,sashafklein/bloc-mogo,louishawkins/mogo-chat,di-stars/mogo-chat |
2b822746d28b19b59b30a11f8b2218e052789f26 | src/components/SplitStr.coffee | src/components/SplitStr.coffee | # The SplitStr component receives a string in the in port, splits it by
# string specified in the delimiter port, and send each part as a separate
# packet to the out port
noflo = require "noflo"
class SplitStr extends noflo.Component
constructor: ->
@delimiterString = "\n"
@string = ""
@... | # The SplitStr component receives a string in the in port, splits it by
# string specified in the delimiter port, and send each part as a separate
# packet to the out port
noflo = require "noflo"
class SplitStr extends noflo.Component
constructor: ->
@delimiterString = "\n"
@strings = []
... | Use array to avoid beginning of subsequent IPs be merged with the end of preceding IPs | Use array to avoid beginning of subsequent IPs be merged with the end of preceding IPs
| CoffeeScript | mit | trustmaster/noflo,trustmaster/noflo,lxfschr/noflo,jonnor/noflo,npmcomponent/noflo-noflo,jonnor/noflo,noflo/noflo,saurabhsood91/noflo,lxfschr/noflo,saurabhsood91/noflo |
25f53e972ca8feb5234d29c581927d5d63b6887d | app/assets/javascripts/uploadcare/utils/image-loader.coffee | app/assets/javascripts/uploadcare/utils/image-loader.coffee | {
jQuery: $
} = uploadcare
uploadcare.namespace 'utils', (ns) ->
trackLoading = (image, src) ->
def = $.Deferred()
if src
image.src = src
if image.complete
def.resolve(image)
else
$(image).one 'load', =>
def.resolve(image)
$(image).one 'error', =>
def.reje... | {
jQuery: $
} = uploadcare
uploadcare.namespace 'utils', (ns) ->
trackLoading = (image, src) ->
def = $.Deferred()
if src
image.src = src
if image.complete
def.resolve(image)
else
$(image).one 'load', =>
def.resolve(image)
$(image).one 'error', =>
def.reje... | Fix videoLoader. Run `load` for HTMLElement instead jQuery el. | Fix videoLoader. Run `load` for HTMLElement instead jQuery el.
| CoffeeScript | bsd-2-clause | uploadcare/uploadcare-widget,uploadcare/uploadcare-widget |
cda45820d8b9ab8326ab223be0b11e6be4a5313a | spec/integrations/command.coffee | spec/integrations/command.coffee | childProcess = require 'child_process'
path = require 'path'
command = "node #{path.resolve __dirname, '../../bin/iced.js'}"
module.exports = (args...) ->
args[0] = "#{command} #{args[0]}"
childProcess.exec.apply childProcess, args
| childProcess = require 'child_process'
path = require 'path'
command = "node #{path.resolve __dirname, '../../bin/iced.js'}"
module.exports = (args...) ->
args[0] = "#{command} #{args[0]}"
if typeof args[1] is 'object' and args[1].env?
newEnv = process.env
newEnv[key] = value for key, value of args[1].env
... | Add current env to child env, if child env is specified | Add current env to child env, if child env is specified
| CoffeeScript | mit | demands/node-iced |
0b0d374cfa5f845a5fd53399623883372983ccb7 | client/lib/cordova/keyboard-fix.coffee | client/lib/cordova/keyboard-fix.coffee | if Meteor.isCordova
document.addEventListener 'deviceready', ->
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
cordova.plugins.Keyboard.disableScroll(true);
window.addEventListener 'native.keyboardshow', ->
$('.main-content').css 'height', window.innerHeight
window.addEventListener 'native.keyboard... | if Meteor.isCordova
if device.platform.toLowerCase() isnt 'android'
document.addEventListener 'deviceready', ->
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
cordova.plugins.Keyboard.disableScroll(true);
window.addEventListener 'native.keyboardshow', ->
$('.main-content').css 'height', window.... | Fix keyboard resize for android devices | Fix keyboard resize for android devices
| CoffeeScript | mit | jeann2013/Rocket.Chat,jessedhillon/Rocket.Chat,4thParty/Rocket.Chat,ImpressiveSetOfIntelligentStudents/chat,ealbers/Rocket.Chat,Jandersolutions/Rocket.Chat,litewhatever/Rocket.Chat,dmitrijs-balcers/Rocket.Chat,igorstajic/Rocket.Chat,j-ew-s/Rocket.Chat,subesokun/Rocket.Chat,mrsimpson/Rocket.Chat,VoiSmart/Rocket.Chat,aty... |
70b8dfd2ed53909e9e618884697ec3d9416b3bc9 | lib/Strategy/DBStrategy/Save/CollisionCheckTemporaryTable.coffee | lib/Strategy/DBStrategy/Save/CollisionCheckTemporaryTable.coffee | _ = require "underscore"
Promise = require "bluebird"
TemporaryTable = require "./TemporaryTable"
class CollisionCheckTemporaryTable extends TemporaryTable
insert: (externalObject) ->
@checkIfExists externalObject
.then (exists) ->
if not exists
super
else
console.warn "Primary k... | _ = require "underscore"
Promise = require "bluebird"
TemporaryTable = require "./TemporaryTable"
class CollisionCheckTemporaryTable extends TemporaryTable
insert: (externalObject) ->
@checkIfExists externalObject
.then (exists) ->
if not exists
super(externalObject)
else
console... | Implement Collision Check Temporary Table. | Implement Collision Check Temporary Table.
| CoffeeScript | agpl-3.0 | fixin-platform/backend-core,spirehq/backend-core,spirehq/backend-core,fixin-platform/backend-core |
7ed2b046927e8bb63f055e1dcfafe1413e54e622 | topics/atom.symlink/config.cson | topics/atom.symlink/config.cson | "*":
"autocomplete-plus":
confirmCompletion: "enter"
fileBlacklist: [
"*.md"
"*.txt"
]
core:
telemetryConsent: "limited"
editor:
softTabs: false
tabLength: 4
"exception-reporting":
userId: "2c613f71-39b8-42c5-bef0-f61d264be689"
"git-diff":
showIconsInEditorGutter: t... | "*":
"autocomplete-plus":
confirmCompletion: "enter"
fileBlacklist: [
"*.md"
"*.txt"
]
core:
telemetryConsent: "limited"
editor:
softTabs: false
tabLength: 4
"exception-reporting":
userId: "2c613f71-39b8-42c5-bef0-f61d264be689"
"git-diff":
showIconsInEditorGutter: t... | Change tab length in GFM. | Change tab length in GFM.
Signed-off-by: Jason Lynch <68c46a606457643eab92053c1c05574abb26f861@calindora.com>
| CoffeeScript | mit | aexoden/dotfiles,aexoden/dotfiles |
31435ae9e07bc072dfa84d0330897c1214ff9a4c | server/index.coffee | server/index.coffee | util = require 'util'
module.exports = (app, mongoose, options) ->
models = require('./models')(mongoose)
controllers = require('./controllers')(models)
auth = require('./authentication')(app, models, options)
require('./routes')(app, auth, controllers)
app.configure 'test', ->
console.log 'in... | util = require 'util'
module.exports = (app, mongoose, options) ->
models = require('./models')(mongoose)
controllers = require('./controllers')(models)
auth = require('./authentication')(app, models, options)
require('./routes')(app, auth, controllers)
resetTestDb = ->
app.configure 'test', ->
... | Improve how we inject test data for e2e testing purposes | Improve how we inject test data for e2e testing purposes
| CoffeeScript | apache-2.0 | GoIncremental/gi-security,GoIncremental/gi-security |
5362591f3436cbdbdc615ed25db4ddec0e1450ff | app/components/markdown-editor.cjsx | app/components/markdown-editor.cjsx | # @cjsx React.DOM
React = require 'react'
Markdown = require './markdown'
module.exports = React.createClass
displayName: 'MarkdownEditor'
getInitialState: ->
previewing: false
value: @props.defaultValue ? ''
render: ->
previewing = @props.previewing ? @state.previewing
<div className={['mark... | # @cjsx React.DOM
React = require 'react'
Markdown = require './markdown'
alert = require '../lib/alert'
NOOP = Function.prototype
module.exports = React.createClass
displayName: 'MarkdownEditor'
getDefaultProps: ->
placeholder: ''
value: ''
onChange: NOOP
getInitialState: ->
previewing: fals... | Make the markdown editor behave more like a normal input | Make the markdown editor behave more like a normal input | CoffeeScript | apache-2.0 | tfmorris/Panoptes-Front-End,alexbfree/Panoptes-Front-End,camallen/Panoptes-Front-End,amyrebecca/Panoptes-Front-End,CKrawczyk/Panoptes-Front-End,fmnhExhibits/Panoptes-Front-End,mrniaboc/Panoptes-Front-End,amyrebecca/Panoptes-Front-End,edpaget/Panoptes-Front-End,marten/Panoptes-Front-End,parrish/Panoptes-Front-End,camall... |
06200a9d41ef2bd01c6d60d02973da36de6943b4 | lib/main.coffee | lib/main.coffee | PackageGeneratorView = require './package-generator-view'
module.exports =
config:
createInDevMode:
default: false
type: 'boolean'
activate: ->
@view = new PackageGeneratorView()
deactivate: ->
@view?.destroy()
| PackageGeneratorView = require './package-generator-view'
module.exports =
config:
createInDevMode:
default: false
type: 'boolean'
description: 'When disabled, generated packages are linked into Atom in both normal mode and dev mode. When enabled, generated packages are linked into Atom only in... | Add description for config setting | Add description for config setting
| CoffeeScript | mit | atom/package-generator |
1b7dbea42a79bfa21176e85428f5120de8c699b9 | lib/project-manager-add-view.coffee | lib/project-manager-add-view.coffee | {View} = require 'atom-space-pen-views'
path = require 'path'
module.exports =
class ProjectManagerAddView extends View
projectManager: null
@content: ->
@div class: 'project-manager', =>
@div class: 'editor-container', outlet: 'editorContainer', =>
@div =>
@input outlet:'editor', clas... | {View} = require 'atom-space-pen-views'
path = require 'path'
module.exports =
class ProjectManagerAddView extends View
projectManager: null
@content: ->
@div class: 'project-manager', =>
@div class: 'editor-container', outlet: 'editorContainer', =>
@div =>
@input outlet:'editor', clas... | Update to use getPaths() instead of getPath() | Update to use getPaths() instead of getPath()
| CoffeeScript | mit | danielbrodin/atom-project-manager,UltCombo/atom-project-manager,douggr/atom-project-manager |
40d6c45f05772c21abbbec4a750c88c8cdeb005f | app/static/coffee/models.coffee | app/static/coffee/models.coffee | window.coviolations ?=
views: {}
models: {}
plotting: {}
push: {}
$ ->
app = window.coviolations
class app.models.UserProject extends Backbone.Model
### User project model ###
urlRoot: '/api/v1/userprojects/'
class app.models.UserProjectCollection extends Backbone.Collect... | window.coviolations ?=
views: {}
models: {}
plotting: {}
push: {}
$ ->
app = window.coviolations
class app.models.UserProject extends Backbone.Model
### User project model ###
urlRoot: '/api/v1/projects/project/'
class app.models.UserProjectCollection extends Backbone.Col... | Change api urls in client side | Change api urls in client side
| CoffeeScript | mit | nvbn/coviolations_web,nvbn/coviolations_web |
7df1a080063ca5d35933341adbc0efed2741a407 | app/routes/application.coffee | app/routes/application.coffee | Route = Ember.Route.extend
model: ->
# return the current user as the model if authenticated, otherwise a blank object
new Promise (resolve, reject) =>
promise = $.ajax
url: '/api/me'
dataType: 'json'
promise.done (result) =>
user = Ember.Object.create(result)
if re... | Route = Ember.Route.extend
model: ->
# return the current user as the model if authenticated, otherwise a blank object
new Ember.RSVP.Promise (resolve, reject) =>
promise = $.ajax
url: '/api/me'
dataType: 'json'
promise.done (result) =>
user = Ember.Object.create(result)
... | Return proper Ember.RSVP.Promise to avoid troubles on browsers | Return proper Ember.RSVP.Promise to avoid troubles on browsers
| CoffeeScript | mit | artzte/fightbook-app |
a0424fbb33a44822064867aff9b7bce6cd5faeda | lib/tag-reader.coffee | lib/tag-reader.coffee | {Task} = require 'atom'
ctags = require 'ctags'
fs = require 'fs-plus'
handlerPath = require.resolve('./load-tags-handler')
module.exports =
getTagsFile: ->
tagsFile = atom.project.resolve("tags")
return tagsFile if fs.isFileSync(tagsFile)
tagsFile = atom.project.resolve(".tags")
return tagsFile if... | {Task} = require 'atom'
ctags = require 'ctags'
fs = require 'fs-plus'
handlerPath = require.resolve('./load-tags-handler')
module.exports =
getTagsFile: ->
tagsFile = atom.project.resolve("tags")
return tagsFile if fs.isFileSync(tagsFile)
tagsFile = atom.project.resolve(".tags")
return tagsFile if... | Add support for Ruby bang and question methods | Add support for Ruby bang and question methods
* The ::find method of tag-reader.coffee uses getCurrentWordBufferRange()
to pull in the current word to pull in the current tag. Passing in a
custom regexp to getCurrentWordBufferRange() determines what constitutes
a word.
* Obtain the charAfterWord by incrementin... | CoffeeScript | mit | rodumani/symbols-view,changjej/symbols-view,spencerlyon2/symbols-view,harai/atom-gnu-global,atom/symbols-view,changjej/symbols-view,kainwinterheart/symbols-view,spencerlyon2/symbols-view,rodumani/symbols-view,harai/atom-gnu-global |
592af2c9acd0adb6d6bb260ee8439da67d2052bb | app/src/restclients/restclient.coffee | app/src/restclients/restclient.coffee | ledger.api ?= {}
class ledger.api.HttpClient extends @HttpClient
constructor: () -> super
authenticated: -> ledger.api.authenticated(@_baseUrl)
class ledger.api.RestClient
@API_BASE_URL: ledger.config.restClient.baseUrl
@singleton: () -> @instance ||= new @()
http: () ->
@_client ||= @_httpClientFact... | ledger.api ?= {}
class ledger.api.HttpClient extends @HttpClient
constructor: () -> super
authenticated: -> ledger.api.authenticated(@_baseUrl)
class ledger.api.RestClient
@API_BASE_URL: ledger.config.restClient.baseUrl
@singleton: () -> @instance ||= new @()
http: () ->
@_client ||= @_httpClientFact... | Add 'X-Ledger-Environment' in HTTP requests header | Add 'X-Ledger-Environment' in HTTP requests header
| CoffeeScript | mit | LedgerHQ/ledger-wallet-chrome,LedgerHQ/ledger-wallet-chrome,Morveus/ledger-wallet-doge-chrome,Morveus/ledger-wallet-doge-chrome |
65d176f533746d463d125573e66d170f78516111 | app/assets/javascripts/darkswarm/filters/localize_currency.js.coffee | app/assets/javascripts/darkswarm/filters/localize_currency.js.coffee | Darkswarm.filter "localizeCurrency", (currencyConfig)->
# Convert number to string currency using injected currency configuration.
(amount) ->
# Set country code (eg. "US").
currency_code = if currencyConfig.display_currency then " " + currencyConfig.currency else ""
# Set decimal points, 2 or 0 if hid... | Darkswarm.filter "localizeCurrency", (currencyConfig)->
# Convert number to string currency using injected currency configuration.
(amount) ->
# Set country code (eg. "US").
currency_code = if currencyConfig.display_currency then " " + currencyConfig.currency else ""
# Set decimal points, 2 or 0 if hide... | Fix wrong way to force currency symbol after the amount | Fix wrong way to force currency symbol after the amount
| CoffeeScript | agpl-3.0 | mkllnk/openfoodnetwork,lin-d-hop/openfoodnetwork,mkllnk/openfoodnetwork,openfoodfoundation/openfoodnetwork,openfoodfoundation/openfoodnetwork,openfoodfoundation/openfoodnetwork,oeoeaio/openfoodnetwork,Matt-Yorkley/openfoodnetwork,oeoeaio/openfoodnetwork,Matt-Yorkley/openfoodnetwork,openfoodfoundation/openfoodnetwork,li... |
9437d7868e7ef6afe611eb1c9f7a1a5813a6f89a | index.coffee | index.coffee | 'use strict';
util = require 'util'
{EventEmitter} = require 'events'
elasticsearch = require 'elasticsearch'
_ = require 'lodash'
debug = require('debug')('meshblu-elasticsearch')
request = require 'request'
MESSAGE_SCHEMA =
type: 'object'
properties:
exampleBoolean:
typ... | 'use strict';
util = require 'util'
{EventEmitter} = require 'events'
elasticsearch = require 'elasticsearch'
_ = require 'lodash'
debug = require('debug')('meshblu-elasticsearch')
request = require 'request'
MESSAGE_SCHEMA =
type: 'object'
properties:
exampleBoolean:
typ... | Allow overriding of elasticsearch config via environment | Allow overriding of elasticsearch config via environment
| CoffeeScript | mit | octoblu/meshblu-elasticsearch |
97821d54f98f1c04020c7574c07d8ec4f205d6fc | index.coffee | index.coffee | module.exports = (Impromptu, register, system) ->
register 'pwd',
update: ->
process.env.PWD
register 'prettyPwd',
update: ->
cwd = process.env.PWD
if cwd.indexOf process.env.HOME == 0
cwd = '~' + cwd.slice process.env.HOME.length
cwd
register 'user',
update: (done) -... | module.exports = (Impromptu, register, system) ->
register 'pwd',
update: ->
process.env.PWD
register 'prettyPwd',
update: ->
cwd = process.env.PWD
if cwd.indexOf(process.env.HOME) == 0
cwd = '~' + cwd.slice process.env.HOME.length
cwd
register 'user',
update: (done) ... | Fix logic/syntax error checking for child paths of home directory | Fix logic/syntax error checking for child paths of home directory
Fixes #5
| CoffeeScript | mit | impromptu/impromptu-system |
a4f1049b6dc240714d276eeae8ded19e20df8e3c | lib/autosave.coffee | lib/autosave.coffee | {$} = require 'atom'
module.exports =
configDefaults:
enabled: false
activate: ->
atom.workspaceView.on 'focusout', ".editor:not(.mini)", (event) =>
editor = event.targetView()?.getModel()
@autosave(editor)
atom.workspaceView.on 'pane:before-item-destroyed', (event, paneItem) =>
@au... | {$} = require 'atom'
module.exports =
configDefaults:
enabled: false
activate: ->
atom.workspaceView.on 'focusout', ".editor:not(.mini)", (event) =>
editor = $(event.target).closest('.editor').view()?.getModel()
@autosave(editor)
atom.workspaceView.on 'pane:before-item-destroyed', (event,... | Make focusout handling compatible with React editor | Make focusout handling compatible with React editor
Because the input element isn't handled by jQuery, it's not possible
to retrieve the containing view with Event::targetView. This approach is
wordier but can retrieve the view correctly. | CoffeeScript | mit | atom/autosave,akonwi/autosave |
f1478cec9ac1e08b053f5a01dcc5df2ba17fc042 | lib/package-list-custom-list-view.coffee | lib/package-list-custom-list-view.coffee | {$, EditorView, View} = require 'atom'
utils = require './Utils'
module.exports=
class PackageListCustomListView extends View
@content: ->
@div class: 'overlay from-top', =>
@subview 'gistUrl', new EditorView(mini: true, placeholderText: 'ID of Gist with packages list.')
@div class: 'block', =>
... | {$, EditorView, View} = require 'atom'
utils = require './Utils'
module.exports=
class PackageListCustomListView extends View
@content: ->
@div class: 'overlay from-top', =>
@subview 'gistUrl', new EditorView(mini: true, placeholderText: 'ID of Gist with packages list.')
@div class: 'block', =>
... | Detach custom list window even if downloading fails | Detach custom list window even if downloading fails
| CoffeeScript | mit | Trudko/package-list-downloader |
32062613c6a9de47447f0208eaaaf937e3cbbf44 | app/assets/javascripts/components/users/base.js.coffee | app/assets/javascripts/components/users/base.js.coffee | window.UsersComponent = class UsersComponent
@initialize: ->
@addEventListeners()
@addEventListeners: ->
@userDetailsTooltip()
@userDetailsTooltip: ->
tooltipClass = '.information-tooltip'
$(document).on('click', "#{tooltipClass}-trigger", (ev) ->
ev.preventDefault()
$this = $(@)
... | window.UsersComponent = class UsersComponent
@initialize: ->
@addEventListeners()
@addEventListeners: ->
@userDetailsTooltip()
#Enables search through users table
enableSearch()
@userDetailsTooltip: ->
tooltipClass = '.information-tooltip'
$(document).on('click', "#{tooltipClass}-trigger... | Enable search in users table | Enable search in users table
| CoffeeScript | bsd-3-clause | unepwcmc/ORS,unepwcmc/ORS,unepwcmc/ORS,unepwcmc/ORS,unepwcmc/ORS |
95c910f30c3c1f9a477730a01064e87b2238ba2e | spec/parser_spec.coffee | spec/parser_spec.coffee | Walrus = require '../lib/walrus'
describe 'Walrus.Parser', ->
it 'should be defined', -> expect( Walrus.Parser ).toBeDefined( )
describe '#parse', ->
it 'should be defined', -> expect( Walrus.Parser.parse ).toBeDefined( )
it 'should parse all examples correctly', ->
fs = require 'fs'
pat... | Walrus = require '../lib/walrus'
describe 'Walrus.Parser', ->
it 'should be defined', -> expect( Walrus.Parser ).toBeDefined( )
describe '#parse', ->
it 'should be defined', -> expect( Walrus.Parser.parse ).toBeDefined( )
fs = require 'fs'
path = require 'path'
specs = './spec/examples'
... | Refactor parser specs to gain one expectation per spec | Refactor parser specs to gain one expectation per spec
| CoffeeScript | mit | jeremyruppel/walrus |
f8714c7acf0ea10576bfb408a01ac0fddd9c2ff9 | specs/smoke.spec.coffee | specs/smoke.spec.coffee | require('./spec_helper')
spy = require('through2-spy')
describe 'smoke test', ->
createFS = require('../index')
coffee = require('gulp-coffee')
it 'should mock gulp', (done) ->
fs = createFS
src:
coffee:
'sample.coffee': """
console.log 'Hello world'
... | require('./spec_helper')
spy = require('through2-spy')
describe 'smoke test', ->
createFS = require('../index')
coffee = require('gulp-coffee')
it 'should mock gulp', (done) ->
fs = createFS
src:
coffee:
'sample.coffee': """
console.log 'Hello world'
... | Update smoke test with latest API | Update smoke test with latest API
| CoffeeScript | mit | gonzoRay/vinyl-fs-mock,timnew/vinyl-fs-mock |
416295fa0620840c7685e1e2bc1417eea3e18b6c | spec/welcome-spec.coffee | spec/welcome-spec.coffee | describe "Welcome", ->
editor = null
beforeEach ->
waitsForPromise ->
atom.packages.activatePackage("welcome")
waitsFor ->
editor = atom.workspace.getActiveTextEditor()
describe "when activated for the first time", ->
it "shows the welcome buffer", ->
expect(editor.getText()).toMat... | describe "Welcome", ->
editor = null
beforeEach ->
spyOn(atom.workspace, 'open').andCallThrough()
waitsForPromise ->
atom.packages.activatePackage("welcome")
waitsFor ->
editor = atom.workspace.getActiveTextEditor()
describe "when activated for the first time", ->
it "shows the wel... | Speed up test suite more | Speed up test suite more
| CoffeeScript | mit | atom/welcome |
9abec4880679864e6ed8c5b7657ecf51c7a423d9 | server/services/twilioService.coffee | server/services/twilioService.coffee | twilio = require("twilio")
bot = require("../bot")
config = require("../config")
TWILIO_PHONE = config.twilio.phone
TWILIO_ACCOUNT_SID = config.twilio.accountSid
TWILIO_AUTH_TOKEN = config.twilio.authToken
if not (TWILIO_PHONE and TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN)
throw new Error "Please configure Twilio"
cli... | twilio = require("twilio")
bot = require("../bot")
config = require("../config")
TWILIO_PHONE = config.twilio.phone
TWILIO_ACCOUNT_SID = config.twilio.accountSid
TWILIO_AUTH_TOKEN = config.twilio.authToken
if not (TWILIO_PHONE and TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN)
throw new Error "Please configure Twilio"
cli... | Add prefix to error messages | Add prefix to error messages
"An error occurred: #{ERROR}"
| CoffeeScript | mit | Glavin001/TorrentAutomator,Glavin001/TorrentAutomator,Glavin001/TorrentAutomator |
f75f784a1a2c0e99d5e05c482c05ee52ccd8cbad | app/scripts/components/ViewportRelativeMotion.coffee | app/scripts/components/ViewportRelativeMotion.coffee | Crafty.c 'ViewportRelativeMotion',
init: ->
remove: ->
viewportRelativeMotion: ({ x, y, speed }) ->
@_startLocation = { x, y }
@_speed = speed
@_initialViewport =
x: (Crafty.viewport.width / 4)
@_location =
sx: x + ((x - @_initialViewport.x) * (@_speed - 1))
sy: y
dx: @dx... | Crafty.c 'ViewportRelativeMotion',
init: ->
remove: ->
viewportRelativeMotion: ({ x, y, speed }) ->
@_startLocation = { x, y }
@_speed = speed
@_initialViewport =
x: (Crafty.viewport.width / 4)
@_location =
sx: x + ((x - @_initialViewport.x) * (@_speed - 1))
sy: y
dx: @dx... | Fix issue of initial placement of items | Fix issue of initial placement of items
| CoffeeScript | mit | matthijsgroen/game-play,matthijsgroen/game-play,matthijsgroen/game-play |
7c836132adededdee2b1bc175251d1c470c25124 | lib/actions/info.coffee | lib/actions/info.coffee | packageJSON = require('../../package.json')
exports.version =
signature: 'version'
description: 'output the version number'
action: ->
console.log(packageJSON.version)
| packageJSON = require('../../package.json')
exports.version =
signature: 'version'
description: 'output the version number'
action: ->
console.log("#{packageJSON.name}: #{packageJSON.version}")
console.log("node: #{process.version}")
| Add node version to version command output | Add node version to version command output
| CoffeeScript | apache-2.0 | resin-io/resin-cli,resin-io/resin-cli,resin-io/resin-cli,resin-io/resin-cli |
eb1522e8539a82a6b6f34052310b159069622bc1 | brunch-config.coffee | brunch-config.coffee | exports.config =
# See http://brunch.readthedocs.org/en/latest/config.html for documentation.
paths:
public: 'public'
files:
javascripts:
joinTo:
'js/app.js': /^app/
stylesheets:
joinTo:
'ss/app.css': /^app\/styles/
| exports.config =
# See http://brunch.readthedocs.org/en/latest/config.html for documentation.
paths:
public: 'public'
files:
javascripts:
joinTo:
'js/app.js': /^app/
stylesheets:
joinTo:
'ss/app.css': /^app\/styles/
plugins:
sass:
mode: 'native'
| Configure sass to use libsass | Configure sass to use libsass
| CoffeeScript | mit | mgarbacz/existential.io |
c291b057515ba991cb89ba4799ff1115d59e0b30 | src/storyboard.coffee | src/storyboard.coffee | ###
| Storyboard
| (c) Guillermo Grau Panea 2016
| License: MIT
###
k = require './constants'
# Enable chalk colors in the browser (we'll handle the conversion)
if k.IS_BROWSER
process.env.COLORTERM = true
hub = require './hub'
stories = require './stories'
consoleListener = require './listeners/console'
mainStory... | ###
| Storyboard
| (c) Guillermo Grau Panea 2016
| License: MIT
###
k = require './constants'
# Chalk is disabled by default in the browser. Override
# this default (we'll handle ANSI code conversion ourselves
# when needed)
chalk = require 'chalk'
chalk.enabled = true
mainStory = require './stories'
hub = require '.... | Add wsClient listener by default in browser. More robust way to enable chalk in browser | Add wsClient listener by default in browser. More robust way to enable chalk in browser
| CoffeeScript | mit | guigrpa/storyboard,guigrpa/storyboard |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.