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 |
|---|---|---|---|---|---|---|---|---|---|
b398e5652be96e23b14979ca6e68f2c9827a0ef0 | atom/keymap.cson | atom/keymap.cson | # Your keymap
#
# Atom keymaps work similarly to stylesheets. Just as stylesheets use selectors
# to apply styles to elements, Atom keymaps use selectors to associate
# keystrokes with events in specific contexts.
#
# You can create a new keybinding in this file by typing "key" and then hitting
# tab.
#
# Here's an exa... | # Your keymap
#
# Atom keymaps work similarly to stylesheets. Just as stylesheets use selectors
# to apply styles to elements, Atom keymaps use selectors to associate
# keystrokes with events in specific contexts.
#
# You can create a new keybinding in this file by typing "key" and then hitting
# tab.
#
# Here's an exa... | Add additional shortcut for go-to-line in Atom | Add additional shortcut for go-to-line in Atom
| CoffeeScript | mit | mgee/dotfiles,mgee/dotfiles,mgee/dotfiles |
ffdfe8c984c502dbb146370258ac7918adcb8c78 | timeAsyncMethod.coffee | timeAsyncMethod.coffee |
module.exports = (obj, methodName, key, logger) ->
metrics = require('./metrics')
if typeof obj[methodName] != 'function'
throw new Error("[Metrics] expected object property '#{methodName}' to be a function")
realMethod = obj[methodName]
key = "methods.#{key}"
obj[methodName] = (originalArgs...) ->
[first... |
module.exports = (obj, methodName, key, logger) ->
metrics = require('./metrics')
if typeof obj[methodName] != 'function'
throw new Error("[Metrics] expected object property '#{methodName}' to be a function")
realMethod = obj[methodName]
key = "methods.#{key}"
obj[methodName] = (originalArgs...) ->
[first... | Clean up, don't allocate an extra date | Clean up, don't allocate an extra date
| CoffeeScript | mit | sharelatex/metrics-sharelatex |
b25d56b893c97ba4afa63d156cca995cc912a18e | lib/changes/changes-view.coffee | lib/changes/changes-view.coffee | $ = require 'jquery'
SplitView = require '../utils/split-view'
StatusListView = require './status-list-view'
DiffView = require './diff-view'
class ChangesView extends SplitView
initialize: ({@uri, width}) ->
@statusListView = new StatusListView
@diffView = new DiffView
@wi... | $ = require 'jquery'
SplitView = require '../utils/split-view'
StatusListView = require './status-list-view'
DiffView = require './diff-view'
class ChangesView extends SplitView
initialize: ({@uri, width}) ->
@statusListView = new StatusListView
@diffView = new DiffView
@wi... | Clear cached views on update | Clear cached views on update | CoffeeScript | mit | atom/github,atom/github,atom/github |
874cfcb3fddc69fadb047668c2bb5380c282f289 | src/script/countries/IRQ.coffee | src/script/countries/IRQ.coffee |
Phone = require('../Phone')
PhoneNumber = require('../PhoneNumber')
class Iraq
constructor: ->
@countryName = "Iraq"
@countryNameAbbr = "IRQ"
@countryCode = '964'
@regex = /^(?:\+|00)964(7?\d{1,2})\d{7}$/
@optionalTrunkPrefix = '0'
@nationalNumberSeparator = ' '
@nationalDestinationCode =
['1', '21'... |
Phone = require('../Phone')
PhoneNumber = require('../PhoneNumber')
class Iraq
constructor: ->
@countryName = "Iraq"
@countryNameAbbr = "IRQ"
@countryCode = '964'
@regex = /^(?:\+|00)964(7?\d{1,2})\d{7}$/
@optionalTrunkPrefix = '0'
@nationalNumberSeparator = ' '
@nationalDestinationCode =
['7(\\d{2}... | Add mobile operator codes for Iraq | Add mobile operator codes for Iraq
| CoffeeScript | mit | vtex/front.phone |
41ab290ffc401fd23b58c9c49c52e2e6eebff868 | lib/atom/project-paths.coffee | lib/atom/project-paths.coffee | Bacon = require 'baconjs'
atomStreams = require './streams.coffee'
filteredPathsStream = (pairwisePathsStream, filterFn) ->
pairwisePathsStream.flatMap (pair) ->
Bacon.fromArray filterFn(pair)
module.exports = ->
pathsStream = atomStreams.fromDisposable atom.project, 'onDidChangePaths'
.merge Bacon.fromAr... | Bacon = require 'baconjs'
atomStreams = require './streams.coffee'
filteredPathsStream = (pairwisePathsStream, filterFn) ->
pairwisePathsStream.flatMap (pair) ->
Bacon.sequentially 0, filterFn(pair)
module.exports = ->
pathsStream = atomStreams.fromDisposable atom.project, 'onDidChangePaths'
.merge Bacon.... | Use sequentially instead of fromArray | Use sequentially instead of fromArray
per FAQ recommendation,
https://github.com/baconjs/bacon.js/wiki/FAQ#why-isnt-my-subscriber-call
ed
| CoffeeScript | mit | onezoomin/atom-textual-velocity,viddo/atom-textual-velocity,viddo/atom-textual-velocity |
ad7260c3b99c6d73d01f01482ade2a74188d6b39 | atom/init.coffee | atom/init.coffee | # auto-indent when changing line or inserting at end of line
atom.commands.onDidDispatch (evt) ->
validCommands = [
'vim-mode-plus:change',
'vim-mode-plus:insert-after-end-of-line'
]
return unless evt.type in validCommands
editor = atom.workspace.getActivePaneItem()
element = editor.getElement()
ret... | # auto-indent when changing line or inserting at end of line
handleAutoIndentAfterChangeLine = (evt) ->
validCommands = [
'vim-mode-plus:change',
'vim-mode-plus:insert-after-end-of-line'
]
return unless evt.type in validCommands
editor = atom.workspace.getActivePaneItem()
element = editor.getElement()... | Trim trailing whitespace when exiting insert mode | Trim trailing whitespace when exiting insert mode
| CoffeeScript | mit | BinaryMuse/dotfiles,BinaryMuse/dotfiles,BinaryMuse/dotfiles,BinaryMuse/dotfiles |
e6fc4e58a5cb5ddb39db71e052a6108ec1d31c92 | Gruntfile.coffee | Gruntfile.coffee | module.exports = (grunt) ->
grunt.initConfig
clean:
package: ['tasks/gyp.js']
test: ['test/support/build']
coffee:
task:
options:
bare: true
files:
'tasks/gyp.js': 'tasks/gyp.coffee'
mochacli:
options:
bail: true
compilers: ['coffee:coffee-script/register']
files: ['test/... | module.exports = (grunt) ->
grunt.initConfig
clean:
package: ['tasks/gyp.js']
test: ['test/support/build']
coffee:
task:
options:
bare: true
files:
'tasks/gyp.js': 'tasks/gyp.coffee'
mochacli:
options:
bail: true
compilers: ['coffee:coffee-script/register']
files: ['test/... | Remove tasks/gyp.js before running tests | Remove tasks/gyp.js before running tests
Otherwise Grunt would prefer tasks/gyp.js over tasks/gyp.coffee and changes in the CoffeeScript source would have no effect.
| CoffeeScript | bsd-2-clause | SonicHedgehog/grunt-node-gyp |
fa5c4b0879c01a18309812b3f5aaeb23fc09aeb0 | core/app/backbone/initializers/client_initializer.coffee | core/app/backbone/initializers/client_initializer.coffee | window.FactlinkAppMode ?= {}
window.FactlinkAppMode.coreInClient = (app) ->
app.onClientApp = true
app.startClientRegions()
annotatedSiteEnvoy = window.initClientCommunicator()
new ClientRouter controller: new ClientController annotatedSiteEnvoy
FactlinkApp.clientCloseDiscussionModalInitializer annotatedSi... | window.FactlinkAppMode ?= {}
window.FactlinkAppMode.coreInClient = (app) ->
app.onClientApp = true
app.startClientRegions()
annotatedSiteEnvoy = window.initClientCommunicator()
new ClientRouter controller: new ClientController(annotatedSiteEnvoy)
FactlinkApp.clientCloseDiscussionModalInitializer annotatedS... | Add parens to call with return value | Add parens to call with return value
| CoffeeScript | mit | daukantas/factlink-core,Factlink/factlink-core,Factlink/factlink-core,Factlink/factlink-core,Factlink/factlink-core,daukantas/factlink-core,daukantas/factlink-core,daukantas/factlink-core |
7d512b54a33f0a546a470ed84c3e3ce49aa115cd | util/atom-language-ait/grammars/ait.cson | util/atom-language-ait/grammars/ait.cson | # If this is your first time writing a language grammar, check out:
# - http://manual.macromates.com/en/language_grammars
'scopeName': 'source.ait'
'name': 'Ait'
'fileTypes': [
'ait'
]
'patterns': [
{
'match': '^#.*$'
'name': 'comment.ait'
}
{
'captures':
'1':
'name': 'keyword.load.... | # If this is your first time writing a language grammar, check out:
# - http://manual.macromates.com/en/language_grammars
'scopeName': 'source.ait'
'name': 'Ait'
'fileTypes': [
'ait'
]
'patterns': [
{
'match': '#.*$'
'name': 'comment.ait'
}
{
'captures':
'1':
'name': 'keyword.load.a... | Remove start of line from comment regex in syntax highlighting | Remove start of line from comment regex in syntax highlighting
| CoffeeScript | mit | mollerse/ait-lang |
38ba96a54f387b2a62c1c5de86bc0cf25b061ace | build/tasks/codesign-task.coffee | build/tasks/codesign-task.coffee | path = require 'path'
module.exports = (grunt) ->
{spawn} = require('./task-helpers')(grunt)
grunt.registerTask 'codesign', 'Codesign the app', ->
done = @async()
if process.platform is 'darwin' and process.env.XCODE_KEYCHAIN
unlockKeychain (error) ->
if error?
done(error)
... | path = require 'path'
module.exports = (grunt) ->
{spawn} = require('./task-helpers')(grunt)
grunt.registerTask 'codesign', 'Codesign the app', ->
done = @async()
if process.platform is 'darwin' and process.env.XCODE_KEYCHAIN
unlockKeychain (error) ->
if error?
done(error)
... | Break up commands into two spawns | Break up commands into two spawns
| CoffeeScript | mit | beni55/atom,lovesnow/atom,n-riesco/atom,fredericksilva/atom,Jandersolutions/atom,davideg/atom,kandros/atom,darwin/atom,acontreras89/atom,charleswhchan/atom,ppamorim/atom,liuderchi/atom,rjattrill/atom,dannyflax/atom,burodepeper/atom,rmartin/atom,Galactix/atom,einarmagnus/atom,Shekharrajak/atom,Mokolea/atom,FIT-CSE2410-A... |
f3c5c1a35b032c5c73c337a14595bb32014c3945 | lib/index.coffee | lib/index.coffee | {_, Document} = require 'atom'
SettingsView = null
settingsView = null
configUri = 'atom://config'
createSettingsView = (state) ->
SettingsView ?= require './settings-view'
unless state instanceof Document
state = _.extend({deserializer: deserializer.name, version: deserializer.version}, state)
state = a... | {_, Document} = require 'atom'
SettingsView = null
settingsView = null
configUri = 'atom://config'
createSettingsView = (state) ->
SettingsView ?= require './settings-view'
unless state instanceof Document
state = _.extend({deserializer: deserializer.name, version: deserializer.version}, state)
state = a... | Call openPanel instead of openPane | Call openPanel instead of openPane
| CoffeeScript | mit | atom/settings-view |
5df3f5f25cce9c7d46a1747cf4b2e40a467ed24d | plugins/campfire/index.coffee | plugins/campfire/index.coffee | NotificationPlugin = require "../../notification-plugin"
class Campfire extends NotificationPlugin
@receiveEvent: (config, event) ->
# Build the message
if event.error
message = "#{event.error.exceptionClass}" + (if event.error.message then ": #{event.error.message}" else "") + " (#{event.error.url})"
... | NotificationPlugin = require "../../notification-plugin"
class Campfire extends NotificationPlugin
@receiveEvent: (config, event) ->
# Build the message
if event.error
message = "#{event.trigger.message} in #{event.project.name}! #{event.error.exceptionClass}" + (if event.error.message then ": #{event.... | Update format for campfire plugin | Update format for campfire plugin
| CoffeeScript | mit | jacobmarshall/bugsnag-notification-plugins,6wunderkinder/bugsnag-notification-plugins,cagedata/bugsnag-notification-plugins,indirect/bugsnag-notification-plugins,pushed/bugsnag-notification-plugins,6wunderkinder/bugsnag-notification-plugins,kstream001/bugsnag-notification-plugins,korealert/bugsnag-notification-plugins,... |
8e5198c4cceec2ea9851316459f9b21b95374364 | app/assets/javascripts/admin/views/parameters/edit.js.coffee | app/assets/javascripts/admin/views/parameters/edit.js.coffee | Augury.Views.Parameters.Edit = Backbone.View.extend(
initialize: (attrs) ->
@options = attrs
events:
'click button#save': 'save'
'click button#cancel': 'cancel'
'change :input': 'changed'
'focusout :input': 'validate'
render: ->
@$el.html JST["admin/templates/parameters/edit"](parameter:... | Augury.Views.Parameters.Edit = Backbone.View.extend(
initialize: (attrs) ->
@options = attrs
events:
'click button#save': 'save'
'click button#cancel': 'cancel'
'change :input': 'changed'
'focusout :input': 'validate'
render: ->
@$el.html JST["admin/templates/parameters/edit"](parameter:... | Use select2 for data_type select | Use select2 for data_type select
| CoffeeScript | bsd-3-clause | spree/spree_hub_connector,spree/spree_hub_connector |
7434be78bb922885d35b81736988166599866edb | core/app/backbone/views/users/user_popover_content_view.coffee | core/app/backbone/views/users/user_popover_content_view.coffee | class window.UserPopoverContentView extends StatisticsPopoverContentView
templateHelpers: ->
heading: @model.get('name')
onRender: ->
@statisticsRegion.show new UserStatisticsView model: @model
@ui.buttonRegion.addClass 'statistics-popover-content-button-hidden'
@_showFollowButton()
_showFollo... | class window.UserPopoverContentView extends StatisticsPopoverContentView
templateHelpers: ->
heading: @model.get('name')
onRender: ->
@statisticsRegion.show new UserStatisticsView model: @model
@ui.buttonRegion.addClass 'statistics-popover-content-button-hidden'
@_showFollowButton()
_showFollo... | Use cloned model for UserPopoverContentView to not run into trouble with urls for following/unfollowing | Use cloned model for UserPopoverContentView to not run into trouble with urls for following/unfollowing
| CoffeeScript | mit | daukantas/factlink-core,Factlink/factlink-core,daukantas/factlink-core,Factlink/factlink-core,Factlink/factlink-core,daukantas/factlink-core,Factlink/factlink-core,daukantas/factlink-core |
448a7edd317697ebbd7885ebafa573e28238eb92 | spec/code-context-spec.coffee | spec/code-context-spec.coffee | {WorkspaceView} = require 'atom'
CodeContext = require '../lib/code-context'
describe 'CodeContext', ->
beforeEach ->
atom.workspaceView = new WorkspaceView
textSource = atom.workspace.getActiveEditor()
@codeContext = new CodeContext('test.txt', '/tmp/test.txt', null)
describe 'fileColonLine when line... | CodeContext = require '../lib/code-context'
describe 'CodeContext', ->
beforeEach ->
@codeContext = new CodeContext('test.txt', '/tmp/test.txt', null)
describe 'fileColonLine when lineNumber is not set', ->
it 'returns the full filepath when fullPath is truthy', ->
expect(@codeContext.fileColonLine(... | Add a new spec for testing getCode() | Add a new spec for testing getCode()
| CoffeeScript | mit | rodionovd/atom-script,chenruixuan/atom-script,jchannon/atom-script,jchannon/atom-script,Calyhre/atom-script,efatsi/atom-script,Calyhre/atom-script,Calyhre/atom-script,jchannon/atom-script,Calyhre/atom-script,Calyhre/atom-script,Calyhre/atom-script,anfedorov/atom-script,anfedorov/atom-script,Calyhre/atom-script,efatsi/a... |
58d084b8704780fcf63652ef41f13fcb29981ae0 | lib/minimap-selection-view.coffee | lib/minimap-selection-view.coffee | {View} = require 'atom'
MarkerView = require './marker-view'
module.exports =
class MinimapSelectionView extends View
markers: []
@content: ->
@div class: 'minimap-selection'
initialize: (@minimapView) ->
@subscribe @minimapView.editorView, "selection:changed", @handleSelection
attach: ->
@minimap... | {View} = require 'atom'
MarkerView = require './marker-view'
module.exports =
class MinimapSelectionView extends View
decorations: []
@content: ->
@div class: 'minimap-selection'
initialize: (@minimapView) ->
@subscribe @minimapView.editorView, "selection:changed", @handleSelection
@subscribe @minima... | Implement support for the new minimap decoration API | Implement support for the new minimap decoration API
| CoffeeScript | mit | atom-minimap/minimap-selection |
ee5962f79ea0758b407ac5e60513e7639d633d7b | src/app/units/states/task-inbox/task-inbox.coffee | src/app/units/states/task-inbox/task-inbox.coffee | angular.module('doubtfire.units.states.task-inbox', [
# 'doubtfire.units.states.task-inbox.task-commenter'
# 'doubtfire.units.states.task-inbox.task-submission'
])
#
# Teacher child state for units
#
.config(($stateProvider) ->
$stateProvider.state 'units#tasks', {
parent: 'units#index'
url: '/tasks/:tas... | angular.module('doubtfire.units.states.task-inbox', [
# 'doubtfire.units.states.task-inbox.task-commenter'
])
#
# Teacher child state for units
#
.config(($stateProvider) ->
$stateProvider.state 'units#tasks', {
parent: 'units#index'
url: '/tasks/:taskId'
views:
unitIndex:
templateUrl: "u... | Allow usage of task inbox task ID URL parameter | ENHANCE: Allow usage of task inbox task ID URL parameter
| CoffeeScript | agpl-3.0 | alexcu/doubtfire-web,doubtfire-lms/doubtfire-web,doubtfire-lms/doubtfire-web,doubtfire-lms/doubtfire-web,doubtfire-lms/doubtfire-web,alexcu/doubtfire-web |
a41b04c39436d53f97e542746077396b7fd67563 | src/Browser/Browser.coffee | src/Browser/Browser.coffee | angular.module('browser').
factory('Browser', ->
return class Browser
@prefixs: ['webkit', 'Moz', 'ms', 'o', 'khtml']
@window: window
@element: window.document.documentElement
@body: window.document.getElementsByTagName('body')[0]
@height: ->
@window.innerHeight or
@element... | angular.module('browser').
factory('Browser', ->
return class Browser
@prefixs: ['webkit', 'Moz', 'ms', 'o', 'khtml']
@window: window
@element: window.document.documentElement
@body: window.document.getElementsByTagName('body')[0]
@_height: ->
@window.innerHeight or
@elemen... | Improve width and height detection. | Improve width and height detection.
| CoffeeScript | mit | LupoLibero/Lupo-proto |
bcee839d8515fe6c21f59bb67726e7397669fc1b | Gruntfile.coffee | Gruntfile.coffee | module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON('package.json')
coffee:
glob_to_multiple:
expand: true
cwd: 'src'
src: ['**/*.coffee']
dest: 'lib'
ext: '.js'
coffeelint:
options:
no_empty_param_list:
level: 'erro... | module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON('package.json')
coffee:
glob_to_multiple:
expand: true
cwd: 'src'
src: ['**/*.coffee']
dest: 'lib'
ext: '.js'
coffeelint:
options:
no_empty_param_list:
level: 'erro... | Add forceexit argument to test command | Add forceexit argument to test command
| CoffeeScript | mit | pombredanne/text-buffer,pombredanne/text-buffer,jacekkopecky/text-buffer,atom/text-buffer,jacekkopecky/text-buffer,mizchi-sandbox/standalone-atom-editor,whodatninja/text-buffer,mizchi-sandbox/standalone-atom-editor,atom/text-buffer |
7a2e57c0900a951e948682a191514fc7311dba59 | 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: ->
@a href: '#', class: 'grammar-name inline-block'
initialize: (@statusBar) ->
@subscribe @statusBar, 'active-buffer-changed', @updateGrammarText
@subscribe atom.... | {View} = require 'atom'
# View to show the grammar name in the status bar.
module.exports =
class GrammarStatusView extends View
@content: ->
@a href: '#', class: 'grammar-name inline-block'
initialize: (@statusBar) ->
@subscribe @statusBar, 'active-buffer-changed', =>
@updateGrammarText()
@sub... | Use skinny arrows in instance methods for consistency | Use skinny arrows in instance methods for consistency
| CoffeeScript | mit | atom/grammar-selector |
6d0dab87c2b86b8a6448a1b8e96d0ad2e43dee62 | test/jira-linkifier-test.coffee | test/jira-linkifier-test.coffee | chai = require 'chai'
sinon = require 'sinon'
chai.use require 'sinon-chai'
expect = chai.expect
describe 'jira-linkifier', ->
beforeEach ->
@robot =
respond: sinon.spy()
hear: sinon.spy()
require('../src/jira-linkifier')(@robot)
it 'registers a respond listener', ->
expect(@robot.respon... | chai = require 'chai'
sinon = require 'sinon'
chai.use require 'sinon-chai'
expect = chai.expect
describe 'jira-linkifier', ->
beforeEach ->
@robot =
respond: sinon.spy()
hear: sinon.spy()
@prefixes = process.env.HUBOT_JIRA_LINKIFIER_PROJECT_PREFIXES = "XXX,YYY,ZZZ"
@jiraUrl = process... | Add basic unit tests for the hear & respond handlers | Add basic unit tests for the hear & respond handlers
Basic tests to make sure that the listerners for the various
commands are registered.
Trying to see about testing that the config env vars are loaded
as expected, but that's not quite right? Left some commented
lines in to remind myself to look into it.
| CoffeeScript | mit | xkickflip/hubot-jira-linkifier,xkickflip/hubot-jira-linkifier |
bd706450c7586f7cff54f831f02671d03f363892 | src/index.coffee | src/index.coffee | express = require 'express'
assets = require 'connect-assets'
stylus = require 'stylus'
session = require 'express-session'
cookieParser = require 'cookie-parser'
bodyParser = require 'body-parser'
db = require './models'
#### Basic application initialization
# Create app instance
app = express()
# Define port to lis... | express = require 'express'
assets = require 'connect-assets'
stylus = require 'stylus'
session = require 'express-session'
cookieParser = require 'cookie-parser'
bodyParser = require 'body-parser'
db = require './models'
#### Basic application initialization
# Create app instance
app = express()
# Define port to lis... | Fix deprecation warning with bodyParser middleware | Fix deprecation warning with bodyParser middleware
| CoffeeScript | mit | osminogin/express-coffee-seed,osminogin/express-coffee-seed |
48a2ebbab0e2db5ef95d0cea3458ba3a50e1f494 | app/assets/javascripts/reports.js.coffee | app/assets/javascripts/reports.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/
$ ->
$(".report_reason input").removeAttr("required")
do update_reason = ->
if $(".report_greens inpu... | # 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/
$ ->
$(".report_reason input, .report_greens input").removeAttr("required")
do toggle_fields_for_greens ... | Change UI to only require weather if closed. | Change UI to only require weather if closed.
Which greens are in play doesn't apply if the course isn't open, so stop
asking for it.
| CoffeeScript | mit | alisdair/conditions,alisdair/conditions |
ef6bfcfd8d335fc5eaf4796ffadc05c18dfd686d | lib/spell-check-handler.coffee | lib/spell-check-handler.coffee | 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 $native.isMisspelled(word)
startColumn = matches.index ... | 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 $native.isMisspelled(word)
startColumn = matches.index... | Include apostrophe in word regex | Include apostrophe in word regex
| CoffeeScript | mit | atom/spell-check |
0dce48e2435d5700ad8936f92f9fa4d4099ff55e | tests/src/document/utils.coffee | tests/src/document/utils.coffee | 'use strict'
{Document, utils} = Neft
VIEWS_CACHE_FILE = 'tmp/views.json'
loaded = false
exports.uid = do (i = 0) -> -> "index_#{i++}.html"
exports.createView = do ->
getViewPath = (viewUid) ->
"tmp/views/#{viewUid}.json"
if utils.isNode
(html, viewUid = exports.uid()) ->
loade... | 'use strict'
{Document, utils} = Neft
VIEWS_CACHE_FILE = 'tmp/views.json'
loaded = false
exports.uid = do (i = 0) -> -> "index_#{i++}.html"
exports.createView = do ->
getViewPath = (viewUid) ->
"tmp/views/#{viewUid}.json"
if utils.isNode
(html, viewUid = exports.uid()) ->
loade... | Document toJSON unit tests added | Document toJSON unit tests added
| CoffeeScript | apache-2.0 | Neft-io/neft,Neft-io/neft,Neft-io/neft,Neft-io/neft,Neft-io/neft,Neft-io/neft |
06961a060232d63dd693ec4f37455df1b8ca8b96 | tests/denorm-tests.coffee | tests/denorm-tests.coffee | ###
Copyright 2015, Quixey Inc.
All rights reserved.
Licensed under the Modified BSD License found in the
LICENSE file in the root directory of this source tree.
###
Tinytest.add "denormalization A -> B", (test) ->
bar = new $$.Bar
foo = new $$.Foo
foo.insert()
console.log 1
try
... | ###
Copyright 2015, Quixey Inc.
All rights reserved.
Licensed under the Modified BSD License found in the
LICENSE file in the root directory of this source tree.
###
cleanUp = ->
if Meteor.isServer
$$.Foo.fetch().forEach (foo) -> foo.remove()
$$.Bar.fetch().forEach (bar) -> bar.re... | Add some more basic tests on denorm and field bindings | Add some more basic tests on denorm and field bindings
| CoffeeScript | bsd-3-clause | quixey/jframework |
d6bceb2167ec1cb0fba8bae87a2557c446683dae | lib/hacks/filter.coffee | lib/hacks/filter.coffee | Declaration = require('../declaration')
class Filter extends Declaration
@names = ['filter']
# Check is it Internet Explorer filter
check: (decl) ->
v = decl.value
v.toLowerCase().indexOf('alpha(') == -1 and v.indexOf('DXImageTransform.Microsoft') == -1
module.exports = Filter
| Declaration = require('../declaration')
class Filter extends Declaration
@names = ['filter']
# Check is it Internet Explorer filter
check: (decl) ->
v = decl.value
v.toLowerCase().indexOf('alpha(') == -1 and
v.indexOf('DXImageTransform.Microsoft') == -1
module.exports = Filter
| Fix Holy 80 columns line | Fix Holy 80 columns line
| CoffeeScript | mit | ai/autoprefixer-cli,cemoulto/autoprefixer,NateBaldwinDesign/autoprefixer,iorikiir/autoprefixer,zigi74/autoprefixer,cgvarela/autoprefixer,cnbin/autoprefixer,edisplay/autoprefixer,SecureCloud-biz/autoprefixer,rzhw/autoprefixer,ya7lelkom/autoprefixer,crobays/autoprefixer,dantman/autoprefixer,iamvdo/autoprefixer-core,danie... |
0ae993330c7d29ff15edf81b429737fd14dfe58e | Gruntfile.coffee | Gruntfile.coffee | module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON('package.json')
coffee:
glob_to_multiple:
expand: true
cwd: 'src'
src: ['*.coffee']
dest: 'lib'
ext: '.js'
coffeelint:
options:
no_empty_param_list:
level: 'error'
... | path = require('path')
module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON('package.json')
coffee:
glob_to_multiple:
expand: true
cwd: 'src'
src: ['*.coffee']
dest: 'lib'
ext: '.js'
coffeelint:
options:
no_empty_param_list:
... | Switch appveyor from apm to npm | Switch appveyor from apm to npm
| CoffeeScript | mit | atom/fs-plus |
20b938aeaab4b918bf8197eb2ac903c9683b2003 | app/assets/javascripts/services/session_service.coffee | app/assets/javascripts/services/session_service.coffee | angular.module('kassa').service('SessionService',[
'$http'
'$q'
'$window'
'UserService'
($http, $q, $window, User)->
currentUser = null
equal = angular.equals
setUser = (user)-> currentUser = user
checkStatus = -> User.find('me').then(setUser)
signIn = (email, password, rememberMe=true... | angular.module('kassa').service('SessionService',[
'$http'
'$q'
'$window'
'UserService'
($http, $q, $window, User)->
authenticatedUser = null
equal = angular.equals
setUser = (user)-> authenticatedUser = user
checkStatus = -> User.find('me').then(setUser)
signIn = (email, password, rem... | Refactor session service, add isAdmin() to check for admin status of current authenticated user | Refactor session service, add isAdmin() to check for admin status of current authenticated user
| CoffeeScript | mit | flipflops/kassa,flipflops/kassa |
0657d6adeef72133241730c1809254eec69661ab | test/node_gyp.coffee | test/node_gyp.coffee | should = require('chai').should()
describe 'grunt-node-gyp', ->
describe 'configure', ->
it 'should configure a release build by default', ->
;
it 'should configure a debug build if the debug option is passed', ->
;
it 'should fail if there is no binding.gyp', ->
;
describe 'build', ->
it 'should... | should = require('chai').should()
grunt = require 'grunt'
gruntOptions =
gruntfile: __dirname + '/support/Gruntfile.coffee'
execGruntTask = (task, callback) ->
grunt.tasks 'gyp:' + task, gruntOptions, ->
callback()
describe 'grunt-node-gyp', ->
describe 'configure', ->
it 'should configure a release build by ... | Add helper function execGruntTask(task, callback) | Add helper function execGruntTask(task, callback)
| CoffeeScript | bsd-2-clause | SonicHedgehog/grunt-node-gyp |
8ec6ed11432690c9b316f6d6d0fdd3c030f33e79 | scripts/views/workspace/menu/add.coffee | scripts/views/workspace/menu/add.coffee | define [
'marionette'
'cs!collections/content'
'hbs!templates/workspace/menu/add'
'hbs!templates/workspace/menu/add-item'
'bootstrapDropdown'
], (Marionette, allContent, addTemplate, addItemTemplate) ->
class AddItemView extends Marionette.ItemView
tagName: 'li'
template: addItemTemplate
even... | define [
'marionette'
'cs!collections/content'
'hbs!templates/workspace/menu/add'
'hbs!templates/workspace/menu/add-item'
'bootstrapDropdown'
], (Marionette, allContent, addTemplate, addItemTemplate) ->
class AddItemView extends Marionette.ItemView
tagName: 'li'
template: addItemTemplate
even... | Add a default title for new books or content | Add a default title for new books or content
| CoffeeScript | agpl-3.0 | oerpub/bookish,oerpub/bookish,oerpub/github-bookeditor,oerpub/github-bookeditor,oerpub/github-bookeditor |
e1e9b58e90e1fdb79339d1f5058753f3cf2697b3 | src/app/admin/states/users/users.coffee | src/app/admin/states/users/users.coffee | angular.module('doubtfire.admin.states.users', [])
#
# Administration panel for all doubtfire users
#
.config((headerServiceProvider) ->
usersAdminViewStateData =
url: "/admin/users"
views:
main:
controller: "AdministerUsersCtrl"
templateUrl: "users/states/users/users.tpl.html"
data... | angular.module('doubtfire.admin.states.users', [])
#
# Administration panel for all doubtfire users
#
.config((headerServiceProvider) ->
usersAdminViewStateData =
url: "/admin/users"
views:
main:
controller: "AdministerUsersCtrl"
templateUrl: "admin/states/users/users.tpl.html"
data... | Fix incorrect template for user admin | FIX: Fix incorrect template for user admin
| CoffeeScript | agpl-3.0 | doubtfire-lms/doubtfire-web,alexcu/doubtfire-web,alexcu/doubtfire-web,doubtfire-lms/doubtfire-web,doubtfire-lms/doubtfire-web,doubtfire-lms/doubtfire-web |
690d4fd8ef9886fdace3c8cd511bf134bcde22d2 | keymaps/snippets-2.cson | keymaps/snippets-2.cson | # it's critical that these bindings be loaded after those snippets-1 so they
# are later in the cascade, hence breaking the keymap into 2 files
'atom-text-editor:not([mini])':
'tab': 'snippets:next-tab-stop'
'shift-tab': 'snippets:previous-tab-stop'
'alt-shift-s': 'snippets:available'
'.available-snippets atom-... | # it's critical that these bindings be loaded after those snippets-1 so they
# are later in the cascade, hence breaking the keymap into 2 files
'atom-text-editor:not([mini])':
'tab': 'snippets:next-tab-stop'
'shift-tab': 'snippets:previous-tab-stop'
| Remove alt-shift-s bindings that conflict with typing AltGraph chars | Remove alt-shift-s bindings that conflict with typing AltGraph chars
Signed-off-by: Max Brunsfeld <78036c9b69b887700d5846f26a788d53b201ffbb@github.com>
| CoffeeScript | mit | atom/snippets |
f86a6d1547516b4ae3938437c041f7595b5188e4 | src/browser/Application.coffee | src/browser/Application.coffee | AppMenu = require "./AppMenu"
AppWindow = require "./AppWindow"
fs = require "fs"
ipc = require "ipc"
EventEmitter = require "eventemitter3"
{Disposable} = require "event-kit"
assign = (dest, objects...) ->
for o in objects
dest[k] = v for k, v of o
... | AppMenu = require "./AppMenu"
AppWindow = require "./AppWindow"
fs = require "fs"
ipc = require "ipc"
EventEmitter = require "eventemitter3"
{Disposable} = require "event-kit"
assign = (dest, objects...) ->
for o in objects
dest[k] = v for k, v of o
... | Move `handleEvents` method definition under the `constructor` | :lipstick: Move `handleEvents` method definition under the `constructor`
Method grouping
| CoffeeScript | mit | Ragg-/electron-boilerplate,Ragg-/electron-boilerplate |
520361cb788a7360668db44152ab5fb2f4a0ca20 | app/utils/favicon-manager.coffee | app/utils/favicon-manager.coffee | `import Ember from 'ember'`
manager = (headTag) ->
@headTag = headTag if headTag
return this
manager.prototype.getHeadTag = ->
@headTag || document.getElementsByTagName('head')[0]
manager.prototype.setFavicon = (href) ->
head = @getHeadTag()
if oldLink = @getLinkTag()
head.removeChild(oldLink)
lin... | `import Ember from 'ember'`
manager = (headTag) ->
@headTag = headTag if headTag
return this
manager.prototype.getHeadTag = ->
@headTag || document.getElementsByTagName('head')[0]
manager.prototype.setFavicon = (href) ->
head = @getHeadTag()
if oldLink = @getLinkTag()
head.removeChild(oldLink)
lin... | Set href on favicon <link> tag second time in a timeout | Set href on favicon <link> tag second time in a timeout
This somehow fixes chrome inconsistencies when changing favicon
| CoffeeScript | mit | fauxton/travis-web,jlrigau/travis-web,2947721120/travis-web,2947721120/travis-web,jlrigau/travis-web,Tiger66639/travis-web,mjlambert/travis-web,fotinakis/travis-web,travis-ci/travis-web,fauxton/travis-web,2947721120/travis-web,fotinakis/travis-web,Tiger66639/travis-web,mjlambert/travis-web,2947721120/travis-web,travis-... |
7b92f9596ea2248e41e8f90a1c1bfd588c5d7e2b | vendor/assets/javascripts/gmaps4rails/yandex/objects/map.coffee | vendor/assets/javascripts/gmaps4rails/yandex/objects/map.coffee | class @Gmaps4Rails.Yandex.Map extends Gmaps4Rails.Common
@include Gmaps4Rails.Interfaces.Map
@include Gmaps4Rails.Map
@include Gmaps4Rails.Yandex.Shared
@include Gmaps4Rails.Configuration
CONF:
disableDefaultUI: false
disableDoubleClickZoom: false
type: "yandex#map" ... | class @Gmaps4Rails.Yandex.Map extends Gmaps4Rails.Common
@include Gmaps4Rails.Interfaces.Map
@include Gmaps4Rails.Map
@include Gmaps4Rails.Yandex.Shared
@include Gmaps4Rails.Configuration
CONF:
disableDefaultUI: false
disableDoubleClickZoom: false
type: "yandex#map" ... | Revert "Behaviors support for Yandex.Maps" | Revert "Behaviors support for Yandex.Maps"
| CoffeeScript | mit | oelmekki/Google-Maps-for-Rails,michael-gabenna/Google-Maps-for-Rails,oelmekki/Google-Maps-for-Rails,apneadiving/Google-Maps-for-Rails,michael-gabenna/Google-Maps-for-Rails,ipmobiletech/Google-Maps-for-Rails,ekdin/Google-Maps-for-Rails,ekdin/Google-Maps-for-Rails,ipmobiletech/Google-Maps-for-Rails,apneadiving/Google-Map... |
baa7c75f54301379562628807063295b1d0781b1 | BackofficeBundle/Resources/public/coffee/page/viewportChannel.coffee | BackofficeBundle/Resources/public/coffee/page/viewportChannel.coffee | viewportChannel = Backbone.Wreqr.radio.channel('viewport')
viewportChannel.commands.setHandler 'init', (blockpanel) ->
$(this).data 'blockpanel', blockpanel if typeof blockpanel != 'undefined'
ghostPanel = $('#ghost-blockpanel', $(this).data('blockpanel'))
ghostPanel.show()
$(this).data 'fixedtop', ghostPanel[... | viewportChannel = Backbone.Wreqr.radio.channel('viewport')
viewportChannel.commands.setHandler 'init', (blockpanel) ->
$(this).data 'blockpanel', blockpanel if typeof blockpanel != 'undefined'
ghostPanel = $('#ghost-blockpanel', $(this).data('blockpanel'))
if (ghostPanel[0])
ghostPanel.show()
$(this).dat... | Fix bug when switching node language to a published version (getBoundingClientRect bug) | Fix bug when switching node language to a published version (getBoundingClientRect bug)
| CoffeeScript | apache-2.0 | open-orchestra/open-orchestra-cms-bundle,open-orchestra/open-orchestra-cms-bundle,open-orchestra/open-orchestra-cms-bundle |
bfdad19911755e6909616511892e10405c57d76d | src/app/repository-status-handler.coffee | src/app/repository-status-handler.coffee | Git = require 'git-utils'
fsUtils = require 'fs-utils'
path = require 'path'
module.exports =
loadStatuses: (path) ->
repo = Git.open(path)
if repo?
workingDirectoryPath = repo.getWorkingDirectory()
statuses = {}
for path, status of repo.getStatus()
statuses[path.join(workingDirecto... | Git = require 'git-utils'
fsUtils = require 'fs-utils'
path = require 'path'
module.exports =
loadStatuses: (repoPath) ->
repo = Git.open(repoPath)
if repo?
workingDirectoryPath = repo.getWorkingDirectory()
statuses = {}
for path, status of repo.getStatus()
statuses[path.join(workin... | Use repoPath as parameter name to loadStatuses() | Use repoPath as parameter name to loadStatuses()
| CoffeeScript | mit | xream/atom,palita01/atom,t9md/atom,elkingtonmcb/atom,g2p/atom,dannyflax/atom,Jdesk/atom,Rychard/atom,PKRoma/atom,Dennis1978/atom,helber/atom,constanzaurzua/atom,bcoe/atom,githubteacher/atom,gzzhanghao/atom,hakatashi/atom,n-riesco/atom,pengshp/atom,jlord/atom,ivoadf/atom,einarmagnus/atom,lovesnow/atom,qiujuer/atom,jerem... |
286aacc0b9c42dc4746b435761d0e0065a138db8 | gulp/development/webserver.coffee | gulp/development/webserver.coffee | {spawn} = require 'child_process'
module.exports = (gulp) ->
gulp.task 'build:webserver', ->
node.kill() if node
node = spawn "coffee", ["src/server", '--port', '8000'],
stdio: "inherit"
node.on "close", (code) ->
switch code
when 8
gulp.log "Error detected, waiting for chan... | {spawn} = require 'child_process'
module.exports = (gulp) ->
gulp.task 'build:webserver', ->
node.kill() if node
node = spawn "coffee", 'src/server --port 8000 --env development'.split(' '),
stdio: "inherit"
node.on "close", (code) ->
switch code
when 8
gulp.log "Error detec... | Tidy (looks easier to unterstand) | Tidy (looks easier to unterstand)
| CoffeeScript | mit | sm0k1nggnu/entertain.io |
c9881970e9eacea8b222dbddbbe6e58dd8e27867 | js/plugin.coffee | js/plugin.coffee | #
# CoffeeScript jQuery Plugin Boilerplate
# By: Matthieu Aussaguel, http://www.mynameismatthieu.com, @mattaussaguel
# Version: 1.0 alpha 1.0
# Updated: June 27th, 2011
#
jQuery ->
$.pluginName = (element, options) ->
# default plugin settings
@defaults = {
message : 'hellow word' #... | #
# CoffeeScript jQuery Plugin Boilerplate
# By: Matthieu Aussaguel, http://www.mynameismatthieu.com, @mattaussaguel
# Version: 1.0 Stable
# Updated: June 27th, 2011
# More info: http://minijs.com/
#
jQuery ->
$.pluginName = (element, options) ->
# default plugin settings
@defaults = {
... | Update the 1.0 stable mark | Update the 1.0 stable mark
| CoffeeScript | mit | webx32/miniBoilerplate,janusnic/miniBoilerplate,webx32/miniBoilerplate,tstachl/cylinder,janusnic/miniBoilerplate,miniJs/miniBoilerplate |
92d126c02f1f626fded6ac59235a8c7fe0972dcf | lib/about.coffee | lib/about.coffee | {CompositeDisposable} = require 'atom'
AboutView = null
StatusBarView = null
aboutURI = 'atom://about'
createAboutView = (state) ->
AboutView ?= require './about-view'
new AboutView(state)
atom.deserializers.add
name: 'AboutView'
deserialize: (state) -> createAboutView(state)
module.exports = About =
act... | {CompositeDisposable} = require 'atom'
AboutView = null
StatusBarView = null
aboutURI = 'atom://about'
createAboutView = (state) ->
AboutView ?= require './about-view'
new AboutView(state)
atom.deserializers.add
name: 'AboutView'
deserialize: (state) -> createAboutView(state)
module.exports = About =
act... | Remove the status bar view if it already exists. | Remove the status bar view if it already exists.
| CoffeeScript | mit | atom/about,mnquintana/atom-about |
0683e976372df4f68b7132c2bab16e41f8b4e367 | src/state.coffee | src/state.coffee | class Game.State extends Game.TwoWay
constructor: () ->
@objects = {}
@eventCounters = {}
@eventHandlers = {}
super
onEvent: (e) ->
# Add timestamped instance to the event counters object
if e.type not of @eventCounters
@eventCounters[e.type] = []
@eventCounters[e.type].push new Da... | class Game.State extends Game.TwoWay
constructor: () ->
@objects = {}
@eventCounters = {}
@eventHandlers = {}
super
onEvent: (e) ->
# Add timestamped instance to the event counters object
if e.type not of @eventCounters
@eventCounters[e.type] = []
@eventCounters[e.type].push new Da... | Fix naming problem with ErrorType constants | Fix naming problem with ErrorType constants
| CoffeeScript | mit | eugene-bulkin/game-library,eugene-bulkin/game-library |
ace99621d726d2d2f2301c8f4d74f89aad8cce72 | src/galao/number.coffee | src/galao/number.coffee | # Number to time conversions
Number::second ?= ->
@seconds()
Number::seconds ?= ->
this * 1000
Number::minute ?= ->
@minutes()
Number::minutes ?= ->
@seconds() * 60
Number::hour ?= ->
@hours()
Number::hours ?= ->
@minutes() * 60
Number::day ?= ->
@days()
Number::days ?= ->
@hours() * 24
Number::... | # Number to time conversions
Number::second ?= ->
@seconds()
Number::seconds ?= ->
this * 1000
Number::minute ?= ->
@minutes()
Number::minutes ?= ->
@seconds() * 60
Number::hour ?= ->
@hours()
Number::hours ?= ->
@minutes() * 60
Number::day ?= ->
@days()
Number::days ?= ->
@hours() * 24
Number::... | Add whitespaces around mathematical operators | Add whitespaces around mathematical operators
| CoffeeScript | mit | lawitschka/galao,lawitschka/galao,spieker/galao,spieker/galao |
5f6ce620548524ddffa2d3de40a46356a50659bf | app/controllers/session-controller.coffee | app/controllers/session-controller.coffee | {DeviceAuthenticator} = require 'meshblu-authenticator-core'
MeshbluDB = require 'meshblu-db'
debug = require('debug')('meshblu-email-password-authenticator:sessions-controller')
url = require 'url'
class SessionController
constructor: (meshbluJSON, @meshblu) ->
@authenticatorUuid = meshbluJSON.uuid
@authent... | {DeviceAuthenticator} = require 'meshblu-authenticator-core'
MeshbluDB = require 'meshblu-db'
debug = require('debug')('meshblu-email-password-authenticator:sessions-controller')
url = require 'url'
class SessionController
constructor: (meshbluJSON, @meshblu) ->
@authenticatorUuid = meshbluJSON.uuid
@authent... | Return a 201 on login | Return a 201 on login
| CoffeeScript | mit | octoblu/meshblu-email-password-authenticator,octoblu/meshblu-authenticator-email-password |
21adeca30df27a723a7f5770a0a5a84c54d3018f | tutor/src/components/student-dashboard/event-info-icon.cjsx | tutor/src/components/student-dashboard/event-info-icon.cjsx | React = require 'react'
BS = require 'react-bootstrap'
S = require '../../helpers/string'
{TimeStore} = require '../../flux/time'
moment = require 'moment'
module.exports = React.createClass
displayName: 'EventInfoIcon'
propTypes:
event: React.PropTypes.object.isRequired
render: ->
due = mom... | React = require 'react'
BS = require 'react-bootstrap'
S = require '../../helpers/string'
{TimeStore} = require '../../flux/time'
moment = require 'moment'
TH = require '../../helpers/task'
module.exports = React.createClass
displayName: 'EventInfoIcon'
propTypes:
event: React.PropTypes.object.isRe... | Use task helper for determining lateness | Use task helper for determining lateness
The earlier check was marking exercises as non-late as soon as any work
was performed
| CoffeeScript | agpl-3.0 | openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js |
00f5d84102ba624cf9766aaaa6ca106645eada3c | app/assets/javascripts/rglossa/views/cwb/result/table_view.coffee | app/assets/javascripts/rglossa/views/cwb/result/table_view.coffee | App.CwbResultTableView = Em.View.extend
didInsertElement: ->
@$('[data-ot]').each (index, token) ->
new Opentip(token, $(token).data('ot'), {style: 'dark'})
| App.CwbResultTableView = Em.View.extend
didInsertElement: ->
@$('[data-ot]').each (index, token) ->
new Opentip token, $(token).data('ot'),
style: 'dark'
fixed: true
| Fix the position of the token info tooltip | Fix the position of the token info tooltip
| CoffeeScript | mit | textlab/glossa,textlab/glossa,textlab/rglossa,textlab/glossa,textlab/rglossa,textlab/rglossa,textlab/rglossa,textlab/rglossa,textlab/glossa,textlab/glossa |
27c74ae96a7a8c90ab26af96765e7f8d5946b044 | core/app/backbone/factlink/caching_controller.coffee | core/app/backbone/factlink/caching_controller.coffee | class Backbone.Factlink.CachingController extends Backbone.Factlink.BaseController
openController: ->
super
@cached_views = new Backbone.Factlink.DetachedViewCache
closeController: ->
super
@cached_views.cleanup()
onAction: -> @unbindFrom @permalink_event if @permalink_event?
makePermalinkEve... | class Backbone.Factlink.CachingController extends Backbone.Factlink.BaseController
openController: ->
@cached_views = new Backbone.Factlink.DetachedViewCache
super
closeController: ->
@cached_views.cleanup()
super
onAction: -> @unbindFrom @permalink_event if @permalink_event?
makePermalinkEve... | Make sure cache views are set before onShow | Make sure cache views are set before onShow
| CoffeeScript | mit | Factlink/factlink-core,daukantas/factlink-core,Factlink/factlink-core,daukantas/factlink-core,daukantas/factlink-core,Factlink/factlink-core,Factlink/factlink-core,daukantas/factlink-core |
a9330e4ac45a55344473f6cddaf6723ad990ad91 | .config/atom/config.cson | .config/atom/config.cson | "*":
core:
audioBeep: false
closeEmptyWindows: false
disabledPackages: [
"language-clojure"
"language-go"
"language-java"
"language-perl"
"language-objective-c"
"language-property-list"
"metrics"
"open-on-github"
"package-generator"
"symbols-view... | "*":
core:
audioBeep: false
closeEmptyWindows: false
disabledPackages: [
"language-clojure"
"language-go"
"language-java"
"language-perl"
"language-objective-c"
"language-property-list"
"metrics"
"open-on-github"
"package-generator"
"symbols-view... | Disable built-in atom spell-check package | Disable built-in atom spell-check package
For now. Waiting for it to support French.
| CoffeeScript | mit | glepretre/dotfiles |
657614144bc2898d39a45ec49c15b7765244871e | scripts/hash-web-resources.coffee | scripts/hash-web-resources.coffee | ssdeep = require 'ssdeep'
htmlToText = require 'html-to-text'
fs = require 'fs'
extractText = (body) ->
return htmlToText.fromString body
module.exports = {
computeHash: (body, contentType) ->
if contentType and /text\/html/.test(contentType)
body = extractText(body)
return ssdeep.hash(body)
}
| ssdeep = require 'ssdeep'
htmlToText = require 'html-to-text'
fs = require 'fs'
extractText = (body) ->
return htmlToText.fromString body
removeSpaces = (body) ->
return body.replace(/\s+/g, ' ')
module.exports = {
computeHash: (body, contentType) ->
if contentType and /text\/html/.test(contentType)
... | Remove spaces before computing hash | Remove spaces before computing hash
| CoffeeScript | mit | pchaigno/hewbot |
1f011cb327b20b119eb84ba952a3c0e55aaf0b9b | app/components/file-list.coffee | app/components/file-list.coffee | `import Ember from 'ember'`
`import PaginateMixin from 'irene/mixins/paginate'`
FileListComponent = Ember.Component.extend PaginateMixin,
project: null
targetObject: "file"
sortProperties: ["id:desc"]
classNames: ["columns", "margin-top"]
extraQueryStrings: Ember.computed "project.id", ->
query =
... | `import Ember from 'ember'`
`import PaginateMixin from 'irene/mixins/paginate'`
FileListComponent = Ember.Component.extend PaginateMixin,
project: null
targetObject: "file"
sortProperties: ["createdOn:desc"]
classNames: ["columns", "margin-top"]
extraQueryStrings: Ember.computed "project.id", ->
quer... | Move the sorting of files to createdOn | Move the sorting of files to createdOn
| CoffeeScript | agpl-3.0 | appknox/irene,appknox/irene,appknox/irene |
faa395dde3944512cc2a6ceddf3eb92f86907f4c | client/components/RegisteredUsers.coffee | client/components/RegisteredUsers.coffee | React = require('react')
import { Link } from 'react-router-dom'
import { Table } from 'react-bootstrap'
export default RegisteredUsers = (props) ->
<Table striped condensed hover>
<tbody>
{props.users.map?((user) ->
<tr key={user.username}>
<td>
... | React = require('react')
import { Link } from 'react-router-dom'
import { Table } from 'react-bootstrap'
export default RegisteredUsers = (props) ->
<Table striped condensed hover>
<tbody>
{props.users.map?((user) ->
<tr key={user.username}>
<td>
... | Add link to non-admin profile to registeredUsers page | Add link to non-admin profile to registeredUsers page
| CoffeeScript | agpl-3.0 | petr-kalinin/algoprog,petr-kalinin/algoprog,petr-kalinin/algoprog,petr-kalinin/algoprog |
f8868ffcf2b60ac3bc69679e963dc2b4b6aa24be | src/dom-element-pool.coffee | src/dom-element-pool.coffee | module.exports =
class DOMElementPool
constructor: ->
@freeElementsByTagName = {}
@freedElements = new Set
clear: ->
@freedElements.clear()
for tagName, freeElements of @freeElementsByTagName
freeElements.length = 0
build: (tagName, className, textContent) ->
element = @freeElementsByT... | module.exports =
class DOMElementPool
constructor: ->
@freeElementsByTagName = {}
@freedElements = new Set
clear: ->
@freedElements.clear()
for tagName, freeElements of @freeElementsByTagName
freeElements.length = 0
build: (tagName, className, textContent = "") ->
element = @freeElemen... | Clear dataset elements for pooled objects | Clear dataset elements for pooled objects
| CoffeeScript | mit | gabrielPeart/atom,chfritz/atom,Rodjana/atom,ralphtheninja/atom,Rodjana/atom,jordanbtucker/atom,cyzn/atom,AlisaKiatkongkumthon/atom,originye/atom,yangchenghu/atom,Austen-G/BlockBuilder,jeremyramin/atom,niklabh/atom,RuiDGoncalves/atom,pkdevbox/atom,seedtigo/atom,AlisaKiatkongkumthon/atom,pengshp/atom,champagnez/atom,CraZ... |
1bc389679f191b53037121edba867eeecbeacba5 | examples/collection.coffee | examples/collection.coffee | Monkey.registerView 'post', '''
div[id="monkey"]
h1 title
p body
h3 "Comments (" commentCount ")"
form[submit=postComment]
p
textarea[change=commentEdited]
p
input[type="submit" value="Post"]
ul
- collection comments
- view comment
'''
Monkey.registerView... | Monkey.registerView 'post', '''
div[id="monkey"]
h1 title
p body
h3 "Comments (" commentCount ")"
form[submit=postComment]
p
textarea[change=commentEdited]
p
input[type="submit" value="Post"]
ul
- collection comments
- view comment
'''
Monkey.registerView... | Use multi property set in example | Use multi property set in example | CoffeeScript | mit | elabs/serenade.js |
9427a24df474c2335845b16aa7051a5bc64b8da0 | lib/dev-live-reload.coffee | lib/dev-live-reload.coffee | UIWatcher = require './ui-watcher'
module.exports =
activate: (state) ->
new UIWatcher
themeManager: atom.themes
| UIWatcher = require './ui-watcher'
module.exports =
activate: (state) ->
new UIWatcher
themeManager: atom.themes
rootView.command 'dev-live-reload:reload-all', ->
uiWatcher.reloadAll()
| Add command for reloading all | Add command for reloading all | CoffeeScript | mit | atom/dev-live-reload |
f999485c24c0db135e53bd8fdaac6e893da65d2d | lib/editor-registry.coffee | lib/editor-registry.coffee | {Emitter, CompositeDisposable} = require('atom')
EditorLinter = require('./editor-linter')
class EditorRegistry
constructor: ->
@emitter = new Emitter
@subscriptions = new CompositeDisposable
@editorLinters = new Map()
create: (textEditor) ->
@editorLinters.set(textEditor, editorLinter = new Edito... | {Emitter, CompositeDisposable} = require('atom')
EditorLinter = require('./editor-linter')
class EditorRegistry
constructor: ->
@emitter = new Emitter
@subscriptions = new CompositeDisposable
@editorLinters = new Map()
create: (textEditor) ->
@editorLinters.set(textEditor, editorLinter = new Edito... | Add observe event on EditorRegistry | :new: Add observe event on EditorRegistry
| CoffeeScript | mit | levity/linter,DanPurdy/linter,UltCombo/linter,shawninder/linter,AtomLinter/Linter,blakeembrey/linter,Arcanemagus/linter,atom-community/linter,AsaAyers/linter,e-jigsaw/Linter,steelbrain/linter,JohnMurga/linter |
4037d2f90fb3245b395545a91c3b2a81d83febc4 | lib/error-view.coffee | lib/error-view.coffee | {View} = require 'atom'
{GitNotFoundError} = require './git-bridge'
class GitNotFoundErrorView extends View
@content: (err) ->
@div class: 'overlay from-top padded merge-conflict-error merge-conflicts-message', =>
@div class: 'panel', =>
@div class: "panel-heading text-error", =>
@code '... | {View} = require 'atom'
{GitNotFoundError} = require './git-bridge'
class GitNotFoundErrorView extends View
@content: (err) ->
@div class: 'overlay from-top padded merge-conflict-error merge-conflicts-message', =>
@div class: 'panel', =>
@div class: "panel-heading", =>
@code 'git'
... | Remove text-error from title of error view | Remove text-error from title of error view | CoffeeScript | mit | antcodd/merge-conflicts,smashwilson/merge-conflicts,smashwilson/merge-conflicts |
b3faea3969a3bb8c03d8f9d4ea3b0581ce6433d3 | app.coffee | app.coffee | # Parse YAML to get config
parse = require './libs/yaml.js'
fs = require 'fs'
path = require 'path'
get = require './libs/get.js'
checks = require './libs/checks.js'
parse = require './libs/parse.js'
# Read instances
start = (args, dir) ->
# Check instances
checks.instances(dir)
# Parse YAML
parsed = parse.par... | # Parse YAML to get config
parse = require './libs/yaml.js'
fs = require 'fs'
path = require 'path'
get = require './libs/get.js'
checks = require './libs/checks.js'
parse = require './libs/parse.js'
exec = require 'child_process'
# Read instances
start = (args, dir) ->
# Check instances
checks.instances(dir)
# ... | Add start fun = issue | Add start fun = issue
| CoffeeScript | mit | Gum-Joe/Web-OS-container,Gum-Joe/boss-container,Gum-Joe/jakhu-container |
1b3c9c452c62f397cc23e9f131a5498913a9e141 | lib/prompt.coffee | lib/prompt.coffee | require 'colors'
inquirer = require 'inquirer'
W = require 'when'
###*
* A light wrapper for the prompt interface, which uses inquirer to gather info
* from the user via command line. The use of deferred and the progress event
* are mainly for testing. You get access the the readline object from the
* promp... | require 'colors'
inquirer = require 'inquirer'
W = require 'when'
###*
* A light wrapper for the prompt interface, which uses inquirer to gather info
* from the user via command line. The use of deferred and the progress event
* are mainly for testing. You get access the the readline object from the
* promp... | Fix help link to be real | Fix help link to be real
| CoffeeScript | mit | biilmann/ship,carrot/ship |
d3779e4705382cd9c927e9c5437ce980f0c11ccf | app/assets/javascripts/controllers/paper_manage_controller.js.coffee | app/assets/javascripts/controllers/paper_manage_controller.js.coffee | ETahi.PaperManageController = Ember.ObjectController.extend
sortedPhases: ( ->
Ember.ArrayProxy.createWithMixins(Em.SortableMixin, {
content: @get('model.phases')
sortProperties: ['position']
})
).property('model.phases.[]', 'model.phases.tasks.@each')
updatePositions: (phase)->
relevantP... | ETahi.PaperManageController = Ember.ObjectController.extend
positionSort: ["position:asc"]
sortedPhases: Ember.computed.sort('phases', 'positionSort')
updatePositions: (phase)->
relevantPhases = @get('model.phases').filter((p)->
p != phase && p.get('position') >= phase.get('position')
)
releva... | Use updated sort syntax for sortedPhases. | Use updated sort syntax for sortedPhases.
| CoffeeScript | mit | johan--/tahi,johan--/tahi,johan--/tahi,johan--/tahi |
154ac0318fa01da9f674107c3d67b8b6b4f9182e | application/chrome/content/wesabe/fi-scripts/com/chase/errors.coffee | application/chrome/content/wesabe/fi-scripts/com/chase/errors.coffee | wesabe.provide 'fi-scripts.com.chase.errors',
dispatch: ->
if page.present e.errors.unableToCompleteAction
job.fail 503, 'fi.error'
elements:
errors:
unableToCompleteAction: [
'//text()[contains(string(.), "We were unable to process your request")]'
]
| wesabe.provide 'fi-scripts.com.chase.errors',
dispatch: ->
if page.present e.errors.unableToCompleteAction
job.fail 503, 'fi.error'
if page.present e.errors.systemUnavailable
job.fail 503, 'fi.unavailable'
elements:
errors:
unableToCompleteAction: [
'//text()[contains(string(... | Add a check for Chase's "System Unavailable" error. | Add a check for Chase's "System Unavailable" error. | CoffeeScript | apache-2.0 | wesabe/ssu,wesabe/ssu,wesabe/ssu,wesabe/ssu,wesabe/ssu |
d6f2edec43947548f48a688b201aa00c14db37b1 | core/app/assets/javascripts/spree.js.coffee | core/app/assets/javascripts/spree.js.coffee | #= require jsuri
class window.Spree
@ready: (callback) ->
jQuery(document).ready(callback)
# Helper function to take a URL and add query parameters to it
# Uses the JSUri library from here: https://code.google.com/p/jsuri/
# Thanks to Jake Moffat for the suggestion: https://twitter.com/jakeonrails/statuses... | #= require jsuri
class window.Spree
@ready: (callback) ->
jQuery(document).ready(callback)
# Helper function to take a URL and add query parameters to it
# Uses the JSUri library from here: https://code.google.com/p/jsuri/
# Thanks to Jake Moffat for the suggestion: https://twitter.com/jakeonrails/statuses... | Support empty query parameters for Spree.url | Support empty query parameters for Spree.url
| CoffeeScript | bsd-3-clause | jspizziri/spree,APohio/spree,ramkumar-kr/spree,surfdome/spree,knuepwebdev/FloatTubeRodHolders,nooysters/spree,vinsol/spree,vcavallo/spree,DarkoP/spree,tesserakt/clean_spree,tancnle/spree,mindvolt/spree,jparr/spree,CiscoCloud/spree,Kagetsuki/spree,pervino/solidus,azclick/spree,progsri/spree,grzlus/spree,orenf/spree,shio... |
9880ae9daa060c5eb37e5fa014f332a9efe4cced | core/app/backbone/factlink/react_loading_indicator.coffee | core/app/backbone/factlink/react_loading_indicator.coffee | window.ReactLoadingIndicator = React.createBackboneClass
displayName: 'ReactLoadingIndicator'
changeOptions: 'sync request'
render: ->
if !@model() || @model().loading()
_img ['ajax-loader', src: Factlink.Global.ajax_loader_image]
else
_span()
| window.ReactLoadingIndicator = React.createBackboneClass
displayName: 'ReactLoadingIndicator'
changeOptions: 'sync request'
render: ->
if !@model() || @model().loading()
_img ['ajax-loader', src: Factlink.Global.ajax_loader_image]
else if @model().length > 0
_span()
else
@props.chil... | Allow empty state in loading indicator | Allow empty state in loading indicator
| CoffeeScript | mit | Factlink/factlink-core,Factlink/factlink-core,daukantas/factlink-core,daukantas/factlink-core,daukantas/factlink-core,daukantas/factlink-core,Factlink/factlink-core,Factlink/factlink-core |
5a6415d3f87b5304f59c3329c6470221a45ac87e | services/web/app/coffee/Features/Labels/LabelsController.coffee | services/web/app/coffee/Features/Labels/LabelsController.coffee | EditorRealTimeController = require "../Editor/EditorRealTimeController"
LabelsHandler = require './LabelsHandler'
logger = require 'logger-sharelatex'
module.exports = LabelsController =
getAllLabels: (req, res, next) ->
project_id = req.params.project_id
LabelsHandler.getAllLabelsForProject project_id, (err, p... | EditorRealTimeController = require "../Editor/EditorRealTimeController"
LabelsHandler = require './LabelsHandler'
logger = require 'logger-sharelatex'
module.exports = LabelsController =
getAllLabels: (req, res, next) ->
project_id = req.params.project_id
logger.log {project_id}, "getting all labels for project... | Add logging for Labels http actions | Add logging for Labels http actions
| CoffeeScript | agpl-3.0 | sharelatex/sharelatex |
5214ee814ca0e90b249af37a78b524a31c6e22b6 | src/storyboard.coffee | src/storyboard.coffee | ###!
* Storyboard
* (c) Guillermo Grau Panea 2016
* License: MIT
###
# 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
k = require './gral/constants'
mainStory = require './gral/stories'
filt... | module.exports = require './noPlugins'
k = require './gral/constants'
hub = require './gral/hub'
# Browser side: in production, nothing.
# In development, everything, including wsClient
if k.IS_BROWSER
if process.env.NODE_ENV isnt 'production'
hub.addListener require './listeners/console'
hub.addListener re... | Make the main entry point depend on noPlugin, not replicate it | Make the main entry point depend on noPlugin, not replicate it
| CoffeeScript | mit | guigrpa/storyboard,guigrpa/storyboard |
2feca6a58b671614be295fd1ecff0394a3d20dcd | index.coffee | index.coffee | module.exports = (Impromptu) ->
@register 'pwd', ->
process.env.PWD
@register 'prettyPwd', ->
cwd = process.env.PWD
if cwd.indexOf process.env.HOME == 0
cwd = '~' + cwd.slice process.env.HOME.length
cwd
@register 'user', (done) ->
@exec 'whoami', done
@register 'host', (done) ->
... | module.exports = (Impromptu, 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) ->
... | Add modules arg, remove @get, pass generations functions as update property | Add modules arg, remove @get, pass generations functions as update property
| CoffeeScript | mit | impromptu/impromptu-system |
7c786316ba3375d46ee8e0c2a9f050f1d236f3c9 | lib/iridium/casperjs/lib/iridium/qunit_adapter.coffee | lib/iridium/casperjs/lib/iridium/qunit_adapter.coffee | currentTest = {}
startTime = null
QUnit.testStart (context) ->
currentTest = {}
currentTest.name = context.name
currentTest.assertions = 0
currentTest.backtrace = []
startTime = (new Date()).getTime()
QUnit.log (context) ->
if context.result
currentTest.assertions++
return
stackTrace = []
cu... | currentTest = {}
startTime = null
QUnit.testStart (context) ->
currentTest = {}
currentTest.name = context.name
currentTest.assertions = 0
currentTest.backtrace = []
startTime = (new Date()).getTime()
QUnit.log (context) ->
if context.result
currentTest.assertions++
return
stackTrace = []
cu... | Clean backtraces from injected files | Clean backtraces from injected files
| CoffeeScript | mit | radiumsoftware/iridium,radiumsoftware/iridium,radiumsoftware/iridium |
ce229f1fc1d47ad92e6de6c640cabdb0f6d9f27d | assets/javascripts/models.js.coffee | assets/javascripts/models.js.coffee | App.User = DS.Model.extend
firstName: DS.attr("string")
lastName: DS.attr("string")
email: DS.attr("string")
role: DS.attr("string")
password: DS.attr("string")
App.CurrentUser = App.User.extend({})
App.Room = DS.Model.extend
name: DS.attr("string")
room_user_state: DS.belongsTo("room_user_state")... | App.User = DS.Model.extend
firstName: DS.attr("string")
lastName: DS.attr("string")
email: DS.attr("string")
role: DS.attr("string")
password: DS.attr("string")
App.CurrentUser = App.User.extend({})
App.Room = DS.Model.extend
name: DS.attr("string")
room_user_state: DS.belongsTo("room_user_state")... | Change DS.attr type from integer to number | Change DS.attr type from integer to number
| CoffeeScript | mit | sashafklein/bloc-mogo,di-stars/mogo-chat,HashNuke/mogo-chat,di-stars/mogo-chat,sashafklein/bloc-mogo,di-stars/mogo-chat,HashNuke/mogo-chat,louishawkins/mogo-chat,HashNuke/mogo-chat,louishawkins/mogo-chat,sashafklein/bloc-mogo,louishawkins/mogo-chat |
2bdc753adabf99283df42610385c41af9f821a56 | app/client/js/app.coffee | app/client/js/app.coffee | goog.provide 'App'
class App
###*
@param {Element} element
@param {app.Error} error
@param {app.Routes} routes
@param {app.Storage} storage
@param {app.react.App} reactApp
@param {este.Router} router
@constructor
###
constructor: (element, error, routes, storage, reactApp, router) ->... | goog.provide 'App'
class App
###*
@param {Element} element
@param {app.Error} error
@param {app.Routes} routes
@param {app.Storage} storage
@param {app.react.App} reactApp
@param {este.Router} router
@param {app.Dispatcher} dispatcher
@constructor
###
constructor: (element, error... | Use dispatcher for route loading. | Use dispatcher for route loading.
| CoffeeScript | mit | steida/songary |
2f8c9ffa66a1cadf3c6a47dbca61bd194b149de6 | tasks/nof-task.coffee | tasks/nof-task.coffee | module.exports = (grunt) ->
{spawn} = require('./task-helpers')(grunt)
grunt.registerTask 'nof', 'Un-focus all specs', ->
nof = require.resolve('.bin/nof')
spawn({cmd: nof, args: ['spec', 'src']}, @async())
| module.exports = (grunt) ->
{spawn} = require('./task-helpers')(grunt)
grunt.registerTask 'nof', 'Un-focus all specs', ->
nof = require.resolve('.bin/nof')
spawn({cmd: nof, args: ['spec']}, @async())
| Remove src from nof list of directories | Remove src from nof list of directories
It no longer contains any package specs.
| CoffeeScript | mit | tjkr/atom,abcP9110/atom,decaffeinate-examples/atom,codex8/atom,mnquintana/atom,pkdevbox/atom,woss/atom,dkfiresky/atom,ezeoleaf/atom,oggy/atom,toqz/atom,MjAbuz/atom,gabrielPeart/atom,bsmr-x-script/atom,Andrey-Pavlov/atom,folpindo/atom,Neron-X5/atom,liuxiong332/atom,KENJU/atom,Jandersolutions/atom,vcarrera/atom,brumm/ato... |
5e208b83781c22349c327240fadbf4304a3e9cd5 | app/assets/javascripts/species/views/documents/batch_download_component.js.coffee | app/assets/javascripts/species/views/documents/batch_download_component.js.coffee | Species.BatchDownloadComponent = Ember.Component.extend
tagName: 'a'
template: Ember.Handlebars.compile('<i class="fa fa-download"></i>')
click: (event) ->
checked = $(event.target).closest('.inner-table-container').
find('td.download-col input:checked')
documentIds = checked.map( ->
$(@).clo... | Species.BatchDownloadComponent = Ember.Component.extend
tagName: 'a'
template: Ember.Handlebars.compile('<i class="fa fa-download"></i>')
click: (event) ->
checked = $(event.target).closest('.inner-table-container').
find('td.download-col input:checked')
documentIds = checked.map( ->
$(@).clo... | Add batch download tracking separately | Add batch download tracking separately
| CoffeeScript | bsd-3-clause | unepwcmc/SAPI,unepwcmc/SAPI,unepwcmc/SAPI,unepwcmc/SAPI |
056a46fed79f712c3c5114b2c52889a2f7c7d31a | client/lanes/models/mixins/HasCodeField.coffee | client/lanes/models/mixins/HasCodeField.coffee | Lanes.Models.Mixins.HasCodeField = {
INVALID: /[^A-Z0-9a-z]/
included: ->
this.prototype.INVALID_CODE_CLanes.RS ||= Lanes.Models.mixins.Lanes.sCodeField.INVALID
initialize: ->
this.on('change:code', this.upcaseCode )
upcaseCode: ->
this.set('code', this.get('code').toUpperCas... | Lanes.Models.Mixins.HasCodeField = {
INVALID: /[^A-Z0-9a-z]/
included: (klass)->
klass::INVALID_CODE_CHARS ||= Lanes.Models.mixins.Lanes.sCodeField.INVALID
initialize: ->
this.on('change:code', this.upcaseCode)
upcaseCode: ->
this.set('code', this.get('code').toUpperCase())
}... | Fix regex gone wild overwritting. | Fix regex gone wild overwritting.
Belived this was a side-effect of the mass renaming
from Stockor to Lanes
| CoffeeScript | mit | argosity/hippo,argosity/lanes,argosity/lanes,argosity/hippo,argosity/lanes,argosity/hippo |
5fafe8eebfe94cf4093ea6ac90451ef447a90484 | lib/modals/json-modal.coffee | lib/modals/json-modal.coffee | module.exports = class JSONModal
@Show: (json) ->
unless typeof(json) == 'object'
try
json = JSON.parse(json)
catch
json = "\"#{json}\""
try
json = JSON.parse(json)
catch
console.e... | module.exports = class JSONModal
@Show: (json) ->
unless typeof(json) == 'object'
try
json = JSON.stringify JSON.parse(json), null, ' '
catch
json = json
return new Promise((fulfil, reject) ->
element = document.createElement('div... | Make it possible to copy JSONs | Make it possible to copy JSONs
When pressing escape the results shouldn't close anymore...
| CoffeeScript | mit | rikard2/pg-hoff,rikard2/pg-hoff |
d0960fdfec7325bf42721f68f15409907def4fb5 | app/assets/javascripts/views/discussion_view.js.coffee | app/assets/javascripts/views/discussion_view.js.coffee | class Views.DiscussionView extends View
@content: ->
@div class: 'discussion', =>
@subview 'commentsList', new Views.RelationView(
buildItem: (comment) -> new Views.CommentItem(comment)
)
@div class: 'text-entry', =>
@textarea rows: 2, outlet: 'textarea'
@button "Submit C... | class Views.DiscussionView extends View
@content: ->
@div class: 'discussion', =>
@subview 'commentsList', new Views.RelationView(
buildItem: (comment) -> new Views.CommentItem(comment)
)
@div class: 'text-entry', =>
@textarea rows: 2, outlet: 'textarea'
@button "Submit C... | Allow newlines in comment field. Meta/ctrl-enter submits | Allow newlines in comment field. Meta/ctrl-enter submits | CoffeeScript | agpl-3.0 | schuyler1d/hyperarchy,nathansobo/hyperarchy |
74b1e9d7efb2ac5f808670028108b79303a9a5ae | scripts/moo.coffee | scripts/moo.coffee | # Description:
# A cow's gonna be a cow.
#
# Commands:
# hubot moo* - Reply w/ moo
module.exports = (robot) ->
robot.hear /\bmo{2,}\b/i, (msg) ->
if msg.envelope.room == "1s_and_0s"
robot.messageHipchat "MOOOOOOOOOOOOOOOOO"
else
if !msg.envelope.room
msg.send "This attempt has been lo... | # Description:
# A cow's gonna be a cow.
#
# Commands:
# hubot moo* - Reply w/ moo
module.exports = (robot) ->
robot.hear /\bmo{2,}\b/i, (msg) ->
if msg.envelope.room == "1s_and_0s"
robot.messageHipchat "MOOOOOOOOOOOOOOOOO"
else
if !msg.envelope.room
msg.send "This incident will be re... | Change "This attempt has been logged" to something more familiar | Change "This attempt has been logged" to something more familiar
Test Plan: None
Reviewers: ben
Reviewed By: ben
Differential Revision: http://phabricator.khanacademy.org/D3700
| CoffeeScript | mit | Khan/culture-cow,Khan/culture-cow |
81888f898b1cc63037992fbdd32b4e66f8b5aafa | app/assets/javascripts/application.js.coffee | app/assets/javascripts/application.js.coffee | # This is a manifest file that'll be compiled into application.js, which will include all the files
# listed below.
#
# Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
# or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
#
... | # This is a manifest file that'll be compiled into application.js, which will include all the files
# listed below.
#
# Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
# or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
#
... | Remove require tree to eliminate unneeded scripts | Remove require tree to eliminate unneeded scripts
| CoffeeScript | mit | zinedistro/zinedistro,zinedistro/zinedistro,zinedistro/zinedistro |
a80291c30b847d214a379a77f09dd30b14603621 | lib/helpers/bean_builder.coffee | lib/helpers/bean_builder.coffee | {Wrappers} = require "#{__dirname}/wrappers"
class BeanBuilder
constructor: ({@basePath, @suffix}) ->
if @suffix[0] is '_'
@suffix = @suffix[1..]
build: (config) ->
throw new Error 'No task defined.' unless config
suffixLength = @suffix.length
config.type = Wrappers.underscored(config.type... | {Wrappers} = require "#{__dirname}/wrappers"
class BeanBuilder
basePath: null
suffix: null
createObjectCallback: null
constructor: ({@basePath, @suffix, @createObjectCallback}) ->
if @suffix[0] is '_'
@suffix = @suffix[1..]
build: (config) ->
throw new Error 'No task defined.' unless config... | Make BeanBuilder more flexible, fix members' scopes. | Make BeanBuilder more flexible, fix members' scopes.
| CoffeeScript | mit | knalli/pi-jenkins,knalli/pi-jenkins |
3e84ec04f18a8da376929036b704f530f7518f7f | spec/side-view-spec.coffee | spec/side-view-spec.coffee | SideView = require '../lib/side-view'
describe 'SideView', ->
side = null
view = null
line = null
beforeEach ->
line = {}
side = {
klass: -> 'klass',
site: -> 99,
description: -> '',
lines: -> [line]
}
view = new SideView(side)
it 'triggers conflict resolution', ->
... | SideView = require '../lib/side-view'
Conflict = require '../lib/conflict'
util = require './util'
describe 'SideView', ->
[view, ours, theirs] = []
beforeEach ->
editor = util.openPath("single-2way-diff.txt").getEditor()
conflict = Conflict.all(editor)[0]
[ours, theirs] = [conflict.ours, conflict.th... | Use a real editor in SideViewSpec. | Use a real editor in SideViewSpec.
| CoffeeScript | mit | smashwilson/merge-conflicts,smashwilson/merge-conflicts,antcodd/merge-conflicts |
c15df4c2aa43fc251fa0664e5cf600b2ba762c6a | services/track-changes/app.coffee | services/track-changes/app.coffee | Settings = require "settings-sharelatex"
logger = require "logger-sharelatex"
logger.initialize("track-changes")
HttpController = require "./app/js/HttpController"
express = require "express"
app = express()
app.use express.logger()
app.post "/doc/:doc_id/flush", HttpController.flushUpdatesWithLock
app.use (error, ... | Settings = require "settings-sharelatex"
logger = require "logger-sharelatex"
logger.initialize("track-changes")
HttpController = require "./app/js/HttpController"
express = require "express"
app = express()
app.use express.logger()
app.post "/doc/:doc_id/flush", HttpController.flushUpdatesWithLock
app.get "/status... | Add in /status end point | Add in /status end point
| CoffeeScript | agpl-3.0 | sharelatex/sharelatex |
14639c0c659d0dfc9f5e8b5c4d668b59dfcf7a37 | lib/love-provider.coffee | lib/love-provider.coffee | fs = require 'fs'
path = require 'path'
module.exports =
selector: '.source.lua'
disableForSelector: '.source.lua .comment, .source.lua .string'
inclusionPriority: 10
excludeLowerPriority: true
# Required: Return a promise, an array of suggestions, or null.
getSuggestions: ( { editor, bufferP... | fs = require 'fs'
path = require 'path'
module.exports =
selector: '.source.lua'
disableForSelector: '.source.lua .comment, .source.lua .string'
inclusionPriority: 10
excludeLowerPriority: true
# Required: Return a promise, an array of suggestions, or null.
getSuggestions: ( { editor, bufferP... | Return empty array when prefix is empty | Return empty array when prefix is empty
Prevents an error when the users types an invalid character (e.g. german
umlauts).
| CoffeeScript | mit | rm-code/love-atom,rm-code/love-atom |
b5ef821a662cb94278ae7cc4412e8a3341a6ef5e | app/assets/javascripts/admin/settings.js.coffee | app/assets/javascripts/admin/settings.js.coffee | $ ->
if $('#setting_show_map').length
$this = $('#setting_show_map')
if $this.is(':checked')
else
$('.map-settings').hide()
$this.on 'click', (e) ->
if $this.is(':checked')
$('.map-settings').slideDown()
else
$('.map-settings').slideUp()
| $ ->
if $('#setting_show_map').length
$this = $('#setting_show_map')
unless $this.is(':checked')
$('.map-settings').hide()
$this.on 'click', (e) ->
if $this.is(':checked')
$('.map-settings').slideDown()
else
$('.map-settings').slideUp()
| Improve coffeescript using unless attribute | Improve coffeescript using unless attribute
| CoffeeScript | mit | lr-agenceweb/rails-starter,lr-agenceweb/rails-starter,lr-agenceweb/rails-starter,lr-agenceweb/rails-starter |
f868877f6644e529a6841b79e76bf322cc364327 | app/assets/javascripts/app/tabs.js.coffee | app/assets/javascripts/app/tabs.js.coffee | show_tab = () ->
if location.hash.match(/^#tab-/)
$(".nav-tabs a[href=##{location.hash.replace('#tab-', '')}]").tab('show')
if $('.nav-tabs').length > 0
default_hash = $('.nav-tabs .active a')[0].hash.replace('#', '')
window.history.replaceState({}, '', ("#tab-" + default_hash))
show_tab()
$(window).on 'po... | show_tab = ->
if location.hash.match(/^#tab-/)
$(".nav-tabs a[href=##{location.hash.replace('#tab-', '')}]").tab('show')
show_default_tab = ->
if $('.nav-tabs').length > 0
default_hash = $('.nav-tabs .active a')[0].hash.replace('#', '')
window.history.replaceState({}, '', ("#tab-" + default_hash))
sho... | Fix bug showing tab when coming from another page | Fix bug showing tab when coming from another page
| CoffeeScript | agpl-3.0 | ferdinandrosario/onebody,kevinjqiu/onebody,ferdinandrosario/onebody,fadiwissa/onebody,kevinjqiu/onebody,nerdnorth/remote-workers-app,fadiwissa/onebody,mattraykowski/onebody,davidleach/onebody,nerdnorth/remote-workers-app,nerdnorth/remote-workers-app,hschin/onebody,nerdnorth/remote-workers-app,kevinjqiu/onebody,hschin/o... |
87cc08569a850520ee38992b90073f4fd3921d65 | services/web/public/coffee/ide/history/controllers/HistoryV2DiffController.coffee | services/web/public/coffee/ide/history/controllers/HistoryV2DiffController.coffee | define [
"base"
], (App) ->
App.controller "HistoryV2DiffController", ($scope, ide, event_tracking) ->
$scope.restoreState =
inflight: false
error: false
$scope.restoreDeletedFile = () ->
pathname = $scope.history.selection.pathname
return if !pathname?
version = $scope.history.selection.docs[path... | define [
"base"
], (App) ->
App.controller "HistoryV2DiffController", ($scope, ide, event_tracking) ->
$scope.restoreState =
inflight: false
error: false
$scope.restoreDeletedFile = () ->
pathname = $scope.history.selection.pathname
return if !pathname?
version = $scope.history.selection.docs[path... | Fix bad if statement sending doc open into infinite loop | Fix bad if statement sending doc open into infinite loop
| CoffeeScript | agpl-3.0 | sharelatex/sharelatex |
3180fa1986c693c4084212a49ed1e286d6e4364a | src/scripts/loader.coffee | src/scripts/loader.coffee | define (require) ->
$ = require('jquery')
Backbone = require('backbone')
router = require('cs!router')
analytics = require('cs!helpers/handlers/analytics') # Setup Analytics Handler
# The root URI prefixed on all non-external AJAX and Backbone URIs
root = '/'
init = (options = {}) ->
# Append /test ... | define (require) ->
$ = require('jquery')
Backbone = require('backbone')
router = require('cs!router')
analytics = require('cs!helpers/handlers/analytics') # Setup Analytics Handler
# The root URI prefixed on all non-external AJAX and Backbone URIs
root = '/'
init = (options = {}) ->
# Append /test ... | Use regex to check for 'mailto:' link | Use regex to check for 'mailto:' link
| CoffeeScript | agpl-3.0 | katalysteducation/webview,katalysteducation/webview,Connexions/webview,dak/webview,dak/webview,Connexions/webview,carolinelane10/webview,katalysteducation/webview,katalysteducation/webview,dak/webview,Connexions/webview,Connexions/webview |
4f7b1974b655ec8a05657f368de7b617a1f08180 | gulp/watch.coffee | gulp/watch.coffee | g = module.parent.exports
g.task "watch", ->
g.s.listen 35729, (err) ->
return console.log(err) if err
g.watch "bower.json", ["vendor"]
g.watch ["fonts/**/*", "web/vendor/**/fonts/*"], ["fonts"]
g.watch "images/**/*", ["images"]
g.watch "scripts/**/*.coffee", ["scripts"]
g.watch "styles/**/*... | g = module.parent.exports
g.task "watch", ->
g.s.listen 35729, (err) ->
return console.log(err) if err
g.watch "bower.json", ["vendor"]
g.watch ["fonts/**/*", "web/vendor/**/fonts/*"], ["fonts"]
g.watch "images/**/*", ["images"]
g.watch "scripts/**/*.coffee", ["scripts"]
g.watch "styles/**/*... | Recompile vendor css on bootstrap var changes | Recompile vendor css on bootstrap var changes
| CoffeeScript | mit | phpsw/phpsw,phpsw/phpsw,phpsw/phpsw,phpsw/phpsw,phpsw/phpsw |
3bc74eee4e40bc5881f5f51300874ee187a28845 | src/app/units/states/tasks/viewer/directives/task-sheet-view/task-sheet-view.coffee | src/app/units/states/tasks/viewer/directives/task-sheet-view/task-sheet-view.coffee | angular.module('doubtfire.units.states.tasks.viewer.directives.task-sheet-view', [])
.directive('taskSheetView', ->
restrict: 'E'
templateUrl: 'units/states/tasks/viewer/directives/task-sheet-view/task-sheet-view.tpl.html'
scope:
task: '='
unit: '='
controller: ($scope, $timeout, TaskFeedback, taskServ... | angular.module('doubtfire.units.states.tasks.viewer.directives.task-sheet-view', [])
.directive('taskSheetView', ->
restrict: 'E'
templateUrl: 'units/states/tasks/viewer/directives/task-sheet-view/task-sheet-view.tpl.html'
scope:
task: '='
unit: '='
controller: ($scope, $timeout, TaskFeedback, taskServ... | Remove log to task pdf url | FIX: Remove log to task pdf url
| CoffeeScript | agpl-3.0 | doubtfire-lms/doubtfire-web,doubtfire-lms/doubtfire-web,alexcu/doubtfire-web,alexcu/doubtfire-web,doubtfire-lms/doubtfire-web,doubtfire-lms/doubtfire-web |
e6edc2573920676d6c235e4222e9edd6f1d269a1 | app/views/users/verify_paypal.js.coffee | app/views/users/verify_paypal.js.coffee | $(".paypal-status").html "<%= escape_javascript(render :partial => 'devise/registrations/verified_status', :formats => [ :html ]) %>"
$(".verified-status-tag").html "<%= escape_javascript(render :partial => 'shared/verified_status_tag', :formats => [ :html ]) %>"
$(".modal").removeClass "paypal-confirm-modal" if $(".mo... | $(".account-status-paypal").html "<%= escape_javascript(render :partial => 'devise/registrations/verified_status', :formats => [ :html ]) %>"
$(".account-status-linked").html "<%= escape_javascript(render :partial => 'users/club_live_status', :formats => [ :html ]) %>"
$(".verified-status-tag").html "<%= escape_javascr... | Update the Account PayPal Response for New View | Update the Account PayPal Response for New View
Update the Account view PayPal verification response to update the new
DOM elements.
| CoffeeScript | mit | jekhokie/IfSimply,jekhokie/IfSimply,jekhokie/IfSimply |
47d5bab666a4ea711e6da2064f358b66d4ece500 | api/tools/optionsroute.coffee | api/tools/optionsroute.coffee | _ = require 'lodash'
module.exports = (options) ->
(req, res, next) ->
if not _.isArray options
options = [options]
options.push 'OPTIONS'
res.header 'Access-Control-Allow-Methods', options.join ", "
res.header 'Access-Control-Allow-Headers', 'Content-Type'
res... | _ = require 'lodash'
module.exports = (options) ->
if not _.isArray options
options = [options]
options.push 'OPTIONS'
(req, res, next) ->
res.header 'Access-Control-Allow-Methods', options.join ", "
res.header 'Access-Control-Allow-Headers', 'Content-Type'
res.header 'Acce... | Fix OPTIONS accumulation on OPTIONS requests | Fix OPTIONS accumulation on OPTIONS requests
| CoffeeScript | isc | soulweaver91/gw2hub |
b1c945f6f99d8c87f8220d4480cd9ce0ca5b815c | app/assets/javascripts/rglossa/controllers/cwb/result/table_controller.coffee | app/assets/javascripts/rglossa/controllers/cwb/result/table_controller.coffee | App.CwbResultTableController = Em.Controller.extend
needs: ['resultTable']
# We get the actual page of results from the resultTableController; this
# controller is only responsible for doing CWB-specific formatting of
# those results
resultPageBinding: 'controllers.resultTable.content'
arrangedContent: (... | App.CwbResultTableController = Em.Controller.extend
needs: ['resultTable']
# We get the actual page of results from the resultTableController; this
# controller is only responsible for doing CWB-specific formatting of
# those results
resultPageBinding: 'controllers.resultTable.content'
arrangedContent: (... | Allow empty pre- or postmatch | Allow empty pre- or postmatch
| CoffeeScript | mit | textlab/glossa,textlab/glossa,textlab/glossa,textlab/rglossa,textlab/rglossa,textlab/rglossa,textlab/glossa,textlab/glossa,textlab/rglossa,textlab/rglossa |
fcb0497052a4a66b8524ead9e5b455de9cbe47bf | gulp/tasks/icon-font.coffee | gulp/tasks/icon-font.coffee | #--------------------------------------------------------
# Requirements
#--------------------------------------------------------
gulp = require 'gulp'
plugins = require('gulp-load-plugins')()
config = require "../config.coffee"
#--------------------------------------------------------
# Icon Font
#------... | #--------------------------------------------------------
# Requirements
#--------------------------------------------------------
gulp = require 'gulp'
plugins = require('gulp-load-plugins')()
config = require "../config.coffee"
#--------------------------------------------------------
# Icon Font
#------... | Use new API for gulp-iconfont | Use new API for gulp-iconfont
| CoffeeScript | mit | adamwight/WikiEduDashboard,sejalkhatri/WikiEduDashboard,sejalkhatri/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,Wowu/WikiEduDashboard,majakomel/WikiEduDashboard,KarmaHater/WikiEduDashboard,adamwight/WikiEduDashboard,ragesoss/WikiEduDashboard,KarmaHater/WikiEduDashboard,majakomel/WikiEduDashboard,WikiEduca... |
fa3b3a7e9bbfb0b4c03aa644527359a2f4f5a2bf | src/yayson.coffee | src/yayson.coffee |
tryRequire = (dep) ->
try
require dep
catch
undefined
@window ||= {}
Q = @window.Q
_ = @window._
Q ||= tryRequire 'q'
_ ||= tryRequire 'lodash/dist/lodash.underscore'
_ ||= tryRequire 'underscore'
utils = require('./yayson/utils')(_, Q)
Adapter = require('./yayson/adapter')
adapters = require('./yayso... | @window ||= {}
Q = @window.Q
_ = @window._
Q ||= (try require? 'q')
_ ||= (try require? 'lodash/dist/lodash.underscore')
_ ||= (try require? 'underscore')
utils = require('./yayson/utils')(_, Q)
Adapter = require('./yayson/adapter')
adapters = require('./yayson/adapters')
presenterFactory = require('./yayson/presen... | Change optional require format to make webpack happier | Change optional require format to make webpack happier
| CoffeeScript | mit | magicpat/yayson,magicpat/yayson,ajcobo/yayson,confetti/yayson,lsanwick/yayson,lsanwick/yayson,confetti/yayson |
a53572b1653a1ffd67694379b2979a4f3feddd89 | app/assets/javascripts/spina/switch.js.coffee | app/assets/javascripts/spina/switch.js.coffee | # jQuery plugin checkbox
$.fn.spinaSwitch = ->
return this.each ->
unless $(this).attr('data-plugin-switch')
input = $(this)
input.attr('data-plugin-switch', true)
input.hide()
# Check if it is checked
if input.is(':checked')
klass = "switch active"
else
klass ... | # jQuery plugin checkbox
$.fn.spinaSwitch = ->
return this.each ->
unless $(this).attr('data-plugin-switch')
input = $(this)
input.attr('data-plugin-switch', true)
input.hide()
# Check if it is checked
if input.is(':checked')
klass = "switch active"
else
klass ... | Fix setting property checked for spinaSwitch | Fix setting property checked for spinaSwitch | CoffeeScript | mit | denkGroot/Spina-template,denkGroot/Spina-template,hafizio/Spina-template,ahmetabdi/Spina-template,hafizio/Spina-template,ibnukamy/Spina-template,ibnukamy/Spina-template,ahmetabdi/Spina-template |
c78c75913ed64c9c34a3187d1a55d942b65b3bf0 | client/ide/views/chat/chatparticipantview.coffee | client/ide/views/chat/chatparticipantview.coffee | class IDE.ChatParticipantView extends JView
constructor: (options = {}, data) ->
options.cssClass = 'participant-view'
super options, data
participantData = @getData()
participantName = participantData.nickname
@avatar = new AvatarView
origin : participantData.nickname
size ... | class IDE.ChatParticipantView extends JView
constructor: (options = {}, data) ->
options.cssClass = 'participant-view'
super options, data
participantData = @getData()
participantName = participantData.nickname
@avatar = new AvatarView
origin : participantData.nickname
size ... | Remove yourself from chat list. | ChatView: Remove yourself from chat list.
| CoffeeScript | agpl-3.0 | cihangir/koding,jack89129/koding,alex-ionochkin/koding,kwagdy/koding-1,kwagdy/koding-1,rjeczalik/koding,gokmen/koding,andrewjcasal/koding,gokmen/koding,sinan/koding,gokmen/koding,cihangir/koding,usirin/koding,szkl/koding,koding/koding,usirin/koding,mertaytore/koding,jack89129/koding,jack89129/koding,cihangir/koding,gok... |
8aca996b947640d6d1361e8b872ccdd0dfaa4bd0 | lib/views/panel.coffee | lib/views/panel.coffee | Message = require './message'
class PanelView extends HTMLElement
initialize:(@linter) ->
@id = 'linter-panel'
render: (messages) ->
messages.forEach (message) =>
if @linter.views.scope is 'file'
return unless message.currentFile
if message.currentFile and message.position
p = ... | Message = require './message'
class PanelView extends HTMLElement
attachedCallback:(@linter) ->
@id = 'linter-panel'
module.exports = document.registerElement('linter-panel-view', {prototype: PanelView.prototype}) | Remove rendering logic from PanelView | :fire: Remove rendering logic from PanelView
| CoffeeScript | mit | e-jigsaw/Linter,AtomLinter/Linter,steelbrain/linter,elkeis/linter,UltCombo/linter,DanPurdy/linter,JohnMurga/linter,josa42/Linter,levity/linter,AsaAyers/linter,mdgriffith/linter,kaeluka/linter,atom-community/linter,iam4x/linter,simurai/linter-plus,shawninder/linter,Arcanemagus/linter,blakeembrey/linter |
48ab1bdddaa01095484102222c3614014b8fbce3 | src/coffee/xmlhelpers.coffee | src/coffee/xmlhelpers.coffee | {parseString} = require 'xml2js'
exports.xmlFix = (xml) ->
if not xml.match /\<root\>/
xml = "<root>#{xml}</root>"
if not xml.match /\?xml/
xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>#{xml}"
xml
exports.xmlTransform = (xml, callback) ->
parseString xml, callback
exports.xmlVal = (elem, attribNa... | {parseString} = require 'xml2js'
exports.xmlFix = (xml) ->
if not xml.match /\<root\>/
xml = "<root>#{xml}</root>"
if not xml.match /\?xml/
xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>#{xml}"
xml
exports.xmlTransform = (xml, callback) ->
parseString xml, callback
exports.xmlVal = (elem, attribNa... | Use fallback also when element is undefined. | Use fallback also when element is undefined.
| CoffeeScript | mit | hajoeichler/sphere-customer-xml-import |
406edf089cc13d5281d5af33fd941c1ef9f6a0c4 | server/methods/addUserToRoom.coffee | server/methods/addUserToRoom.coffee | Meteor.methods
addUserToRoom: (data) ->
fromId = Meteor.userId()
# console.log '[methods] addUserToRoom -> '.green, 'fromId:', fromId, 'data:', data
room = RocketChat.models.Rooms.findOneById data.rid
# if room.username isnt Meteor.user().username and room.t is 'c'
if room.t is 'c' and room.u?.username isn... | Meteor.methods
addUserToRoom: (data) ->
fromId = Meteor.userId()
console.log '[methods] addUserToRoom -> '.green, 'data:', data
unless Match.test data?.rid, String
throw new Meteor.Error 'invalid-rid'
unless Match.test data?.username, String
throw new Meteor.Error 'invalid-username'
room = RocketCha... | Fix bug where username incorrectly passed to findOneByUsername. Also adds arugment validation. | Fix bug where username incorrectly passed to findOneByUsername. Also
adds arugment validation.
| CoffeeScript | mit | pkgodara/Rocket.Chat,soonahn/Rocket.Chat,litewhatever/Rocket.Chat,tlongren/Rocket.Chat,xasx/Rocket.Chat,k0nsl/Rocket.Chat,mccambridge/Rocket.Chat,PavelVanecek/Rocket.Chat,Deepakkothandan/Rocket.Chat,abhishekshukla0302/trico,intelradoux/Rocket.Chat,nrhubbar/Rocket.Chat,Kiran-Rao/Rocket.Chat,snaiperskaya96/Rocket.Chat,Ot... |
8922e2418906baf09fe3b34fab5b8e229cfc5c28 | _mdwriter.cson | _mdwriter.cson | siteEngine: "jekyll"
siteLocalDir: "/Users/krainboltgreene/code/organization/blankjekyll.github.io"
siteDraftsDir: "_drafts/"
sitePostsDir: "_posts/"
siteImagesDir: "/"
siteUrl: "http://blankjekyll.github.io"
frontMatter: """
---
layout: <layout>
title: "<title>"
summary: ""
date: <date>
authors:
- "Kurtis Rainbolt-G... | siteEngine: "jekyll"
siteLocalDir: "/Users/krainboltgreene/code/krainboltgreene/blankjekyll"
siteDraftsDir: "_drafts/"
sitePostsDir: "_posts/"
siteImagesDir: "/"
siteUrl: "http://blankjekyll.github.io"
frontMatter: """
---
layout: <layout>
title: "<title>"
summary: ""
date: <date>
authors:
- "Kurtis Rainbolt-Greene"
... | Make it easier to test | Make it easier to test | CoffeeScript | mit | hackerlifegame/hackerlifegame.github.io,dragonlang/dragonlang.github.io,hackerlifegame/hackerlifegame.github.io,dragonlang/dragonlang.github.io,clearwater-rb/clearwater-rb.github.io,beelang/beelang.github.io,clearwater-rb/clearwater-rb.github.io,dragonlang/dragonlang.github.io,clearwater-rb/clearwater-rb.github.io,beel... |
468076667ff3b3048c56b6a306d16b60670e17e8 | src/set-helpers.coffee | src/set-helpers.coffee | setEqual = (a, b) ->
return false unless a.size is b.size
iterator = a.values()
until (next = iterator.next()).done
return false unless b.has(next.value)
true
subtractSet = (set, valuesToRemove) ->
valuesToRemove.forEach (value) -> set.delete(value)
addSet = (set, valuesToAdd) ->
valuesToAdd.forEach (... | setEqual = (a, b) ->
return false unless a.size is b.size
iterator = a.values()
until (next = iterator.next()).done
return false unless b.has(next.value)
true
subtractSet = (set, valuesToRemove) ->
if set.size > valuesToRemove.size
valuesToRemove.forEach (value) -> set.delete(value)
else
set.fo... | Enumerate the smallest set when subtracting | :racehorse: Enumerate the smallest set when subtracting
| CoffeeScript | mit | atom/text-buffer,pombredanne/text-buffer,whodatninja/text-buffer,atom/text-buffer,jacekkopecky/text-buffer,jacekkopecky/text-buffer,pombredanne/text-buffer |
0a990a459dbbb88fbca9ae6cf10257ddca1cc71c | src/trix/views/document_view.coffee | src/trix/views/document_view.coffee | #= require trix/views/block_view
class Trix.DocumentView
constructor: (@element, @document) ->
render: ->
@element.removeChild(@element.lastChild) while @element.lastChild
@document.eachBlock (block, index) =>
textView = new Trix.BlockView block, index
@element.appendChild(textView.render())
... | #= require trix/views/block_view
class Trix.DocumentView
constructor: (@element, @document) ->
@element.trixPosition = 0
@element.trixIndex = 0
render: ->
@element.removeChild(@element.lastChild) while @element.lastChild
@document.eachBlock (block, index) =>
textView = new Trix.BlockView blo... | Set location properties on the document element so the location can be determined when it's empty | Set location properties on the document element so the location can be determined when it's empty
| CoffeeScript | mit | GabiGrin/trix,ChenMichael/trix,basecamp/trix,basecamp/trix,urossmolnik/trix,GabiGrin/trix,GabiGrin/trix,urossmolnik/trix,ChenMichael/trix,urossmolnik/trix,ChenMichael/trix,basecamp/trix,basecamp/trix |
5d12dc95c55744b11e26d0b15da0a4c28953f50a | app/client/js/react/header.coffee | app/client/js/react/header.coffee | goog.provide 'app.react.Header'
class app.react.Header
###*
@param {app.Routes} routes
@param {app.react.Link} link
@param {app.users.Store} usersStore
@constructor
###
constructor: (routes, link, usersStore) ->
{header,nav} = React.DOM
@component = React.createFactory React.createClass... | goog.provide 'app.react.Header'
class app.react.Header
###*
@param {app.Routes} routes
@param {app.react.Link} link
@param {app.users.Store} usersStore
@constructor
###
constructor: (routes, link, usersStore) ->
{header,nav} = React.DOM
@component = React.createFactory React.createClass... | Fix recentlyUpdatedSongs route is not highlighted. | Fix recentlyUpdatedSongs route is not highlighted.
| CoffeeScript | mit | steida/songary |
fa55fc61b8ea957f095d15b0dc9a8577c2f2472d | bokehjs/gulp/tasks/default.coffee | bokehjs/gulp/tasks/default.coffee | # default - message + brief help
gulp = require "gulp"
runSequence = require "run-sequence"
gulp.task "default", (cb) ->
console.log('Building BokehJS for developer mode ...')
runSequence(["scripts", "styles"], "install", "watch", cb)
| # default - message + brief help
gulp = require "gulp"
runSequence = require "run-sequence"
gulp.task "default", (cb) ->
console.log('Building BokehJS for developer mode ...')
runSequence("build", "install", "watch", cb)
| Switch to simply using build | Switch to simply using build
| CoffeeScript | bsd-3-clause | Karel-van-de-Plassche/bokeh,draperjames/bokeh,rhiever/bokeh,bokeh/bokeh,Karel-van-de-Plassche/bokeh,percyfal/bokeh,draperjames/bokeh,muku42/bokeh,ericmjl/bokeh,abele/bokeh,timothydmorton/bokeh,PythonCharmers/bokeh,muku42/bokeh,clairetang6/bokeh,carlvlewis/bokeh,bokeh/bokeh,bokeh/bokeh,eteq/bokeh,azjps/bokeh,eteq/bokeh,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.