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 |
|---|---|---|---|---|---|---|---|---|---|
cfead0a66ceb29735ba07aded58efb41b3795c51 | src/performance-now.coffee | src/performance-now.coffee | hrtime = process.hrtime
module.exports = -> (getNanoSeconds() - loadTime) / 1e6
getNanoSeconds = ->
hr = hrtime()
hr[0] * 1e9 + hr[1]
loadTime = getNanoSeconds() | if performance? and performance.now
module.exports = -> performance.now()
else if process? and process.hrtime
module.exports = -> (getNanoSeconds() - loadTime) / 1e6
hrtime = process.hrtime
getNanoSeconds = ->
hr = hrtime()
hr[0] * 1e9 + hr[1]
loadTime = getNanoSeconds()
else
module.exports = -> Dat... | Use performance.now when available. Fall back to Date.now if needed. | Use performance.now when available. Fall back to Date.now if needed.
| CoffeeScript | mit | myrne/performance-now |
ae55c670b7244625e67b1ad976d97ca5cc97ffa9 | lib/main.coffee | lib/main.coffee | helpers = require 'atom-linter'
{ BufferedProcess } = require 'atom'
executablePath = "jolie"
pattern = ".+:\\s*(?<file>[^:]+):\\s*(?<line>\\d+):\\s*(?<type>error|warning)\\s*:(?<message>.+)"
module.exports =
config: {}
activate: ->
require( "atom-package-deps" ).install( "linter-jolie" );
provideLinter: ... | helpers = require 'atom-linter'
{ BufferedProcess } = require 'atom'
executablePath = "jolie"
pattern = ".+:\\s*(?<file>[^:]+):\\s*(?<line>\\d+):\\s*(?<type>error|warning)\\s*:(?<message>.+)"
module.exports =
config: {}
activate: ->
require( "atom-package-deps" ).install( "linter-jolie" );
provideLinter: ... | Use the file path from jolie --check | Use the file path from jolie --check
| CoffeeScript | mit | fmontesi/linter-jolie |
fefe5bba6ab1952ff998e8b08658ae764b1d1313 | lib/main.coffee | lib/main.coffee | es = require 'event-stream'
glob = require 'glob'
module.exports =
create: (globb, opt={}) ->
throw new Error "Invalid or missing glob string" unless typeof globb is 'string'
opt.silent ?= true
opt.nonull ?= false
stream = es.pause()
globber = new glob.Glob globb, opt
globber.on 'erro... | es = require 'event-stream'
glob = require 'glob'
module.exports =
create: (globb, opt={}) ->
throw new Error "Invalid or missing glob string" unless typeof globb is 'string'
opt.silent ?= true
opt.nonull ?= false
stream = es.pause()
globber = new glob.Glob globb, opt
globber.on 'erro... | Switch to standard stream patterns | Breaking: Switch to standard stream patterns
| CoffeeScript | mit | wearefractal/glob-stream,aashna956/glob-stream,gulpjs/glob-stream |
555bf94cec62caf9f4f87e1bbd84e496e7acc2d8 | app/assets/javascripts/controllers/submissions.js.coffee | app/assets/javascripts/controllers/submissions.js.coffee | window.App.pendingUploads = 0;
window.App.successfulUploads = [];
$ ->
fetch_tree_for_path = (url) ->
alert("Fetching!")
success = (data) -> $("#tree-view").html(data)
$.get url, null, success, 'html'
$("#tree-view").on("click",
"#tree-view td.node a",
() -> fetch_tree_for_path($(this).dat... | window.App.pendingUploads = 0;
window.App.successfulUploads = [];
$ ->
# Fetches the tree for the given url and places it in the treeview
fetch_tree_for_path = (url) ->
internal_fetch = (url) ->
$("#tree-view").html("Loading...")
success = (data) -> $("#tree-view").html(data)
$.get url, ... | Add event handling, prevent default behaviour of anchor tags | Add event handling, prevent default behaviour of anchor tags
| CoffeeScript | agpl-3.0 | water/mainline,water/mainline,water/mainline |
07f5d995aa492a472d327bbadd962e2c38378172 | app/js/jail_iframe/classes/content_box.coffee | app/js/jail_iframe/classes/content_box.coffee | FactlinkJailRoot.contentBox = (element) ->
$element = $(element)
offset = $element.offset()
top: offset.top + parseInt window.getComputedStyle(element)['padding-top']
left: offset.left + parseInt window.getComputedStyle(element)['padding-left']
width: $element.width()
height: $element.height()
| FactlinkJailRoot.contentBox = (element) ->
$element = $(element)
offset = $element.offset()
top: offset.top + parseInt window.getComputedStyle(element).paddingTop
left: offset.left + parseInt window.getComputedStyle(element).paddingLeft
width: $element.width()
height: $element.height()
| Use paddingTop/Left, as this also works in firefox | Use paddingTop/Left, as this also works in firefox
| CoffeeScript | mit | Factlink/js-library,Factlink/js-library,Factlink/js-library |
a081c47efa6819c2b9b7c50b303d1287927cef23 | src/main.coffee | src/main.coffee | fs = require 'fs'
path = require 'path'
delegate = require 'atom_delegate'
optimist = require 'optimist'
coffeeScript = require 'coffee-script'
atomApplication = null
delegate.browserMainParts.preMainMessageLoopRun = ->
commandLineArgs = parseCommandLine()
require('module').globalPaths.push(path.join(commandLineA... | fs = require 'fs'
path = require 'path'
delegate = require 'atom_delegate'
optimist = require 'optimist'
coffeeScript = require 'coffee-script'
atomApplication = null
delegate.browserMainParts.preMainMessageLoopRun = ->
commandLineArgs = parseCommandLine()
require('module').globalPaths.push(path.join(commandLineA... | Join github and atom dirs | Join github and atom dirs
| CoffeeScript | mit | liuxiong332/atom,john-kelly/atom,sxgao3001/atom,mrodalgaard/atom,SlimeQ/atom,pombredanne/atom,ivoadf/atom,Dennis1978/atom,sxgao3001/atom,basarat/atom,hharchani/atom,bolinfest/atom,jacekkopecky/atom,folpindo/atom,targeter21/atom,seedtigo/atom,deoxilix/atom,me-benni/atom,atom/atom,nucked/atom,darwin/atom,Jandersolutions/... |
be32c61fb308f5ead9649f8b6ee1b75c154fefef | script.coffee | script.coffee | getQueryParam = (variable, defaultValue) ->
query = location.search.substring(1)
vars = query.split('&')
for v in vars
pair = v.split('=')
if pair[0] == variable
return decodeURIComponent(pair[1])
return defaultValue or false
getConfigData = () ->
options = {
forecastAPIKey: $('#forecast... | getQueryParam = (variable, defaultValue) ->
query = location.search.substring(1)
vars = query.split('&')
for v in vars
pair = v.split('=')
if pair[0] == variable
return decodeURIComponent(pair[1])
return defaultValue or false
getConfigData = () ->
options = {
forecastAPIKey: $('#forecast... | Add the proper return value for cancel | Add the proper return value for cancel
| CoffeeScript | agpl-3.0 | mfinelli/simpleface-config,mfinelli/simpleface-config |
0b079b3a5be2b4fced94c8c8edef0359cc34fe15 | assets/javascripts/evaluator/evaluator.coffee | assets/javascripts/evaluator/evaluator.coffee | V = Visualizer
N = V.ReactNodes
rootEvaluators = R.mapObjIndexed( ({useScheduler, getDefaultArgs}, key) ->
(input) ->
R.always(
"Rx.Observable.#{key}(" +
(if getDefaultArgs then input else '') +
(if useScheduler then (if getDefaultArgs then ', scheduler)' else 'scheduler)') else ')')
)
... | V = Visualizer
N = V.ReactNodes
getArgsWithScheduler = ({input, getDefaultArgs, useScheduler}) ->
if getDefaultArgs && useScheduler
"#{input}, scheduler"
else if useScheduler
"scheduler"
else if getDefaultArgs
input
else
""
rootEvaluators = R.mapObjIndexed( ({useScheduler, getDefaultArgs}, key... | Fix evaluating args with scheduler | Fix evaluating args with scheduler
| CoffeeScript | mit | urmastalimaa/reactive-visualizer,urmastalimaa/reactive-visualizer,urmastalimaa/reactive-visualizer,urmastalimaa/reactive-visualizer |
efef6d5c43b255bdbf4cba28ce49a4d9811ac123 | lib/bubble.coffee | lib/bubble.coffee | {Range} = require 'atom'
BubbleView = require './bubble-view'
class Bubble
constructor: (@linter) ->
@bubble = null
update: (point) ->
@remove()
return unless @linter.view.messages.length
textEditor = @linter.activeEditor
found = false
@linter.view.messages.forEach (message) =>
retur... | {Range} = require 'atom'
BubbleView = require './bubble-view'
class Bubble
constructor: (@linter) ->
@bubble = null
update: (point) ->
@remove()
return unless @linter.view.messages.length
textEditor = @linter.activeEditor
found = false
@linter.view.messages.forEach (message) =>
retur... | Move overlay to left of the marker | Move overlay to left of the marker
| CoffeeScript | mit | mdgriffith/linter,simurai/linter-plus,e-jigsaw/Linter,shawninder/linter,UltCombo/linter,kaeluka/linter,DanPurdy/linter,Arcanemagus/linter,josa42/Linter,elkeis/linter,blakeembrey/linter,levity/linter,steelbrain/linter,JohnMurga/linter,iam4x/linter,atom-community/linter,AsaAyers/linter,AtomLinter/Linter |
7c7e32d7a725d8a5b7496f896eb4649491da3735 | models/collector_profile.coffee | models/collector_profile.coffee | _ = require 'underscore'
Q = require 'q'
Backbone = require 'backbone'
{ SESSION_ID, API_URL } = require('sharify').data
Relations = require './mixins/relations/collector_profile.coffee'
module.exports = class CollectorProfile extends Backbone.Model
_.extend @prototype, Relations
url: "#{API_URL}/api/v1/me/collec... | _ = require 'underscore'
Q = require 'q'
Backbone = require 'backbone'
{ SESSION_ID, API_URL } = require('sharify').data
Relations = require './mixins/relations/collector_profile.coffee'
module.exports = class CollectorProfile extends Backbone.Model
_.extend @prototype, Relations
url: "#{API_URL}/api/v1/me/collec... | Remove defaults; add an Array of valid hash fields as a hack around a broken API | Remove defaults; add an Array of valid hash fields as a hack around a broken API
| CoffeeScript | mit | xtina-starr/force,erikdstock/force,cavvia/force-1,artsy/force,izakp/force,damassi/force,oxaudo/force,kanaabe/force,xtina-starr/force,TribeMedia/force-public,anandaroop/force,eessex/force,izakp/force,anandaroop/force,joeyAghion/force,artsy/force-public,mzikherman/force,eessex/force,joeyAghion/force,kanaabe/force,mzikher... |
b94a74d99752bf4c7916cd0ca23be101350fe922 | tests/helpers/acceptance.coffee | tests/helpers/acceptance.coffee | `import startApp from '../helpers/start-app';`
acceptance = (suiteName) ->
App = null
suite "Acceptance: #{suiteName}",
setup: -> App = startApp()
teardown: -> Ember.run(App, 'destroy')
`export default acceptance;`
| `import startApp from './start-app';`
acceptance = (suiteName) ->
App = null
suite "Acceptance: #{suiteName}",
setup: -> App = startApp()
teardown: -> Ember.run(App, 'destroy')
`export default acceptance;`
| Update import after moving file | Update import after moving file
| CoffeeScript | agpl-3.0 | exercism/ember-experiment |
fd2661d8a5c56aa6860b12a3d7de0c6217d38679 | config.coffee | config.coffee | exports.config =
# See http://brunch.io/#documentation for docs.
files:
javascripts:
joinTo:
'javascripts/app.js': /^app/
'javascripts/vendor.js': /^vendor/
'test/javascripts/test.js': /^test[\\/](?!vendor)/
'test/javascripts/test-vendor.js': /^test[\\/](?=vendor)/
or... | exports.config =
# See http://brunch.io/#documentation for docs.
files:
javascripts:
joinTo:
'javascripts/app.js': /^app/
'javascripts/vendor.js': /^vendor/
'test/javascripts/test.js': /^test[\\/](?!vendor)/
'test/javascripts/test-vendor.js': /^test[\\/](?=vendor)/
or... | Disable source urls since they break handlebars atm | Disable source urls since they break handlebars atm
| CoffeeScript | apache-2.0 | despairblue/scegratoo |
b86cd82416abcd2a076088aa8dd6b0e80a4412a5 | lib/minimap-find-results-view.coffee | lib/minimap-find-results-view.coffee | {Subscriber} = require 'emissary'
module.exports = ->
findAndReplace = atom.packages.getLoadedPackage('find-and-replace')
minimap = atom.packages.getLoadedPackage('minimap')
minimapInstance = require (minimap.path)
class MinimapFindResultsView
Subscriber.includeInto(this)
constructor: (@model) ->
... | {Subscriber} = require 'emissary'
module.exports = ->
findAndReplace = atom.packages.getLoadedPackage('find-and-replace')
minimap = atom.packages.getLoadedPackage('minimap')
minimapInstance = require (minimap.path)
class MinimapFindResultsView
Subscriber.includeInto(this)
constructor: (@model) ->
... | Fix markers redraw on pane change after destroy | :bug: Fix markers redraw on pane change after destroy
| CoffeeScript | mit | atom-minimap/minimap-find-and-replace |
3707ae290f324f11830a82a27ab8735592e46d95 | apps/show/client/index.coffee | apps/show/client/index.coffee | { SHOW, ARTWORKS } = require('sharify').data
PartnerShow = require '../../../models/partner_show.coffee'
ShareView = require '../../../components/share/view.coffee'
initCarousel = require '../../../components/merry_go_round/index.coffee'
ArtworkColumnsView = require '../../../components/artwork_columns/view.coffee'
att... | _ = require 'underscore'
{ SHOW, ARTWORKS } = require('sharify').data
PartnerShow = require '../../../models/partner_show.coffee'
ShareView = require '../../../components/share/view.coffee'
initCarousel = require '../../../components/merry_go_round/index.coffee'
ArtworkColumnsView = require '../../../components/artwork... | Attach a Zoom modal for carousel images | Attach a Zoom modal for carousel images
| CoffeeScript | mit | erikdstock/force,dblock/force,mzikherman/force,joeyAghion/force,mzikherman/force,erikdstock/force,erikdstock/force,damassi/force,damassi/force,artsy/force-public,dblock/force,kanaabe/force,kanaabe/force,artsy/force-public,artsy/force,eessex/force,artsy/force,cavvia/force-1,cavvia/force-1,kanaabe/force,joeyAghion/force,... |
646c238ce588acbf21f1450f6bde145d1f9ff627 | js/tests/inner-tests.coffee | js/tests/inner-tests.coffee | j = @jasmine.getEnv()
j.describe "circle test suite", ->
j.it 'should increment a variable', ->
@expect(1).toEqual 1
| j = @jasmine.getEnv()
j.describe "trailingSlash", ->
j.it 'should remove trailing slashes', ->
@expect(stripTrailingSlash('/gh/a/b/')).toEqual '/gh/a/b'
j.it 'shouldnt remove non-trailing slashes', ->
@expect(stripTrailingSlash('/gh/a/b/edit')).toEqual '/gh/a/b/edit'
j.it 'shouldnt delete root variable... | Add tests for trailingSlash - first problem, wrong scope for tests | Add tests for trailingSlash - first problem, wrong scope for tests
| CoffeeScript | epl-1.0 | circleci/frontend,circleci/frontend,circleci/frontend,prathamesh-sonpatki/frontend,RayRutjes/frontend,RayRutjes/frontend,prathamesh-sonpatki/frontend |
36237b0ac2253dd3e27e281bdd6a1285ef61bf80 | Gruntfile.coffee | Gruntfile.coffee | path = require 'path'
require 'LiveScript'
module.exports = (grunt) ->
gruntConfig =
pkg: grunt.file.readJSON 'package.json'
grunt.file.expand(
{filter: 'isFile'},
['./grunt/config/**', './grunt/userconfig/**']
).forEach (filename) ->
key = path.basename filename, '.ls'
gruntConfig[key] = re... | path = require 'path'
require 'LiveScript'
module.exports = (grunt) ->
# Initialize the config with the only thing we know.
grunt.config.init
pkg: grunt.file.readJSON 'package.json'
# Assume all files under `grunt/config` and `grunt/userconfig`
# are config files.
grunt.file.expand(
{filter: 'isFile... | Add support for build config functions | Add support for build config functions
Grunt is now configured as we read the config modules. Those can now
return functions instead of objects; the functions are called with the
`grunt` object so they can use already-processed config.
| CoffeeScript | mpl-2.0 | AluisioASG/ottermap,AluisioASG/ottermap,AluisioASG/ottermap |
b6da7f3b0ec5619f414cea8b2455adab2cb9f4d6 | Gruntfile.coffee | Gruntfile.coffee | module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON('package.json')
coffee:
compile:
files:
'select.js': 'select.coffee'
'docs/welcome/js/welcome.js': 'docs/welcome/coffee/welcome.coffee'
watch:
coffee:
files: ['*.coffee', 'sass/*', 'docs/... | module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON('package.json')
coffee:
compile:
files:
'select.js': 'select.coffee'
'docs/welcome/js/welcome.js': 'docs/welcome/coffee/welcome.coffee'
watch:
coffee:
files: ['*.coffee', 'sass/*', 'docs/... | Put bower grunt task first | Put bower grunt task first
| CoffeeScript | mit | PeterDaveHello/select,dieface/select,HubSpot/select,pigult/select |
bb6ef0fbeb3c665ef5a947f842f55021a1f3a48a | app/assets/javascripts/workbench/workbench/views/datastream/chart_view.js.coffee | app/assets/javascripts/workbench/workbench/views/datastream/chart_view.js.coffee | class Workbench.Views.DatastreamChartView extends Backbone.View
initialize: ->
render: ->
@chart = @$el.GeocensChart
datastream: @model
this
| class Workbench.Views.DatastreamChartView extends Backbone.View
initialize: ->
render: ->
@chart = @$el.GeocensChart
datastream: @model
chart:
rangeSelector:
selected: 4
buttons: [{
type: 'minute'
count: 120
text: "2... | Update range selector on charts | Update range selector on charts
| CoffeeScript | mit | GeoSensorWebLab/Arctic-Scholar-Portal,GeoSensorWebLab/Arctic-Scholar-Portal,GeoSensorWebLab/asw-workbench,GeoSensorWebLab/asw-workbench,GeoSensorWebLab/asw-workbench |
afcabaf259a7afc10ab25779baafffdb6a81ea27 | src/code/views/proto-node-view.coffee | src/code/views/proto-node-view.coffee | {div, img} = React.DOM
module.exports = React.createClass
displayName: 'ProtoNode'
componentDidMount: ->
$(@refs.node.getDOMNode()).draggable
drag: @doMove
revert: true
helper: 'clone'
revertDuration: 0
opacity: 0.35
appendTo: 'body'
zIndex: 1000
doMove: -> undefi... | {div, img} = React.DOM
module.exports = React.createClass
displayName: 'ProtoNode'
componentDidMount: ->
reactSafeClone = (e) ->
clone = $(@).clone(false)
clone.attr('data-reactid', null)
clone.find("*").each (i,v) ->
$(v).attr('data-reactid', null)
clone
$(@refs.node.getD... | Fix "unequal nodes with the same `data-reactid`:" errors in console. | Fix "unequal nodes with the same `data-reactid`:" errors in console.
| CoffeeScript | mit | concord-consortium/building-models,concord-consortium/building-models,concord-consortium/building-models,concord-consortium/building-models,concord-consortium/building-models |
959702ba40fb0dac981b2ff8adbe082ce15c3acf | client/views/admin.coffee | client/views/admin.coffee | Template.admin.servers = ->
servers.find()
Template.admin.events
"click .servt tr": ->
Router.go Router.routes["adminServer"].path {id: @_id}
Template.adminServer.events
"click .sdBtn": ->
id = @_id
console.log "Requesting host shutdown for "+id
Meteor.call "shutdownHost", id, (err, res)->
i... | Template.admin.servers = ->
servers.find()
Template.admin.events
"click .servt tr": ->
Router.go Router.routes["adminServer"].path {id: @_id}
Template.adminServer.events
"click .sdBtn": ->
id = @_id
if !confirm 'Are you sure you want to shut down '+@ip+"?"
return
console.log "Requesting host... | Add confirm for server shutdown | Add confirm for server shutdown
| CoffeeScript | apache-2.0 | paralin/D2ModdinMeteor,paralin/D2ModdinMeteor |
37b23434099249e387ff84b4f6ec3be543d831f2 | keymaps/symbols-view.cson | keymaps/symbols-view.cson | '.editor':
'ctrl-j': 'symbols-view:toggle-file-symbols'
'meta-.': 'symbols-view:go-to-declaration'
'body':
'ctrl-J': 'symbols-view:toggle-project-symbols'
| '.editor':
'meta-r': 'symbols-view:toggle-file-symbols'
'meta-.': 'symbols-view:go-to-declaration'
'body':
'meta-R': 'symbols-view:toggle-project-symbols'
| Change interferring keybindings when toggeling | Change interferring keybindings when toggeling
Fixes #6
| CoffeeScript | mit | rodumani/symbols-view,changjej/symbols-view,kainwinterheart/symbols-view,harai/atom-gnu-global,spencerlyon2/symbols-view,changjej/symbols-view,rodumani/symbols-view,harai/atom-gnu-global,spencerlyon2/symbols-view,atom/symbols-view |
1c3691c673a34a519a7423ead7847ebd51d97263 | client/views/voltagePage.coffee | client/views/voltagePage.coffee | editor = new Voltage.Editor
Deps.autorun ->
if Meteor.user()
Meteor.call 'isVoltageAuthorized', (err, authorized) ->
Session.set 'isVoltageAuthorized', authorized
else
Session.set 'isVoltageAuthorized', false
Template.voltagePage.helpers
isVoltageAuthorized: ->
editor.renderData()
Session... | editor = new Voltage.Editor
Deps.autorun ->
if Meteor.user()
Meteor.call 'isVoltageAuthorized', (err, authorized) ->
Session.set 'isVoltageAuthorized', authorized
else
Session.set 'isVoltageAuthorized', false
Template.voltagePage.helpers
isVoltageAuthorized: ->
editor.renderData()
Session... | Check for rendered HTML before rendering in client | Check for rendered HTML before rendering in client | CoffeeScript | mit | Differential/meteor-voltage |
7da6acfec879ab1fdcc5fc4c944dd280f845667f | lib/imgur2rss.coffee | lib/imgur2rss.coffee | #!/usr/bin/env coffee
RSS = require 'rss'
escape = require 'escape-html'
request = require 'request'
API_ENDPOINT = 'https://api.imgur.com/3/'
get = (clientId, path, query, cb) ->
request {
url: API_ENDPOINT + path
method: 'get'
qs: query
json: true
headers:
Authorization: "Client-ID #{ c... | #!/usr/bin/env coffee
RSS = require 'rss'
escape = require 'escape-html'
request = require 'request'
API_ENDPOINT = 'https://api.imgur.com/3/'
get = (clientId, path, query, cb) ->
request {
url: API_ENDPOINT + path
method: 'get'
qs: query
json: true
headers:
Authorization: "Client-ID #{ c... | Set feed TTL to 12 hours. | Set feed TTL to 12 hours.
| CoffeeScript | unlicense | statico/imgur2rss |
fe988e623bab94eb160586f93023088dd7f08dd0 | engines/standard_tasks/app/assets/javascripts/standard_tasks/controllers/funder_controller.js.coffee | engines/standard_tasks/app/assets/javascripts/standard_tasks/controllers/funder_controller.js.coffee | ETahi.FunderController = Ember.ObjectController.extend ETahi.SavesDelayed,
allAuthors: null
fundedAuthors: Em.computed.alias('model.authors')
addingAuthor: null
initAuthors: (->
@set('allAuthors', @get('task.paper.authors'))
).on('init').observes('task.paper.authors')
actions:
funderDidChange: ->
... | ETahi.FunderController = Ember.ObjectController.extend ETahi.SavesDelayed,
allAuthors: null
fundedAuthors: Em.computed.alias('model.authors')
addingAuthor: null
initAuthors: (->
@set('allAuthors', @get('task.paper.authors'))
).on('init').observes('task.paper.authors')
actions:
funderDidChange: ->
... | Remove unused group from funding disclosure | Remove unused group from funding disclosure | CoffeeScript | mit | johan--/tahi,johan--/tahi,johan--/tahi,johan--/tahi |
de1d6ba9ea55a5044d3ebb945bd69232282968ff | assets/game_state.coffee | assets/game_state.coffee | class GameState
customers: []
agents: []
requestQueues: {}
tickables: []
tick: 0
money: 1000000
reputation: 0.5
agent_spawner = AgentSpawner()
addAgent: (agent) ->
@agents.append(agent)
fireAgent: (agent) ->
@agents.pop(agent)
calculateReputation: ->
totalWorth = 0
totalRep =... | class GameState
customers: []
agents: []
requestQueues: {}
tickables: []
tick: 0
money: 1000000
reputation: 0.5
agentSpawner: AgentSpawner()
addAgent: (agent) ->
@agents.append(agent)
fireAgent: (agent) ->
@agents.pop(agent)
calculateReputation: ->
totalWorth = 0
totalRep = 0... | Fix agentSpawner declaration in game state | Fix agentSpawner declaration in game state
| CoffeeScript | mit | guts2014/TEAM-NAME-PHP,guts2014/TEAM-NAME-PHP |
e95778c703f656ee8d0183004809be229d7017e7 | services/web/public/coffee/ide/AutoCompileOnboardingController.coffee | services/web/public/coffee/ide/AutoCompileOnboardingController.coffee | define [
"base"
], (App) ->
App.controller "AutoCompileOnboardingController", ($scope) ->
recompileBtn = angular.element('#recompile')
popover = angular.element('.onboarding__autocompile')
{ top, left } = recompileBtn.offset()
# If pdf panel smaller than recompile button + popover, show to left.
# Otherwis... | define [
"base"
], (App) ->
App.controller "AutoCompileOnboardingController", ($scope, event_tracking) ->
recompileBtn = angular.element('#recompile')
popover = angular.element('.onboarding__autocompile')
{ top, left } = recompileBtn.offset()
# If pdf panel smaller than recompile button + popover, show to le... | Fix event tracking not being injecting | Fix event tracking not being injecting
| CoffeeScript | agpl-3.0 | sharelatex/sharelatex |
b4d94d8d41090684e7bbb67b4775d700807b589d | angular/core/components/profile_page/profile_page_controller.coffee | angular/core/components/profile_page/profile_page_controller.coffee | angular.module('loomioApp').controller 'ProfilePageController', ($rootScope, Records, FormService, $location, AbilityService, ModalService, ChangePictureForm, ChangePasswordForm, DeactivateUserForm, $translate, Session, AppConfig, DeactivationModal) ->
$rootScope.$broadcast('currentComponent', { page: 'profilePage'})... | angular.module('loomioApp').controller 'ProfilePageController', ($rootScope, Records, FormService, $location, AbilityService, ModalService, ChangePictureForm, ChangePasswordForm, DeactivateUserForm, $translate, Session, AppConfig, DeactivationModal) ->
$rootScope.$broadcast('currentComponent', { page: 'profilePage'})... | Clone user properly for profile page | Clone user properly for profile page
| CoffeeScript | agpl-3.0 | piratas-ar/loomio,loomio/loomio,piratas-ar/loomio,piratas-ar/loomio,loomio/loomio,loomio/loomio,loomio/loomio,piratas-ar/loomio |
18bb33c80900cb44593a39f4cadc1d9835827eb6 | app/scripts/config.coffee | app/scripts/config.coffee | requirejs.config
baseUrl: '/scripts'
paths:
'underscore': '../bower_components/underscore/underscore'
'jquery': '../bower_components/jquery/jquery'
'backbone': '../bower_components/backbone/backbone'
'backbone.routefilter': '../bower_components/backbone-route-filter/backbone-route-filter'
'backb... | requirejs.config
baseUrl: '/scripts'
paths:
'underscore': '../bower_components/underscore/underscore'
'jquery': '../bower_components/jquery/jquery'
'backbone': '../bower_components/backbone/backbone'
'backbone.routefilter': '../bower_components/backbone-route-filter/backbone-route-filter'
'backb... | Remove exports for Backbonejs & Marionettejs since we use AMD versions | Remove exports for Backbonejs & Marionettejs since we use AMD versions
| CoffeeScript | mit | fs/backbone-base,fs/backbone-base,fs/backbone-base |
6a6bfe0e32320fa5c2497d37136d874ca473bb20 | app/assets/javascripts/pages.js.coffee | app/assets/javascripts/pages.js.coffee | @['pages#home'] = (data) ->
handler = Gmaps.build('Google')
handler.buildMap
provider:
center:
lat: 39
lng: -101
zoom: 4
internal:
id: 'home-map-jumbotron'
->
handler.addMarkers markersJSON
@['pages#sponsor'] = (data) ->
handler = Gmaps.build('Google')
handl... | @['pages#home'] = (data) ->
handler = Gmaps.build('Google')
handler.buildMap
provider:
center:
lat: 39
lng: -101
zoom: 4
scrollwheel: false
internal:
id: 'home-map-jumbotron'
->
handler.addMarkers markersJSON
@['pages#sponsor'] = (data) ->
handler = Gmap... | Revert "show scrollbar on maps" | Revert "show scrollbar on maps"
This reverts commit 54267e3a2556919b841cd1c668b55c73e1d8a374.
| CoffeeScript | mit | hackedu/website,zachlatta/website,hackedu/website,hackedu/website,zachlatta/website,zachlatta/website |
c37cfdf3af18dfb3c1de8157311bd1022b4d5964 | atom/packages.cson | atom/packages.cson | packages: [
"editorconfig"
"file-icons"
"highlight-selected"
"linter"
"linter-coffeelint"
"linter-csslint"
"linter-flake8"
"linter-htmlhint"
"linter-js-yaml"
"linter-jshint"
"linter-jsonlint"
"linter-less"
"linter-php"
"linter-scss-lint"
"linter-shellcheck"
"linter-xmllint"
"minimap"
... | packages: [
"editorconfig"
"file-icons"
"highlight-selected"
"linter"
"linter-coffeelint"
"linter-csslint"
"linter-flake8"
"linter-htmlhint"
"linter-js-yaml"
"linter-jshint"
"linter-jsonlint"
"linter-less"
"linter-php"
"linter-scss-lint"
"linter-shellcheck"
"linter-xmllint"
"minimap"
... | Remove terminal-plus package from Atom | Remove terminal-plus package from Atom
| CoffeeScript | mit | jmlntw/dotfiles,jmlntw/dotfiles |
29f3429e42cbcaa1fe98a5583db298cff5a627a8 | atom/packages.cson | atom/packages.cson | packages: [
"advanced-open-file"
"atom-react-native-autocomplete"
"auto-indent"
"autocomplete-modules"
"emmet"
"expand-region"
"file-icons"
"git-diff-popup"
"git-plus"
"git-time-machine"
"hyperclick"
"incremental-search"
"js-hyperclick"
"language-javascript-jsx"
"linter"
"linter-eslint"
... | packages: [
"advanced-open-file"
"atom-react-native-autocomplete"
"auto-indent"
"autocomplete-modules"
"emmet-simplified"
"expand-region"
"file-icons"
"git-diff-popup"
"git-plus"
"git-time-machine"
"hyperclick"
"incremental-search"
"js-hyperclick"
"language-javascript-jsx"
"linter"
"lint... | Switch from emmet to emmet-simplified | Switch from emmet to emmet-simplified
This avoids numerous key-binding conflicts
| CoffeeScript | mit | randycoulman/dotfiles |
db6692b2f69de37413803dea949c8e4678997ee7 | src/stdlib/child-process.coffee | src/stdlib/child-process.coffee | # node.js child-process
# http://nodejs.org/docs/v0.6.3/api/child_processes.html
$ = require 'jquery'
_ = require 'underscore'
module.exports =
class ChildProccess
@exec: (command, options={}) ->
deferred = $.Deferred()
if options.bufferLines
options.stdout = @bufferLines(options.stdout) if options.s... | # node.js child-process
# http://nodejs.org/docs/v0.6.3/api/child_processes.html
$ = require 'jquery'
_ = require 'underscore'
module.exports =
class ChildProccess
@exec: (command, options={}) ->
deferred = $.Deferred()
if options.bufferLines
options.stdout = @bufferLines(options.stdout) if options.s... | Fix the $native.exec callback in ChildProcess.exec | Fix the $native.exec callback in ChildProcess.exec
It's stderr, not stdin. Also we have to look at exitStatus, not error to see if the process failed. None of this is tested, which is bad. | CoffeeScript | mit | MjAbuz/atom,vjeux/atom,AlbertoBarrago/atom,nucked/atom,abcP9110/atom,gzzhanghao/atom,vinodpanicker/atom,ralphtheninja/atom,n-riesco/atom,lisonma/atom,dijs/atom,prembasumatary/atom,Austen-G/BlockBuilder,fscherwi/atom,jordanbtucker/atom,gzzhanghao/atom,hharchani/atom,fedorov/atom,brettle/atom,deepfox/atom,me-benni/atom,J... |
a90624ea378a5c13803dcdcf0b0a266d25a29a64 | template/base/app/helpers.coffee | template/base/app/helpers.coffee | class exports.BrunchApplication
constructor: ->
jQuery =>
@initialize this
Backbone.history.start()
initialize: ->
null
| class exports.BrunchApplication
constructor: ->
$ =>
@initialize this
Backbone.history.start()
initialize: ->
null
| Use jQuery symbol in template instead of name. | Use jQuery symbol in template instead of name.
This would allow to support zepto etc.
| CoffeeScript | mit | PeterDaveHello/brunch,rlugojr/brunch,ondreian/brunch,brunch/brunch,hayesgm/brunch,kidaa/brunch,Flaise/brunch,hellyeahllc/brunch,lalomartins/brunch,justinwoo/brunch |
3b037bab6d8c1ac9142509a35be6c64ab9e6aefc | apps/user/queries/profile.coffee | apps/user/queries/profile.coffee | module.exports =
"""
query user($id: ID! $per: Int, $page: Int, $perBlocks: Int, $q: String, $sort: SearchSorts, $seed: Int) {
user(id: $id) {
contents(per: $per, type: "channel", page: $page, q: $q, sort_by: $sort, seed: $seed) {
title(truncate: 50)
updated_at(relative: true)
us... | module.exports =
"""
query user($id: ID! $per: Int, $page: Int, $perBlocks: Int, $q: String, $sort: SearchSorts, $seed: Int) {
user(id: $id) {
contents(per: $per, type: "channel", page: $page, q: $q, sort_by: $sort, seed: $seed) {
title(truncate: 50)
updated_at(relative: true)
us... | Sort blocks in channels view by position | Sort blocks in channels view by position
| CoffeeScript | mit | aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell |
3fc1c47c87164c9a755b39bd298ef305014f1a16 | atom/packages.cson | atom/packages.cson | packages: [
"advanced-open-file"
"atom-alignment"
"atom-beautify"
"atom-transpose"
"change-case"
"color-picker"
"docblockr"
"editorconfig"
"emmet"
"expand-region"
"git-blame"
"language-apache"
"language-applescript"
"language-awk"
"language-babel"
"language-diff"
"language-env"
"lang... | packages: [
"advanced-open-file"
"atom-alignment"
"atom-beautify"
"atom-transpose"
"change-case"
"color-picker"
"docblockr"
"editorconfig"
"emmet"
"expand-region"
"git-blame"
"language-apache"
"language-applescript"
"language-awk"
"language-babel"
"language-diff"
"language-env"
"lang... | Add LaTeX grammar to Atom | Add LaTeX grammar to Atom
| CoffeeScript | mit | caleb531/dotfiles,caleb531/dotfiles,caleb531/dotfiles,caleb531/dotfiles |
6641a8ff2721bcbb689f5517729e1f3f22ba4825 | atom/snippets.cson | atom/snippets.cson | ".source.ruby":
"Hashrocket":
prefix: "="
body: " => "
".source.coffee":
"Describe block":
prefix: "de"
body: """
describe "${1:description}", ->
${2:body}
"""
"It block":
prefix: "i"
body: """
it "$1", ->
$2
"""
"Before each":
prefix: "be"
bo... | ".source.ruby":
"Hashrocket":
prefix: "="
body: " => "
"Test block":
prefix: "test"
body: """
test "$1" do
$2
end
"""
".source.coffee":
"Describe block":
prefix: "de"
body: """
describe "${1:description}", ->
${2:body}
"""
"It block":
prefi... | Add Ruby snippet for test blocks | Add Ruby snippet for test blocks
| CoffeeScript | mit | jasonrudolph/dotfiles,jasonrudolph/dotfiles,jasonrudolph/dotfiles,jasonrudolph/dotfiles |
ee20dfc9672999e176cad2ef25fde3205ee4525f | app/assets/javascripts/directives/kassa_state_toggle.coffee | app/assets/javascripts/directives/kassa_state_toggle.coffee | angular.module('kassa').directive('kassaStateToggle',[
'$location'
($location)->
linker = ($scope, $element, $attrs)->
stateKey = $attrs.kassaStateToggle
defaultValue = $attrs.kassaStateDefault || false
unless $location.search()[stateKey]?
$location.search stateKey, defaultValue
... | angular.module('kassa').directive('kassaStateToggle',[
'$location'
($location)->
linker = ($scope, $element, $attrs)->
stateKey = $attrs.kassaStateToggle
defaultValue = $attrs.kassaStateDefault || false
unless $location.search()[stateKey]?
$location.search(stateKey, defaultValue).repla... | Fix kassaStateToggle adding an extra history token on defaultValue | Fix kassaStateToggle adding an extra history token on defaultValue
| CoffeeScript | mit | flipflops/kassa,flipflops/kassa |
bd1e1104a07c80884475cfff3cb9a272366176df | lib/image-editor-status-view.coffee | lib/image-editor-status-view.coffee | {View} = require 'atom'
ImageEditor = require './image-editor'
module.exports =
class ImageEditorStatusView extends View
@content: ->
@div class: 'status-image inline-block', =>
@span class: 'image-size', outlet: 'imageSizeStatus'
initialize: (filePath, image) =>
@filePath = filePath
@image = im... | {View} = require 'atom'
ImageEditor = require './image-editor'
module.exports =
class ImageEditorStatusView extends View
@content: ->
@div class: 'status-image inline-block', =>
@span class: 'image-size', outlet: 'imageSizeStatus'
initialize: (filePath, image) =>
@filePath = filePath
@image = im... | Detach from status bar when pane removed | Detach from status bar when pane removed
| CoffeeScript | mit | atom/image-view |
cf3f837a15d9c5f242dd6c5bb29e503618c3c576 | app/pages/lab/field-guide/article-list-item.cjsx | app/pages/lab/field-guide/article-list-item.cjsx | React = require 'react'
createReactClass = require 'create-react-class'
CroppedImage = require '../../../components/cropped-image'
ArticleListItem = createReactClass
getDefaultProps: ->
icon: null
title: ''
onClick: ->
render: ->
<button type="button" className="field-guide-editor-article-button" ... | React = require 'react'
createReactClass = require 'create-react-class'
CroppedImage = require('../../../components/cropped-image').default
ArticleListItem = createReactClass
getDefaultProps: ->
icon: null
title: ''
onClick: ->
render: ->
<button type="button" className="field-guide-editor-article... | Fix CroppedImage require in ArticleListItem | Fix CroppedImage require in ArticleListItem
| CoffeeScript | apache-2.0 | amyrebecca/Panoptes-Front-End,zooniverse/Panoptes-Front-End,amyrebecca/Panoptes-Front-End,amyrebecca/Panoptes-Front-End |
5bb419ef7b9cfbfea4de673ec3efa08dbbc3d6ad | app/routes/dashboard/repositories.coffee | app/routes/dashboard/repositories.coffee | `import Ember from 'ember'`
`import TravisRoute from 'travis/routes/basic'`
`import config from 'travis/config/environment'`
Route = TravisRoute.extend
queryParams:
filter: { replace: true }
model: ->
apiEndpoint = config.apiEndpoint
$.ajax(apiEndpoint + '/v3/repos?repository.active=true', {
head... | `import Ember from 'ember'`
`import TravisRoute from 'travis/routes/basic'`
`import config from 'travis/config/environment'`
Route = TravisRoute.extend
queryParams:
filter: { replace: true }
model: ->
apiEndpoint = config.apiEndpoint
$.ajax(apiEndpoint + '/v3/repos?repository.active=true', {
head... | Sort repos explicitly on dashboard | Sort repos explicitly on dashboard
| CoffeeScript | mit | 2947721120/travis-web,fauxton/travis-web,mjlambert/travis-web,travis-ci/travis-web,fauxton/travis-web,Tiger66639/travis-web,fauxton/travis-web,jlrigau/travis-web,mjlambert/travis-web,jlrigau/travis-web,travis-ci/travis-web,fotinakis/travis-web,Tiger66639/travis-web,mjlambert/travis-web,fotinakis/travis-web,2947721120/t... |
2e99f68cfaa3888eda753cf988774940d454a55c | src/smc-webapp/register-editors.coffee | src/smc-webapp/register-editors.coffee | ###
Register all the editors.
One you add a new built in editor, it should go here.
###
# Require each module, which loads a file editor. These call register_file_editor.
# This should be a comprehensive list of all React editors
# require('./editor_terminal')
require('./chat/register')
require('./editor_archive')
... | ###
Register all the editors.
One you add a new built in editor, it should go here.
###
# Require each module, which loads a file editor. These call register_file_editor.
# This should be a comprehensive list of all React editors
# require('./editor_terminal')
require('./chat/register')
require('./editor_archive')
... | Switch to ts course with one line | Switch to ts course with one line
| CoffeeScript | agpl-3.0 | tscholl2/smc,sagemathinc/smc,tscholl2/smc,tscholl2/smc,tscholl2/smc,DrXyzzy/smc,sagemathinc/smc,sagemathinc/smc,DrXyzzy/smc,DrXyzzy/smc,DrXyzzy/smc,sagemathinc/smc,tscholl2/smc |
07c7dffcc7185a532a8a813808806fe8b37c6ce1 | engines/upload_manuscript/app/assets/javascripts/upload_manuscript/controllers/overlays/upload_manuscript_overlay_controller.js.coffee | engines/upload_manuscript/app/assets/javascripts/upload_manuscript/controllers/overlays/upload_manuscript_overlay_controller.js.coffee | ETahi.UploadManuscriptOverlayController = ETahi.TaskController.extend
manuscriptUploadUrl: (->
"/papers/#{@get('litePaper.id')}/upload"
).property('litePaper.id')
isUploading: false
isProcessing: false
uploadProgress: 0
showProgress: true
actions:
uploadStarted: ->
@set('isUploading', true... | ETahi.UploadManuscriptOverlayController = ETahi.TaskController.extend
manuscriptUploadUrl: (->
"/papers/#{@get('litePaper.id')}/upload"
).property('litePaper.id')
isUploading: false
isProcessing: false
uploadProgress: 0
showProgress: true
isEditable: (->
!@get('paper.lockedBy') && (@get('isUserE... | Disable upload manuscript overlay when the paper is being edited. | Disable upload manuscript overlay when the paper is being edited.
| CoffeeScript | mit | johan--/tahi,johan--/tahi,johan--/tahi,johan--/tahi |
8dbc5762202fabedf35bd714acbe84195667aa7d | test/spec/controllers/node_tool.coffee | test/spec/controllers/node_tool.coffee | define [
'controllers/node_tool'
'models/commands/commander'
], (NodeTool, Commander) ->
class MockContainer
addNode: ->
class MockDrawing extends MockContainer
select: (item) ->
@selection = [item]
clearSelection: ->
@selection = []
describe 'NodeTool', ->
befo... | define [
'controllers/node_tool'
'models/commands/commander'
], (NodeTool, Commander) ->
class MockContainer
addNode: ->
class MockDrawing extends MockContainer
select: (item) ->
@selection = [item]
clearSelection: ->
@selection = []
describe 'NodeTool', ->
befo... | Fix spec broken in previous commit (bdcf0c64). | Fix spec broken in previous commit (bdcf0c64).
| CoffeeScript | epl-1.0 | louismrose/eugenia-live,louismrose/eugenia-live |
0e6f0ab6cfb607c969e52fc86bff9f82ebe01081 | test/src/system/attachment_test.coffee | test/src/system/attachment_test.coffee | editorModule "Attachments", template: "editor_with_image"
editorTest "moving an image by drag and drop", (expectDocument) ->
typeCharacters "!", ->
moveCursor direction: "right", times: 1, (coordinates) ->
img = document.activeElement.querySelector("img")
triggerEvent(img, "mousedown")
after 1,... | editorModule "Attachments", template: "editor_with_image"
editorTest "moving an image by drag and drop", (expectDocument) ->
typeCharacters "!", ->
moveCursor direction: "right", times: 1, (coordinates) ->
img = document.activeElement.querySelector("img")
triggerEvent(img, "mousedown")
after 1,... | Test editing image attachment caption | Test editing image attachment caption
| CoffeeScript | mit | urossmolnik/trix,basecamp/trix,GabiGrin/trix,urossmolnik/trix,basecamp/trix,basecamp/trix,ChenMichael/trix,basecamp/trix,ChenMichael/trix,ChenMichael/trix,urossmolnik/trix,GabiGrin/trix,GabiGrin/trix |
88ab4621a8e98bca02eaf92c6bc5b6648b5e7a31 | test/support/test_helpers.coffee | test/support/test_helpers.coffee | Walrus = require '../../bin/walrus'
fs = require 'fs'
path = require 'path'
exec = require( 'child_process' ).exec
TestHelpers =
read : ( filename ) -> fs.readFileSync filename, 'utf8' if path.existsSync filename
pass : ( specs, suffix='' ) ->
for file in fs.readdirSync specs when path.extname( file ) is... | Walrus = require '../../bin/walrus'
fs = require 'fs'
path = require 'path'
exec = require( 'child_process' ).exec
TestHelpers =
read : ( filename ) -> fs.readFileSync filename, 'utf8' if path.existsSync filename
pass : ( specs, suffix='' ) ->
for file in fs.readdirSync specs when path.extname( file ) is... | Make test helpers print out the correct spec name | Make test helpers print out the correct spec name
| CoffeeScript | mit | jeremyruppel/walrus |
e569a230561e3eb135aede803d49ddaa64d4a439 | atom/packages.cson | atom/packages.cson | packages: [
"advanced-open-file"
"atom-alignment"
"atom-beautify"
"atom-transpose"
"change-case"
"color-picker"
"docblockr"
"editorconfig"
"emmet"
"expand-region"
"language-apache"
"language-applescript"
"language-awk"
"language-babel"
"language-diff"
"language-env"
"language-gitattrib... | packages: [
"advanced-open-file"
"atom-alignment"
"atom-beautify"
"atom-transpose"
"change-case"
"color-picker"
"docblockr"
"editorconfig"
"emmet"
"expand-region"
"language-apache"
"language-applescript"
"language-awk"
"language-babel"
"language-diff"
"language-env"
"language-gitattrib... | Uninstall swap-selection package for atom | Uninstall swap-selection package for atom
| CoffeeScript | mit | caleb531/dotfiles,caleb531/dotfiles,caleb531/dotfiles,caleb531/dotfiles |
38db6d0170fa2883c15e487398329c58e9917f6e | 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 bug in event handlers calling | Fix bug in event handlers calling
| CoffeeScript | mit | eugene-bulkin/game-library,eugene-bulkin/game-library |
582b3ce9ab8867569c9771361540985536235b90 | scripts/resume.coffee | scripts/resume.coffee | module.exports = (robot) ->
names = ['Dana', 'Freia', 'Jhishan', 'Kyle', 'Brenton', 'Terri', 'Abhi', 'Drew']
robot.hear /Resume queen, who is next?/i, (res) ->
res.send res.random names
| module.exports = (robot) ->
names = ['Dana', 'Freia', 'Jhishan', 'Kyle', 'Brenton', 'Terri', 'Abhi', 'Drew']
robot.hear /Resume queen, who is next\?/i, (res) ->
res.send res.random names
| Add \ before question mark | Add \ before question mark
| CoffeeScript | mit | TechAtNYU/hubu |
535158e3459d8ce1d48a7bde21c04d3ee4611e65 | app/video_socket_io.coffee | app/video_socket_io.coffee | module.exports = (app, server) ->
authMiddleware = require('./middleware/authentication')
models = require '../models'
app.io = require('socket.io')(server)
redisClient = require('./redis_client')()
respondSocketError = (next, err) ->
console.error "Socket failed to connect", err
next(new Error('not... | module.exports = (app, server) ->
authMiddleware = require('./middleware/authentication')
models = require '../models'
app.io = require('socket.io')(server)
redisClient = require('./redis_client')()
respondSocketError = (next, err) ->
console.error "Socket failed to connect", err
next(new Error('not... | Fix video indicator not showing anonymously on public leagues | Fix video indicator not showing anonymously on public leagues
| CoffeeScript | mit | RedBulli/LiveSnooker-Server,RedBulli/LiveSnooker-Server |
8f17fbb02c060b8ef8b4ca61e4eedaa839f66b2a | lib/models/diffs/diff.coffee | lib/models/diffs/diff.coffee | DiffChunk = require './diff-chunk'
List = require '../list'
_ = require 'underscore'
##
# A diff is a whole-file diff, and is broken into a list of chunks. End-game
# here is to be able to stage individual chunks, not just the whole diff.
#
module.exports =
class Diff extends List
model: DiffChunk
is_sublist: tru... | DiffChunk = require './diff-chunk'
List = require '../list'
_ = require 'underscore'
##
# A diff is a whole-file diff, and is broken into a list of chunks. End-game
# here is to be able to stage individual chunks, not just the whole diff.
#
module.exports =
class Diff extends List
model: DiffChunk
is_sublist: tru... | Fix type error upon completed commit | Fix type error upon completed commit
| CoffeeScript | mit | tomekwi/atomatigit,aki77/atomatigit |
050ef137bddb9c4b4ac7c2e93450642d3e0269cf | keymaps/rails.cson | keymaps/rails.cson | # Keybindings require three things to be fully defined: A selector that is
# matched against the focused element, the keystroke and the command to
# execute.
#
# Below is a basic keybinding which registers on all platforms by applying to
# the root workspace element.
# For more detailed documentation see
# https://ato... | # Keybindings require three things to be fully defined: A selector that is
# matched against the focused element, the keystroke and the command to
# execute.
#
# Below is a basic keybinding which registers on all platforms by applying to
# the root workspace element.
# For more detailed documentation see
# https://ato... | Fix deprecated selectors in the keymap | Fix deprecated selectors in the keymap
| CoffeeScript | mit | strikingcode/rails-navigation,fotanus/rails-navigation,strikingcode/rails-navigation,strikingcode/rails-navigation,fotanus/rails-navigation,fotanus/rails-navigation |
771f834a623a54551e1688e2e65192cf2f5711ca | tutorial/test/Logger.test.coffee | tutorial/test/Logger.test.coffee | chai = require("chai")
should = chai.should()
mock = require("TinyMockJS").mock
Logger = require("../src/Logger").Logger
fs = require("fs")
describe "Logger", ->
describe "constructor(options)", ->
it "retrieves the log file name from 'options'", ->
mock (options) ->
options.expects("get_lo... | chai = require("chai")
should = chai.should()
mock = require("TinyMockJS")
Logger = require("../src/Logger").Logger
fs = require("fs")
describe "Logger", ->
describe "constructor(options)", ->
it "retrieves the log file name from 'options'", ->
mock (options) ->
options.expects("get_log_fil... | Change 'mock = require("TinyMockJS").mock' to 'mock = require("TinyMockJS")' | Change 'mock = require("TinyMockJS").mock' to 'mock = require("TinyMockJS")'
| CoffeeScript | mit | milewdev/TinyMock.doc,milewdev/TinyMock.doc |
2a1c9b7b409b3923fab3bee49546113e6ddc0ccc | app/assets/javascripts/sounds2.js.coffee | app/assets/javascripts/sounds2.js.coffee | window.Sounds2 = class
sounds:
walk: [0, 0.2]
chop: [1, 1.2]
throw: [2, 2.1]
snowball_hit: [3, 3.4]
drop: [4, 4.2]
pickup: [5, 5.2]
deliver: [6, 6.5]
constructor: ->
@players = []
for i in [0 .. 9] # create 10 players by default
@.createPlayer()
createPlayer: ->
pl... | window.Sounds2 = class
sounds:
walk: [0, 0.2]
chop: [1, 1.2]
throw: [2, 2.1]
snowball_hit: [3, 3.4]
drop: [4, 4.2]
pickup: [5, 5.2]
deliver: [6, 6.5]
constructor: ->
@players = []
for i in [0 .. 9] # create 10 players by default
@.createPlayer()
createPlayer: ->
pl... | Make sounds work both in chrome an firefox | Make sounds work both in chrome an firefox
| CoffeeScript | mit | dekart/ld31,dekart/ld31,dekart/ld31 |
46a6ff52f77210187a8904c3b89f2440e06479ca | spec/util.coffee | spec/util.coffee | module.exports =
openPath: (path, callback) ->
waitsForPromise -> atom.workspace.open(path)
runs ->
callback(atom.views.getView(atom.workspace.getActivePaneItem()))
rowRangeFrom: (marker) ->
[marker.getTailBufferPosition().row, marker.getHeadBufferPosition().row]
| module.exports =
openPath: (path, callback) ->
workspaceElement = atom.views.getView(atom.workspace)
jasmine.attachToDOM(workspaceElement)
waitsForPromise -> atom.workspace.open(path)
runs ->
callback(atom.views.getView(atom.workspace.getActivePaneItem()))
rowRangeFrom: (marker) ->
[mar... | Attach the workspace to the DOM in specs. | Attach the workspace to the DOM in specs.
| CoffeeScript | mit | antcodd/merge-conflicts,smashwilson/merge-conflicts,smashwilson/merge-conflicts |
b75e7ffec6ad345a86da4412d096c047f7d0c646 | gulpfile.coffee | gulpfile.coffee | gulp = require 'gulp'
jshint = require 'gulp-jshint'
coffeelint = require 'gulp-coffeelint'
mocha = require 'gulp-mocha'
runSequence = require 'run-sequence'
# compilers
coffee = require 'gulp-coffee'
gulp.task 'coffee', ->
gulp.src './src/*.coffee'
.pipe coffee()
.pipe gulp.dest './lib'
gulp.task 'coffeel... | gulp = require 'gulp'
jshint = require 'gulp-jshint'
coffeelint = require 'gulp-coffeelint'
mocha = require 'gulp-mocha'
runSequence = require 'run-sequence'
# compilers
coffee = require 'gulp-coffee'
gulp.task 'coffee', ->
gulp.src './src/*.coffee'
.pipe coffeelint()
.pipe coffeelint.reporter()
.pipe c... | Add coffeelint in coffee task | Add coffeelint in coffee task
| CoffeeScript | apache-2.0 | knjcode/autometa,knjcode/autometa |
f62598d8e342a826fd2e7b83b90b1ba689a3670f | client/lib/cordova/keyboard-fix.coffee | client/lib/cordova/keyboard-fix.coffee | if Meteor.isCordova
document.addEventListener 'deviceready', ->
if device?.platform.toLowerCase() isnt 'android'
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
cordova.plugins.Keyboard.disableScroll(true);
window.addEventListener 'native.keyboardshow', ->
if device?.platform.toLowerCase() isnt 'a... | if Meteor.isCordova
document.addEventListener 'deviceready', ->
if device?.platform.toLowerCase() isnt 'android'
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
cordova.plugins.Keyboard.disableScroll(true);
window.addEventListener 'native.keyboardshow', ->
if device?.platform.toLowerCase() isnt 'a... | Fix scroll of login window | Fix scroll of login window
| CoffeeScript | mit | Gudii/Rocket.Chat,timkinnane/Rocket.Chat,jeann2013/Rocket.Chat,OtkurBiz/Rocket.Chat,LearnersGuild/echo-chat,flaviogrossi/Rocket.Chat,amaapp/ama,icaromh/Rocket.Chat,steedos/chat,fatihwk/Rocket.Chat,nishimaki10/Rocket.Chat,4thParty/Rocket.Chat,KyawNaingTun/Rocket.Chat,tlongren/Rocket.Chat,thunderrabbit/Rocket.Chat,tntobi... |
6fa2a81bafb760a2dfff9da3358881ade82f6e11 | services/real-time/app/coffee/DrainManager.coffee | services/real-time/app/coffee/DrainManager.coffee | logger = require "logger-sharelatex"
module.exports =
startDrain: (io, rate) ->
# Clear out any old interval
clearInterval @interval
if rate == 0
return
@interval = setInterval () =>
@reconnectNClients(io, rate)
, 1000
RECONNECTED_CLIENTS: {}
reconnectNClients: (io, N) ->
drainedCount = 0
for c... | logger = require "logger-sharelatex"
module.exports =
startDrain: (io, rate) ->
# Clear out any old interval
clearInterval @interval
if rate == 0
return
@interval = setInterval () =>
@reconnectNClients(io, rate)
, 1000
RECONNECTED_CLIENTS: {}
reconnectNClients: (io, N) ->
drainedCount = 0
for c... | Make breakout logic after draining N clients more clear | Make breakout logic after draining N clients more clear
| CoffeeScript | agpl-3.0 | sharelatex/sharelatex |
91d6de30286cfe6b994a9f03f850fcdbe970a78d | lib/Task/ActivityTask/Download.coffee | lib/Task/ActivityTask/Download.coffee | _ = require "underscore"
Promise = require "bluebird"
stream = require "readable-stream"
Match = require "mtr-match"
ActivityTask = require "../ActivityTask"
Read = require "./Read"
Save = require "./Save"
class Download extends ActivityTask
constructor: (options, dependencies) ->
Match.check dependencies, Match... | _ = require "underscore"
Promise = require "bluebird"
stream = require "readable-stream"
Match = require "mtr-match"
ActivityTask = require "../ActivityTask"
Read = require "./Read"
Save = require "./Save"
class Download extends ActivityTask
constructor: (options, dependencies) ->
Match.check dependencies, Match... | Split options into options and dependencies | Split options into options and dependencies
| CoffeeScript | agpl-3.0 | spirehq/backend-core,skgcorp/core,spirehq/backend-core,fixin-platform/backend-core,fixin-platform/backend-core,skgcorp/core |
6203126151adf9e59415cd93fc3eaebbdc5d3249 | app/assets/asset/pdfViewer.coffee | app/assets/asset/pdfViewer.coffee | 'use strict'
app.directive 'pdfViewer', [
() ->
restrict: 'E'
transclude: true
scope:
asset: '=asset'
link: ($scope, $elem, $attrs,_Controller, $transclude) ->
pdfElement = $elem[0]
objectTag = document.createElement('object')
objectTag.setAttribute('data', $scope.asset.downl... | 'use strict'
app.directive 'pdfViewer', [
() ->
restrict: 'E'
transclude: true
scope:
asset: '=asset'
link: ($scope, $elem, $attrs,_Controller, $transclude) ->
pdfElement = $elem[0]
objectTag = document.createElement('object')
objectTag.setAttribute('data', $scope.asset.downl... | Allow for multiple-element case in the transclude of pdf | Allow for multiple-element case in the transclude of pdf
| CoffeeScript | agpl-3.0 | databrary/databrary,databrary/databrary,databrary/databrary,databrary/databrary |
25e8c1528efe1435d49511ad21d3a961af66239e | lib/action_handlers/action_series.coffee | lib/action_handlers/action_series.coffee | # Given an array of actions, the actions will be called serially.
# The first action is called. If it calls the 'next' function that is passed to it
# the next action in the series is called. This continues until either one of the
# actions does not call 'next' or until the end of the list is reached.
_ = require('un... | # Given an array of actions, the actions will be called serially.
# The first action is called. If it calls the 'next' function that is passed to it
# the next action in the series is called. This continues until either one of the
# actions does not call 'next' or until the end of the list is reached.
_ = require('un... | Resolve "headers already sent" problems on errors. | Resolve "headers already sent" problems on errors.
| CoffeeScript | mit | randymized/malifi |
b95a0adec0d070598145d34217f7666452288a12 | app/assets/javascripts/custom.js.coffee | app/assets/javascripts/custom.js.coffee | $ ->
# Refresh if a page is loaded directly
pageLoad()
# Refresh if a page is loaded via turbolinks
$(document).on "page:load", pageLoad
pageLoad = ->
# Steps to do on a page load (with turbolinks)
# Refresh all ratings on the current page
refreshRatings()
# Refresh for the new event divs that... | $ ->
# Refresh if a page is loaded directly
pageLoad()
# Refresh if a page is loaded via turbolinks
$(document).on "page:load", pageLoad
pageLoad = ->
# Steps to do on a page load (with turbolinks)
# Refresh all ratings on the current page
refreshRatings()
# Refresh for the new event divs that... | Set reaction stars as read only depending on data-readonly attribute. | Set reaction stars as read only depending on data-readonly attribute.
Fixes #10
| CoffeeScript | mit | matthew-parlette/rak,matthew-parlette/rak |
f35bcd79ea30d0e8b7a53971bee32d787cef0355 | core/app/backbone/collections/ndp_evidence_collection.coffee | core/app/backbone/collections/ndp_evidence_collection.coffee | class window.NDPEvidenceCollection extends Backbone.Collection
initialize: (models, options) ->
@on 'change', @sort, @
@fact = options.fact
constructor: (models, options) ->
super
unless models and models.length > 0
@reset [
new OpinionatersEvidence {type: 'believe'}, collection: t... | class window.NDPEvidenceCollection extends Backbone.Collection
initialize: (models, options) ->
@on 'change', @sort, @
@fact = options.fact
constructor: (models, options) ->
super
unless models and models.length > 0
@reset [
new OpinionatersEvidence({type: 'believe' }, fact: @fact),... | Revert "Indeed don't pass the fact but the collection" | Revert "Indeed don't pass the fact but the collection"
This reverts commit dbff5c17b0e8211986e2a0a773e4cdec0afe4880.
| CoffeeScript | mit | Factlink/factlink-core,daukantas/factlink-core,daukantas/factlink-core,daukantas/factlink-core,Factlink/factlink-core,Factlink/factlink-core,daukantas/factlink-core,Factlink/factlink-core |
2a1a7d646d6b30278c372c3fcf1369156072a6a7 | src/main/webapp/coffeescripts-hidden/register.coffee | src/main/webapp/coffeescripts-hidden/register.coffee | stripeCallback = (status, response) ->
if response.error
anchortabSite.validationError("#card-number", response.error.message)
else
$("#stripe-token").val(response.id)
$(".stripe-form").submit()
$(document).ready ->
anchortabSite.event("stripe-form-ready")
$(".plan-selection").on 'change', (event)... | stripeCallback = (status, response) ->
if response.error
anchortabSite.validationError("#card-number", response.error.message)
else
$("#stripe-token").val(response.id)
$(".stripe-form").submit()
$(document).ready ->
anchortabSite.event("stripe-form-ready")
$(".plan-selection").on 'change', (event)... | Select a plan based on a hash provided in URL. | Select a plan based on a hash provided in URL.
| CoffeeScript | apache-2.0 | farmdawgnation/anchortab,farmdawgnation/anchortab,farmdawgnation/anchortab,farmdawgnation/anchortab |
6c3f38a933139899b063771e98e9e8a6d7ea54f2 | src/components/learning-guide/progress-bar.cjsx | src/components/learning-guide/progress-bar.cjsx | React = require 'react'
BS = require 'react-bootstrap'
ChapterSectionType = require './chapter-section-type'
module.exports = React.createClass
displayName: 'LearningGuideProgressBar'
propTypes:
section: React.PropTypes.object.isRequired
onPractice: React.PropTypes.func
render: ->
{section, onPr... | React = require 'react'
BS = require 'react-bootstrap'
ChapterSectionType = require './chapter-section-type'
module.exports = React.createClass
displayName: 'LearningGuideProgressBar'
propTypes:
section: React.PropTypes.object.isRequired
onPractice: React.PropTypes.func
render: ->
{section, onPr... | Change empty progress bar wording | Change empty progress bar wording
| CoffeeScript | agpl-3.0 | openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js |
c618f37f044a6389f7c7608f38176f74136d307e | core/app/backbone/modules/discussion_modal_on_frontend.coffee | core/app/backbone/modules/discussion_modal_on_frontend.coffee | FactlinkApp.module "DiscussionModalOnFrontend", (DiscussionModalOnFrontend, MyApp, Backbone, Marionette, $, _) ->
background_page_url = null
DiscussionModalOnFrontend.addInitializer ->
background_page_url = currentUser.streamLink()
FactlinkApp.vent.on 'close_discussion_modal', ->
Backbone.history.n... | FactlinkApp.module "DiscussionModalOnFrontend", (DiscussionModalOnFrontend, MyApp, Backbone, Marionette, $, _) ->
background_page_url = null
DiscussionModalOnFrontend.addInitializer ->
background_page_url = currentUser.streamLink()
FactlinkApp.vent.on 'close_discussion_modal', ->
Backbone.history.n... | Use clearer default for url | Use clearer default for url
| CoffeeScript | mit | Factlink/factlink-core,daukantas/factlink-core,daukantas/factlink-core,Factlink/factlink-core,Factlink/factlink-core,daukantas/factlink-core,Factlink/factlink-core,daukantas/factlink-core |
11b86ff023eadcef19ddfe6c7540c0b2a8cd7655 | server/controllers/deploy.coffee | server/controllers/deploy.coffee | cp = require('child_process')
getBranchFromRef = (ref) ->
refParts = ref.split("/")
return refParts[refParts.length-1]
exports.index = (req, res) ->
parsedPayload = JSON.parse(req.body.payload)
console.log "Got deploy message from #{parsedPayload.ref}"
unless getBranchFromRef(parsedPayload.ref) is "deploy"... | cp = require('child_process')
getBranchFromRef = (ref) ->
refParts = ref.split("/")
return refParts[refParts.length-1]
exports.index = (req, res) ->
parsedPayload = JSON.parse(req.body.payload)
console.log "Got deploy message from #{parsedPayload.ref}"
unless getBranchFromRef(parsedPayload.ref) is "deploy"... | Add error logging to process forking | Add error logging to process forking
| CoffeeScript | bsd-3-clause | unepwcmc/NRT,unepwcmc/NRT |
6b313d3638d9566c0f9b4f2679d2b293af3bff57 | bokehjs/src/coffee/models/layouts/basebox.coffee | bokehjs/src/coffee/models/layouts/basebox.coffee | _ = require "underscore"
LayoutDOM = require "./layout_dom"
p = require "../../core/properties"
class BaseBox extends LayoutDOM.Model
type: "BaseBox"
@define {
children: [ p.Array, [] ]
}
module.exports =
Model: BaseBox
| _ = require "underscore"
LayoutDOM = require "./layout_dom"
p = require "../../core/properties"
class BaseBox extends LayoutDOM.Model
type: "BaseBox"
@define {
children: [ p.Array, [] ]
}
get_layoutable_children: () ->
return @get('children')
get_edit_variables: () ->
edit_variables = supe... | Make sure VBox and HBox still work | Make sure VBox and HBox still work
Not adding tests because about to remove HBox and VBox
| CoffeeScript | bsd-3-clause | jakirkham/bokeh,timsnyder/bokeh,jakirkham/bokeh,azjps/bokeh,schoolie/bokeh,dennisobrien/bokeh,mindriot101/bokeh,philippjfr/bokeh,phobson/bokeh,phobson/bokeh,schoolie/bokeh,aiguofer/bokeh,philippjfr/bokeh,philippjfr/bokeh,Karel-van-de-Plassche/bokeh,azjps/bokeh,rs2/bokeh,DuCorey/bokeh,rs2/bokeh,justacec/bokeh,Karel-van-... |
99dda35dae3f6b902115a9772393140d9635791d | gulpfile.coffee | gulpfile.coffee | gulp = require 'gulp'
coffee = require 'gulp-coffee'
mocha = require 'gulp-mocha'
src = './src/*.coffee'
test = './test/*.coffee'
gulp.task('compile', ->
gulp.src(src)
.pipe(coffee())
.pipe(gulp.dest('./src'))
)
gulp.task('test', ->
gulp.src(test)
.pipe(mocha({ reporter: 'list' }))
)
gulp.task('watc... | gulp = require 'gulp'
coffee = require 'gulp-coffee'
mocha = require 'gulp-mocha'
src = './src/*.coffee'
test = './test/*.coffee'
gulp.task('compile', ->
gulp.src(src)
.pipe(coffee())
.pipe(gulp.dest('./src'))
)
gulp.task('test', ->
gulp.src(test)
.pipe(mocha({ reporter: 'list' }))
)
gulp.task('watc... | Make default gulp task compile and test | Make default gulp task compile and test
| CoffeeScript | mit | jedcn/coffeelint-prefer-poet-mode |
a13dbf615a8bcc49e26af264b4d2c0d59cdde51e | lib/main.coffee | lib/main.coffee | path = require 'path'
_ = require 'underscore-plus'
ImageEditor = require './image-editor'
module.exports =
activate: ->
atom.project.registerOpener(openUri)
deactivate: ->
atom.project.unregisterOpener(openUri)
# Files with these extensions will be opened as images
imageExtensions = ['.gif', '.ico', '.j... | path = require 'path'
_ = require 'underscore-plus'
ImageEditor = require './image-editor'
module.exports =
activate: ->
atom.workspace.registerOpener(openUri)
deactivate: ->
atom.workspace.unregisterOpener(openUri)
# Files with these extensions will be opened as images
imageExtensions = ['.gif', '.ico',... | Use opener methods from workspace instead of project | Use opener methods from workspace instead of project | CoffeeScript | mit | atom/image-view |
0ca43515ce2804334fa7697718c221deea790cb1 | lib/main.coffee | lib/main.coffee | RubocopAutoCorrect = require './rubocop-auto-correct'
module.exports =
config:
rubocopCommandPath:
description: 'If command doesnot work, please input rubocop full path. example: /Users/<username>/.rbenv/shims/rubocop)'
type: 'string'
default: 'rubocop'
autoRun:
description: 'When you... | RubocopAutoCorrect = require './rubocop-auto-correct'
module.exports =
config:
rubocopCommandPath:
description: 'If the command does not work, please input rubocop full path here. Example: /Users/<username>/.rbenv/shims/rubocop)'
type: 'string'
default: 'rubocop'
autoRun:
description:... | Correct the descriptions of the options | Correct the descriptions of the options
| CoffeeScript | mit | tomoya/rubocop-auto-correct |
153a5072905b4ea6d14960886eaeddd594bf6265 | src/languages/ux_markup.coffee | src/languages/ux_markup.coffee | module.exports = {
name: "UX Markup"
namespace: "ux"
fallback: ['xml']
###
Supported Grammars
###
grammars: [
"UX"
]
###
Supported extensions
###
extensions: [
"ux"
]
defaultBeautifier: "Pretty Diff"
}
| module.exports = {
name: "UX Markup"
namespace: "ux"
fallback: ['html']
###
Supported Grammars
###
grammars: [
"UX"
]
###
Supported extensions
###
extensions: [
"ux"
]
defaultBeautifier: "Pretty Diff"
}
| Change fallback for UX Markup from xml back to html | Change fallback for UX Markup from xml back to html
| CoffeeScript | mit | Glavin001/atom-beautify,Glavin001/atom-beautify,Glavin001/atom-beautify,Glavin001/atom-beautify,Glavin001/atom-beautify |
fd9dc437c7b992b6b596ba0e5058251b3cb87d1c | test/core/customhtmlview.coffee | test/core/customhtmlview.coffee | should = require 'should'
KDCustomHTMLView = require '../../lib/core/customhtmlview'
describe 'KDCustomHTMLView', ->
it 'exists', ->
KDCustomHTMLView.should.exist
describe 'constructor', ->
it 'should instantiate without error', ->
router = new KDCustomHTMLView
router.should.exist
| should = require 'should'
KDCustomHTMLView = require '../../lib/core/customhtmlview'
describe 'KDCustomHTMLView', ->
it 'exists', ->
KDCustomHTMLView.should.exist
describe 'constructor', ->
it 'should instantiate without error', ->
view = new KDCustomHTMLView
view.should.exist
it 'should... | Add more tests to custom html view | Add more tests to custom html view
| CoffeeScript | mit | anonrig/kd,anonrig/kd |
8a260f2f9984a9445c61c65bf2c346eb5d506059 | src/scripts/tweet-content.coffee | src/scripts/tweet-content.coffee | # detect tweet URL and send tweet content
module.exports = (robot) ->
robot.hear /https?:\/\/(mobile\.)?twitter\.com\/.*?\/status\/([0-9]+)/i, (msg) ->
msg.http("https://api.twitter.com/1/statuses/show/#{msg.match[2]}.json").get() (err, res, body) ->
return if err or (res.statusCode != 200)
tweet = JSON.parse... | # detect tweet URL and send tweet content
module.exports = (robot) ->
robot.hear /https?:\/\/(mobile\.)?twitter\.com\/.*?\/status\/([0-9]+)/i, (msg) ->
msg.http("https://api.twitter.com/1/statuses/show/#{msg.match[2]}.json").get() (err, res, body) ->
return if err or (res.statusCode != 200)
tweet = JSON.parse... | Use screen_name instead of name | Use screen_name instead of name
| CoffeeScript | mit | fromonesrc/hubot-scripts,Ev1l/hubot-scripts,GrimDerp/hubot-scripts,dbkaplun/hubot-scripts,DataDog/hubot-scripts,phillipalexander/hubot-scripts,chauffer/hubot-scripts,davidsulpy/hubot-scripts,cycomachead/hubot-scripts,jan0sch/hubot-scripts,zecahnin/hubot-scripts,dyg2104/hubot-scripts,n0mer/hubot-scripts,markstory/hubot-... |
7106d1f35c58ac7e267edb5f911f6f3e88b8c231 | src/components/EntryDetails.coffee | src/components/EntryDetails.coffee | # Copyright (c) 2015 Markus Kohlhase <mail@markus-kohlhase.de>
React = require "react"
PureMixin = require "react-pure-render/mixin"
{ NAMES, CSS_CLASSES } = require "../constants/Categories"
{ div, p, h3, button, span, i } = React.DOM
module.exports = React.createClass
displayName: "EntryDetails"
mixins:... | # Copyright (c) 2015 Markus Kohlhase <mail@markus-kohlhase.de>
React = require "react"
PureMixin = require "react-pure-render/mixin"
{ NAMES, CSS_CLASSES } = require "../constants/Categories"
{ div, p, h3, button, span, i, a } = React.DOM
module.exports = React.createClass
displayName: "EntryDetails"
mixi... | Make Homepage field clickable/a hyperlink | fix(details): Make Homepage field clickable/a hyperlink
| CoffeeScript | agpl-3.0 | sebokopter/kartevonmorgen,regenduft/kartevonmorgen,flosse/kartevonmorgen,flosse/kartevonmorgen,regenduft/kartevonmorgen |
0e43172b8a7dbeb1f056730490043d343ead7013 | server/lib/download.coffee | server/lib/download.coffee | import logger from '../log'
request = require('request-promise-native')
sleep = (milliseconds) ->
return new Promise((resolve) -> setTimeout(resolve, milliseconds))
export default download = (href, jar, options) ->
logger.debug "Downloading", href
if not jar
jar = request.jar()
delay = 5
f... | import logger from '../log'
request = require('request-promise-native')
sleep = (milliseconds) ->
return new Promise((resolve) -> setTimeout(resolve, milliseconds))
export default download = (href, jar, options) ->
logger.debug "Downloading", href
if not jar
jar = request.jar()
delay = 5
f... | Decrease number of attemts to make sure to fin in browser timeout | Decrease number of attemts to make sure to fin in browser timeout
| CoffeeScript | agpl-3.0 | petr-kalinin/algoprog,petr-kalinin/algoprog,petr-kalinin/algoprog,petr-kalinin/algoprog |
7d5574f13b160ef2dd25a2b3807fcca000b74d79 | client/entry.coffee | client/entry.coffee | AccountsEntry =
settings:
wrapLinks: true
homeRoute: '/home'
dashboardRoute: '/dashboard'
passwordSignupFields: 'EMAIL_ONLY'
config: (appConfig) ->
@settings = _.extend(@settings, appConfig)
i18n.setDefaultLanguage "en_US"
if appConfig.language
i18n.setLanguage appConfig.language... | AccountsEntry =
settings:
wrapLinks: true
homeRoute: '/home'
dashboardRoute: '/dashboard'
passwordSignupFields: 'EMAIL_ONLY'
config: (appConfig) ->
@settings = _.extend(@settings, appConfig)
i18n.setDefaultLanguage "en"
if appConfig.language
i18n.setLanguage appConfig.language
... | Update language to match default | Update language to match default
`en_US` != `en`
It may be better to reject this fix and change english.coffee, but I'm unsure if you want to use 2-char or 4-char codes.
Cheers | CoffeeScript | mit | meteorblackbelt/accounts-entry,dovrosenberg/accounts-entry,mike623/accounts-entry,valedaemon/accounts-entry,mauriciovieira/accounts-entry,timmyg/accounts-entry,lnader/meteor-accounts-entry,jpatzer/accounts-entry,AppWorkshop/accounts-entry,Noamyoungerm/accounts-entry,Vilango/accounts-entry,txs/meteor-wecare-accounts-ent... |
0923817c8b79191dae526aaf90c702850ca0609c | resources/assets/coffee/_classes/form-toggle.coffee | resources/assets/coffee/_classes/form-toggle.coffee | ###
# Copyright 2015-2017 ppy Pty. Ltd.
#
# This file is part of osu!web. osu!web is distributed with the hope of
# attracting more community contributions to the core ecosystem of osu!.
#
# osu!web is free software: you can redistribute it and/or modify
# it under the terms of the Affero GNU General Pub... | ###
# Copyright 2015-2017 ppy Pty. Ltd.
#
# This file is part of osu!web. osu!web is distributed with the hope of
# attracting more community contributions to the core ecosystem of osu!.
#
# osu!web is free software: you can redistribute it and/or modify
# it under the terms of the Affero GNU General Pub... | Synchronize the fancy toggle its related form on load | Synchronize the fancy toggle its related form on load
Because some browsers restore previous state on reload.
| CoffeeScript | agpl-3.0 | notbakaneko/osu-web,nekodex/osu-web,notbakaneko/osu-web,kj415j45/osu-web,ppy/osu-web,omkelderman/osu-web,nekodex/osu-web,nanaya/osu-web,LiquidPL/osu-web,ppy/osu-web,nanaya/osu-web,LiquidPL/osu-web,ppy/osu-web,notbakaneko/osu-web,LiquidPL/osu-web,nekodex/osu-web,nekodex/osu-web,nekodex/osu-web,omkelderman/osu-web,kj415j... |
3bc12ccb631a5dba2d5b511c804cb09611a4bed1 | menus/titanium.cson | menus/titanium.cson | # See https://atom.io/docs/latest/hacking-atom-package-word-count#menus for more details
'context-menu':
'atom-text-editor': [
{
'label': 'Toggle titanium'
'command': 'titanium:toggle'
}
]
'menu': [
{
'label': 'Packages'
'submenu': [
'label': 'titanium'
'submenu': [
... | 'context-menu':
'atom-text-editor': [
{
'label': 'Alloy'
'submenu': [
{
'label': 'Open view'
'command': 'titanium:openView'
}
{
'label': 'Open style'
'command': 'titanium:openStyle'
}
{
'label': 'Open controller'... | Add context menu items to open related files | Add context menu items to open related files | CoffeeScript | mit | yomybaby/atom-titanium |
cba8cd41fee8cd37f00b3e124eed122028147e62 | models/state.coffee | models/state.coffee | Backbone = require 'backbone'
cookies = require 'cookies-js'
{ keys, each } = require 'underscore'
module.exports = class State extends Backbone.Model
defaults:
view_mode: 'grid'
lightbox: false
initialize: ->
# set values from cookies
each keys(@defaults), (key) =>
@set(key, val) if val = c... | Backbone = require 'backbone'
cookies = require 'cookies-js'
{ keys, each } = require 'underscore'
module.exports = class State extends Backbone.Model
defaults:
view_mode: 'grid'
lightbox: false
sort: 'updated_at'
initialize: ->
# set values from cookies
each keys(@defaults), (key) =>
@s... | Add default sort and sets cookie when sort changes | Add default sort and sets cookie when sort changes
| CoffeeScript | mit | aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell |
bbcfde297c2c910f6b04c85f3527e1e0ea9a5015 | client/Main/addworkspaceview.coffee | client/Main/addworkspaceview.coffee | class AddWorkspaceView extends KDCustomHTMLView
constructor: (options = {}, data) ->
options.cssClass = 'add-workpace-view'
super options, data
@addSubView new KDCustomHTMLView tagName: 'figure'
@addSubView @input = new KDInputView
type : 'text'
keydown : @bound 'handleKeyDown'
... | class AddWorkspaceView extends KDCustomHTMLView
constructor: (options = {}, data) ->
options.cssClass = 'add-workpace-view'
super options, data
@addSubView new KDCustomHTMLView tagName: 'figure'
@addSubView @input = new KDInputView
type : 'text'
keydown : @bound 'handleKeyDown'
... | Return no when clicked to prevent node changing on sidebar. | AddWorkspaceView: Return no when clicked to prevent node changing on sidebar.
| CoffeeScript | agpl-3.0 | gokmen/koding,sinan/koding,sinan/koding,rjeczalik/koding,drewsetski/koding,jack89129/koding,andrewjcasal/koding,kwagdy/koding-1,cihangir/koding,szkl/koding,gokmen/koding,sinan/koding,alex-ionochkin/koding,acbodine/koding,szkl/koding,rjeczalik/koding,usirin/koding,usirin/koding,mertaytore/koding,mertaytore/koding,koding... |
6316b0909bbcd8454ee93e8fb366138fab4dd8e7 | examples/todo-vuejs/app/assets/javascripts/channels/todo.coffee | examples/todo-vuejs/app/assets/javascripts/channels/todo.coffee | App.todo = App.cable.subscriptions.create "TodoChannel",
connected: ->
# Called when the subscription is ready for use on the server
disconnected: ->
# Called when the subscription has been terminated by the server
| App.todo = App.cable.subscriptions.create {
channel: "TodoChannel"
},
connected: ->
# Called when the subscription is ready for use on the server
disconnected: ->
# Called when the subscription has been terminated by the server
| Send explicit parameters in channel subscription | Send explicit parameters in channel subscription
| CoffeeScript | mit | bys-control/action_cable_notifications,bys-control/action_cable_notifications,bys-control/action_cable_notifications |
6705c09d2538377b0e3299cd3ed7c0bcdd474854 | assets/javascripts/views.js.coffee | assets/javascripts/views.js.coffee | App.UsersIndexView = Ember.View.extend
layoutName: "settings"
classNames: ["settings"]
App.UsersNewView = Ember.View.extend
layoutName: "settings"
classNames: ["settings"]
App.UserEditView = Ember.View.extend
layoutName: "settings"
classNames: ["settings"]
App.RoomsView = Ember.View.extend
layoutName: ... | App.UsersIndexView = Ember.View.extend
layoutName: "settings"
classNames: ["settings"]
App.UsersNewView = Ember.View.extend
layoutName: "settings"
classNames: ["settings"]
App.UserEditView = Ember.View.extend
layoutName: "settings"
classNames: ["settings"]
App.RoomsIndexView = Ember.View.extend
layoutN... | Define views for Room management | Define views for Room management
| CoffeeScript | mit | louishawkins/mogo-chat,sashafklein/bloc-mogo,HashNuke/mogo-chat,di-stars/mogo-chat,di-stars/mogo-chat,HashNuke/mogo-chat,louishawkins/mogo-chat,louishawkins/mogo-chat,sashafklein/bloc-mogo,sashafklein/bloc-mogo,HashNuke/mogo-chat,di-stars/mogo-chat |
32c2a84975d60bb8ae7115a4e2beb41504be090f | grammars/language-ipkg.cson | grammars/language-ipkg.cson | name: 'Idris Ipkg'
scopeName: 'source.ipkg'
fileTypes: ['ipkg']
patterns:
[
{
name: 'keyword.control.ipkg'
match: '\\b(package|opts|modules|sourcedir|makefile|objs|executable|main|libs|pkgs|tests)\\b'
}
{
name: 'string.quoted.double.ipkg'
begin: '"'
end: '"'
}
]
| name: 'Idris Ipkg'
scopeName: 'source.ipkg'
fileTypes: ['ipkg']
patterns:
[
{
name: 'comment.line.ipkg'
match: '(--).*$\n?'
comment: 'Line comment'
}
{
name: 'comment.block.ipkg'
begin: '\\{-'
end: '-\\}'
comment: 'Block comment'
}
{
name: 'keyword.c... | Add comments to ipkg grammar | Add comments to ipkg grammar
ipgk Files support idris style comments. Enable those in the grammar.
| CoffeeScript | mit | idris-hackers/atom-language-idris |
db5df0ac8e77d757f0924a2cbde4f0d1a5210e10 | scripts/routers/router.coffee | scripts/routers/router.coffee | define [
'jquery'
'underscore'
'backbone'
'marionette'
'cs!controllers/routing'
], ($, _, Backbone, Marionette, routerController) ->
return new (Marionette.AppRouter.extend
controller: routerController
appRoutes:
'': 'workspace' # Show the workspace list of content
'workspac... | define [
'jquery'
'underscore'
'backbone'
'marionette'
'cs!controllers/routing'
], ($, _, Backbone, Marionette, routerController) ->
return new (Marionette.AppRouter.extend
controller: routerController
appRoutes:
'': 'workspace' # Show the workspace list of content
'workspac... | Support content with '/' in the id | Support content with '/' in the id
| CoffeeScript | agpl-3.0 | oerpub/github-bookeditor,oerpub/github-bookeditor,oerpub/bookish,oerpub/bookish,oerpub/github-bookeditor |
956b43144f8c06578814af8de6f34d02e1be3778 | storage/test/unit-access-service.coffee | storage/test/unit-access-service.coffee | {expect} = require 'chai'
Promise = require 'bluebird'
Promise.longStackTraces()
describe 'access service', ->
access = null
before Promise.coroutine ->
db = require('../lib/db')
host: process.env.DB_PORT_5432_TCP_ADDR ? 'localhost'
user: process.env.DB_USER ? 'postgres'
... | {expect} = require 'chai'
uuid = require 'uuid'
Promise = require 'bluebird'
Promise.longStackTraces()
describe 'access service', ->
access = null
before Promise.coroutine ->
db = require('../lib/db')
host: process.env.DB_PORT_5432_TCP_ADDR ? 'localhost'
user: process.env.DB_US... | Use a real uuid in the test to silence DB warnings | Use a real uuid in the test to silence DB warnings
| CoffeeScript | mit | foobert/gc,foobert/gc,foobert/gc,foobert/gc |
251be23583b5c95634285539343aaa3e97ea29ff | Gruntfile.coffee | Gruntfile.coffee | "use strict"
pathUtils = require("path")
glob = require("glob")
fs = require("fs")
module.exports = (grunt) ->
grunt = (require 'grunt-utilities') grunt
grunt.initConfig
name: 'tree_search'
bower:
install:
options:
install: yes
targetDir: '.tmp'
cleanup: no
... | "use strict"
pathUtils = require("path")
glob = require("glob")
fs = require("fs")
module.exports = (grunt) ->
grunt = (require 'grunt-utilities') grunt
grunt.initConfig
name: 'tree_search'
bower:
install:
options:
install: yes
targetDir: '.tmp'
cleanup: no
... | Remove bower components from distro | Remove bower components from distro
| CoffeeScript | mit | mbixby/tree-cursor,mbixby/tree-cursor |
49d956ab25a69c3c53f9bce5012a054181fe7b45 | client/ide/AppController.coffee | client/ide/AppController.coffee | class IDEAppController extends AppController
KD.registerAppClass this,
name : "IDE"
route : "/:name?/IDE"
behavior : "application"
preCondition :
condition : (options, cb)-> cb KD.isLoggedIn()
failure : (options, cb)->
KD.singletons.appManager.open 'IDE', co... | class IDEAppController extends AppController
KD.registerAppClass this,
name : "IDE"
route : "/:name?/IDE"
behavior : "application"
preCondition :
condition : (options, cb)-> cb KD.isLoggedIn()
failure : (options, cb)->
KD.singletons.appManager.open 'IDE', co... | Set editorPane as default activeTabView. | Set editorPane as default activeTabView.
| CoffeeScript | agpl-3.0 | mertaytore/koding,sinan/koding,acbodine/koding,szkl/koding,cihangir/koding,mertaytore/koding,rjeczalik/koding,koding/koding,mertaytore/koding,sinan/koding,cihangir/koding,szkl/koding,andrewjcasal/koding,kwagdy/koding-1,drewsetski/koding,kwagdy/koding-1,rjeczalik/koding,mertaytore/koding,sinan/koding,cihangir/koding,acb... |
2c8854ce8b81836f58cff54a15014c7a1f2e5c8d | exports/atom.coffee | exports/atom.coffee | {View, $$, $$$} = require '../src/space-pen-extensions'
{Document, Point, Range, Site} = require 'telepath'
{Emitter, Subscriber} = require 'emissary'
module.exports =
_: require '../src/underscore-extensions'
$: require '../src/jquery-extensions'
$$: $$
$$$: $$$
BufferedNodeProcess: require '../src/buffered... | {View, $$, $$$} = require '../src/space-pen-extensions'
{Document, Point, Range, Site} = require 'telepath'
module.exports =
_: require '../src/underscore-extensions'
$: require '../src/jquery-extensions'
$$: $$
$$$: $$$
BufferedNodeProcess: require '../src/buffered-node-process'
BufferedProcess: require '... | Stop exporting Emitter and Subscriber | Stop exporting Emitter and Subscriber
| CoffeeScript | mit | Neron-X5/atom,gzzhanghao/atom,kdheepak89/atom,001szymon/atom,mostafaeweda/atom,tmunro/atom,RobinTec/atom,dannyflax/atom,dsandstrom/atom,ilovezy/atom,deoxilix/atom,ivoadf/atom,omarhuanca/atom,tony612/atom,sillvan/atom,splodingsocks/atom,deoxilix/atom,folpindo/atom,lisonma/atom,NunoEdgarGub1/atom,scippio/atom,rsvip/aTom,... |
15abd101744e61091528127a4bbcadbf3fccb4c1 | lib/imager.coffee | lib/imager.coffee | path = require('path')
gm = require('gm')
imageMagick = gm.subClass({ imageMagick: true })
class Imager
minSize: 40
maxSize: 400
combine: (face, size, callback) ->
if callback?
size = @_parseSize(size)
else
callback = size
size = width: @maxSize, height: @maxSize
i... | path = require('path')
gm = require('gm')
imageMagick = gm.subClass({ imageMagick: true })
class Imager
minSize: 40
maxSize: 400
combine: (face, size, callback) ->
if callback?
size = @_parseSize(size)
else
callback = size
size = width: @maxSize, height: @maxSize
i... | Move background argument closer to input arguments | Move background argument closer to input arguments
That makes more sense to me.
| CoffeeScript | mit | gitblit/avatars-api,mojects/avatars-api,gitblit/avatars-api,mojects/avatars-api,adorableio/avatars-api |
bdd50b683703dc723258704dd8826d54336a70f4 | lib/reader.coffee | lib/reader.coffee | fs = require('fs')
url = require('url')
http = require('http')
https = require('https')
module.exports = class Reader
messages =
noSourceError: 'a valid source must be provided'
httpStatusError: 'http status'
source: null
sourceType: null
constructor: (@source) ->
return unless @source
... | fs = require('fs')
url = require('url')
through = require('through')
phantom = require('phantom')
module.exports = class Reader
messages =
noSourceError: 'a valid source must be provided'
httpStatusError: 'http status'
source: null
sourceType: null
constructor: (@source) ->
return unless... | Deal with http requests using phantomjs | Deal with http requests using phantomjs
| CoffeeScript | mit | paulodiovani/sinos-river-parser |
c873be01cb497bd3490b27634dd457dd9e7221eb | lib/autosave.coffee | lib/autosave.coffee | {$} = require 'atom'
module.exports =
configDefaults:
enabled: false
activate: (state) ->
@migrateOldAutosaveConfig()
atom.workspaceView.on 'focusout', ".editor:not(.mini)", (event) =>
editor = event.targetView()?.getModel()
@autosave(editor)
atom.workspaceView.on 'pane:before-item-d... | {$} = require 'atom'
module.exports =
configDefaults:
enabled: false
activate: ->
atom.workspaceView.on 'focusout', ".editor:not(.mini)", (event) =>
editor = event.targetView()?.getModel()
@autosave(editor)
atom.workspaceView.on 'pane:before-item-destroyed', (event, paneItem) =>
@au... | Remove migration of old config setting | Remove migration of old config setting
| CoffeeScript | mit | akonwi/autosave,atom/autosave |
520eb7e8c18a9096b76a869f04a47fceab16a768 | lib/commands.coffee | lib/commands.coffee | {CompositeDisposable} = require 'atom'
class Commands
constructor: (@linter) ->
@_subscriptions = new CompositeDisposable
@_subscriptions.add atom.commands.add 'atom-workspace',
'linter:next-error': @nextError.bind(@)
'linter:toggle': @toggleLinter.bind(@)
'linter:set-bubble-transparent': @... | {CompositeDisposable} = require 'atom'
class Commands
constructor: (@linter) ->
@_subscriptions = new CompositeDisposable
@_subscriptions.add atom.commands.add 'atom-workspace',
'linter:next-error': @nextError.bind(@)
'linter:toggle': @toggleLinter.bind(@)
'linter:set-bubble-transparent': @... | Use fat arrow instead of .bind(@) | Use fat arrow instead of .bind(@)
| CoffeeScript | mit | shawninder/linter,AsaAyers/linter,levity/linter,UltCombo/linter,steelbrain/linter,blakeembrey/linter,atom-community/linter,AtomLinter/Linter,josa42/Linter,JohnMurga/linter,mdgriffith/linter,Arcanemagus/linter,e-jigsaw/Linter,DanPurdy/linter,iam4x/linter,kaeluka/linter,elkeis/linter |
4166c9788c809b59c550c60180fabdc0a446d952 | scripts/arnie-quotes.coffee | scripts/arnie-quotes.coffee | # Description:
# Listens for words and sometimes replies with an Arnie quote
#
# Dependencies:
# None
#
# Commands:
# None
#
# Author:
# Casey Lawrence <casey.j.lawrence@gmail.com>
#
arnie_quotes = [
'GET TO THE CHOPPA!',
'Your clothes, give them to me, NOW!',
'Hasta La Vista, Baby!',
'DDDAAANN... | # Description:
# Listens for mentions of Arnie and replies with an Arnie quote
#
# Dependencies:
# None
#
# Commands:
# None
#
# Author:
# Casey Lawrence <casey.j.lawrence@gmail.com>
#
arnie_quotes = [
'GET TO THE CHOPPA!',
'Your clothes, give them to me, NOW!',
'Hasta La Vista, Baby!',
'DDDAAA... | Add Arnie emoji to the end of every quote. Update description. | Add Arnie emoji to the end of every quote. Update description.
| CoffeeScript | mit | traviskroberts/superbestbot |
104f239775d507145f71953b4d5458a81cecdc4d | app/assets/javascripts/typeahead.js.coffee | app/assets/javascripts/typeahead.js.coffee | $(->
$('[data-typeahead]').on 'keyup', (e)->
$this = $(this)
pattern = $this.val().toLowerCase()
searchClass = $this.data("typeahead-search")
$($this.data("typeahead")).children().each (idx)->
if $(this).find("#{searchClass}").text().toLowerCase().search(pattern) == -1
$(this).hide()
... | $(->
$('[data-typeahead]').on 'keyup', (e)->
$this = $(this)
pattern = $this.val().toLowerCase()
searchClass = $this.data("typeahead-search")
$($this.data("typeahead")).children().each (idx)->
if $(this).find("#{searchClass}").text().toLowerCase().search(pattern) == -1
$(this).slideUp(20... | Add a slight animation for a nice effect | Add a slight animation for a nice effect
| CoffeeScript | mit | collectiveidea/bender,collectiveidea/bender,collectiveidea/bender,collectiveidea/bender |
fcb2a2f8bd1d7a39e715902159fe9fc29d1e79b2 | test/command.coffee | test/command.coffee | require('chai').should()
fs = require 'fs'
exec = require('child_process').exec
opt = {cwd: __dirname}
fixclosure = '../bin/fixclosure.js'
describe 'Command line', ->
it 'exec without args', (done) ->
exec fixclosure, opt, (err, stdout, stderr) ->
done(err)
it 'exec with file', (done) ->
exec fixcl... | require('chai').should()
fs = require 'fs'
exec = require('child_process').exec
opt = {cwd: __dirname}
fixclosure = '../bin/fixclosure.js'
describe 'Command line', ->
it 'exec without args', (done) ->
exec fixclosure, opt, (err, stdout, stderr) ->
err.code.should.be.eql 1
done()
it 'exec with fil... | Fix test for invalid argument error | Fix test for invalid argument error
| CoffeeScript | mit | teppeis/fixclosure,teppeis/fixclosure |
a1245cc3aefcb552525d1e5e00cf5c8d861a5e68 | test/src/link_grabber_test.coffee | test/src/link_grabber_test.coffee | describe 'LinkGrabber', ->
describe 'with links', ->
it 'should find all links', ->
links = LinkGrabber.fromHTMLString('<p>Lorem <a href="http://foo/">ipsum</a> dolor <a href="http://bar/">lorem</a> ipsum</p>').allLinks()
links.should.have.lengthOf(2)
links[0].should.equal("http://foo/")
links[1].sh... | describe 'LinkGrabber', ->
describe 'with html input', ->
it 'should find all links', ->
links = LinkGrabber.fromHTMLString('<p>Lorem <a href="http://foo/">ipsum</a> dolor <a href="http://bar/">lorem</a> ipsum</p>').allLinks()
links.should.have.lengthOf(2)
links[0].should.equal("http://foo/")
links[... | Add test for ignoring name anchors | Add test for ignoring name anchors
| CoffeeScript | mit | dragon788/chrome-open-links |
8de13424839bee3a1e422eff6749540d055055b0 | client/rider/eta/displayETA.coffee | client/rider/eta/displayETA.coffee | Template.displayETA.arrivals = (direction)->
stop = Session.get 'etaStop'
if not stop
return
return Arrivals.find({ station: stop, direction: direction })
| Template.displayETA.arrivals = (direction)->
stop = Session.get 'etaStop'
if not stop
return
return Arrivals.find({ station: stop, direction: direction },{ sort: ['next_arr'] })
| Sort arrivals by arrival time | Sort arrivals by arrival time
| CoffeeScript | mit | CyCoreSystems/transport,theelee13/Algos,CyCoreSystems/transport,theelee13/Algos |
5aef4d6bbcf8f5b19a2e72235a489373f41b0f79 | .atom/snippets.cson | .atom/snippets.cson | # Your snippets
#
# Atom snippets allow you to enter a simple prefix in the editor and hit tab to
# expand the prefix into a larger code block with templated values.
#
# You can create a new snippet in this file by typing "snip" and then hitting
# tab.
#
# An example CoffeeScript snippet to expand log to console.log:
#... | # Your snippets
#
# Atom snippets allow you to enter a simple prefix in the editor and hit tab to
# expand the prefix into a larger code block with templated values.
#
# You can create a new snippet in this file by typing "snip" and then hitting
# tab.
#
# An example CoffeeScript snippet to expand log to console.log:
#... | Add remove block XML snippet | Add remove block XML snippet
| CoffeeScript | mit | tommypyatt/dotfiles |
8f63a95f03ef27c69c950ef1191f8847fb273405 | src/coffee/refining.coffee | src/coffee/refining.coffee | #oreList = query("select itemName from Ore order by itemName", (err, rows, result) ->
# alert rows )
#alert oreList
#alert "3333"
refiningTable = null
AddNewRefiningElement = ->
quantity = parseInt($("#inputQuantity").val(), 10)
unless isNaN(quantity)
itemName = $("#oreInput1").val()
oreRow = refiningTa... | #oreList = query("select itemName from Ore order by itemName", (err, rows, result) ->
# alert rows )
#alert oreList
#alert "3333"
refiningTable = null
AddNewRefiningElement = ->
quantity = parseInt($("#inputQuantity").val(), 10)
unless isNaN(quantity)
itemName = $("#oreInput1").val()
oreRowID = refining... | Rename oreRow -> oreRowID to clarify it's an index | Rename oreRow -> oreRowID to clarify it's an index
As opposed to a reference to the row.
| CoffeeScript | apache-2.0 | eve-apps/karma,eve-apps/karma |
2830e8ffe02425a82cfcb3f8ca7d1b1a1f59a7c4 | src/Models/ProjectIssues.coffee | src/Models/ProjectIssues.coffee | BaseModel = require '../BaseModel'
Utils = require '../Utils'
class ProjectIssues extends BaseModel
list: (projectId, params = {}, fn = null) =>
@debug "ProjectIssues::issues()"
if 'function' is typeof params
fn = params
params = {}
params.page ?= 1
params.per_page ?= 100
do (->
... | BaseModel = require '../BaseModel'
Utils = require '../Utils'
class ProjectIssues extends BaseModel
list: (projectId, params = {}, fn = null) =>
@debug "ProjectIssues::issues()"
if 'function' is typeof params
fn = params
params = {}
params.page ?= 1
params.per_page ?= 100
do (->
... | Add support for fetching one issue from project | Add support for fetching one issue from project
| CoffeeScript | mit | spruce/node-gitlab,chainsys/node-gitlab,mrawdon/node-gitlab,vinodpanicker/node-gitlab |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.