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 |
|---|---|---|---|---|---|---|---|---|---|
081c0229e9f2a9682c7e8c5b412319d93c8c3028 | Gruntfile.coffee | Gruntfile.coffee | module.exports = (grunt) ->
require('load-grunt-tasks') grunt
grunt.initConfig
clean:
folder: 'build'
sass:
options:
sourceMap: true
dist:
files: 'build/main.css': 'stylesheets/main.sass'
watch:
files: ['stylesheets/**/*.sass', 'stylesheets/**/*.scss']
ta... | module.exports = (grunt) ->
require('load-grunt-tasks') grunt
grunt.initConfig
clean:
folder: 'build'
sass:
options:
sourceMap: true
includePaths: ['bower_components']
dist:
files: 'build/main.css': 'stylesheets/main.sass'
watch:
files: ['stylesheets/**... | Add includePaths to sass options. | Add includePaths to sass options.
| CoffeeScript | mit | makenew/libsass-package |
2bd0b770be3274a3693d7427efc9ec10fc051f16 | Gruntfile.coffee | Gruntfile.coffee | Path = require('path')
fs = require('fs')
module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON("package.json")
coffee:
compile:
files:
'js/odometer.js': 'coffee/odometer.coffee'
'js/landing-page.js': 'coffee/landing-page.coffee'
watch:
coffee:
... | Path = require('path')
fs = require('fs')
module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON("package.json")
coffee:
compile:
files:
'js/odometer.js': 'coffee/odometer.coffee'
'js/landing-page.js': 'coffee/landing-page.coffee'
watch:
coffee:
... | Add watcher for landing page coffeescript | Add watcher for landing page coffeescript
| CoffeeScript | mit | xomaczar/odometer,lambda2/text-roller,mikaelhm/odometer,jayvi/odometer,mikaelhm/odometer,dieface/odometer,gitkiselev/odometer,trigrass2/odometer,lambda2/text-roller,dieface/odometer,gitkiselev/odometer,GerHobbelt/odometer,xomaczar/odometer,HubSpot/odometer,danielemesh/odometer,HubSpot/odometer,jayvi/odometer,trigrass2/... |
1f097eaadf73d94afba19b3230af6bf2f0b98860 | menus/encoding-selector.cson | menus/encoding-selector.cson | 'menu': [
'label': 'Edit'
'submenu': [
'label': 'Select Encoding'
'command': 'encoding-selector:show'
]
]
'context-menu':
'.overlayer': [
'label': 'Change Encoding'
'command': 'encoding-selector:show'
]
| 'menu': [
'label': 'Edit'
'submenu': [
'label': 'Select Encoding'
'command': 'encoding-selector:show'
]
]
'context-menu':
'atom-text-editor': [
'label': 'Change Encoding'
'command': 'encoding-selector:show'
]
| Add context menu to atom-text-editor selector | Add context menu to atom-text-editor selector
| CoffeeScript | mit | pombredanne/encoding-selector,atom/encoding-selector |
1e6ee9c993f3d7223581ff5677018811c485837c | src/rebuild.coffee | src/rebuild.coffee | path = require 'path'
_ = require 'underscore-plus'
optimist = require 'optimist'
config = require './config'
Command = require './command'
Install = require './install'
module.exports =
class Rebuild extends Command
@commandNames: ['rebuild']
constructor: ->
@atomNodeDirectory = path.join(config.getAtomDir... | path = require 'path'
_ = require 'underscore-plus'
optimist = require 'optimist'
config = require './config'
Command = require './command'
Install = require './install'
module.exports =
class Rebuild extends Command
@commandNames: ['rebuild']
constructor: ->
@atomNodeDirectory = path.join(config.getAtomDir... | Use log helpers in Rebuild command | Use log helpers in Rebuild command
| CoffeeScript | mit | pusateri/apm,VandeurenGlenn/apm,pusateri/apm,AtaraxiaEta/apm,atom/apm,bronson/apm,gutsy/apm,bcoe/apm,pusateri/apm,Nikpolik/apm,Nikpolik/apm,pusateri/apm,gutsy/apm,fscherwi/apm,AtaraxiaEta/apm,ethanp/apm,VandeurenGlenn/apm,fscherwi/apm,AtaraxiaEta/apm,bcoe/apm,ethanp/apm,bronson/apm,bcoe/apm,jlord/apm,atom/apm,jlord/apm... |
a558c9470d9bb57341eae9117f524122dcf12e3f | routes/api/v2/authentication.coffee | routes/api/v2/authentication.coffee | Meteor.startup ->
if Meteor.isServer
lib = require './lib.coffee'
keys = require '/server/utils/deploykeys.coffee'
authenticationHandler = ->
if (key = @params.query?['api-key']) or (key = @request.headers?['api-key'])
if (apiKey = APIKeys.findOne key: key)
user = Meteor.users.fi... | Meteor.startup ->
if Meteor.isServer
lib = require './lib.coffee'
keys = require '/server/utils/deploykeys.coffee'
authenticationHandler = ->
if (key = @params.query?['api-key']) or (key = @request.headers?['api-key'])
if (apiKey = APIKeys.findOne key: key)
user = Meteor.users.fi... | Check for, and deny anonymous api_keys | Check for, and deny anonymous api_keys
| CoffeeScript | apache-2.0 | ICTU/docker-dashboard,ICTU/docker-dashboard,ICTU/docker-dashboard |
c13e5c1fa91178aa191415b8de57dcb59e5d3bc3 | gulp_config/common/webpack.coffee | gulp_config/common/webpack.coffee | webpack = require "webpack"
option = require "./gulp.coffee"
module.exports =
watchDelay : 500
output :
filename : "[name].js"
sourceMapFilename : "map/[file].map"
publicPath : "/js/"
devtool : "#source-map"
resolve :
root ... | webpack = require "webpack"
option = require "./gulp.coffee"
module.exports =
watchDelay : 500
output :
filename : "[name].js"
sourceMapFilename : "map/[file].map"
publicPath : "/js/"
devtool : "#source-map"
target : "atom"
resolve ... | Change webkit buils target to Electron(atom-shell) | Change webkit buils target to Electron(atom-shell)
| CoffeeScript | mit | Ragg-/electron-boilerplate,Ragg-/electron-boilerplate |
d9b2fd4bb8c77d5797693dc7e7ed7e871187c5a7 | client/landing/app/MainApp/sidebar/sidebarcontroller.coffee | client/landing/app/MainApp/sidebar/sidebarcontroller.coffee | class SidebarController extends KDViewController
constructor:->
super
mainController = KD.getSingleton 'mainController'
mainController.on 'ManageRemotes', -> new ManageRemotesModal
mainController.on 'ManageDatabases', -> new ManageDatabasesModal
mainController.on 'AccountChanged', @bound 'accoun... | class SidebarController extends KDViewController
constructor:->
super
mainController = KD.getSingleton 'mainController'
mainController.on 'ManageRemotes', -> new ManageRemotesModal
mainController.on 'ManageDatabases', -> new ManageDatabasesModal
mainController.on 'AccountChanged', @bound 'accoun... | Fix the logic in SidebarController which triggers the FinderController reset to auto-mount vms | Fix the logic in SidebarController which triggers the FinderController
reset to auto-mount vms
| CoffeeScript | agpl-3.0 | jack89129/koding,gokmen/koding,koding/koding,jack89129/koding,usirin/koding,drewsetski/koding,cihangir/koding,rjeczalik/koding,cihangir/koding,usirin/koding,cihangir/koding,gokmen/koding,mertaytore/koding,szkl/koding,alex-ionochkin/koding,szkl/koding,rjeczalik/koding,jack89129/koding,gokmen/koding,cihangir/koding,rjecz... |
95a3b91ae1844f461e6f8dea9c243d14145c0d76 | app/assets/javascripts/backbone/views/messages/index_view.js.coffee | app/assets/javascripts/backbone/views/messages/index_view.js.coffee | Chamber.Views.Messages ||= {}
class Chamber.Views.Messages.IndexView extends Backbone.View
template: JST["backbone/templates/messages/index"]
initialize: () ->
#@options.messages.bind('reset', @addAll)
@options.messages.bind('add', @addOne)
#addAll: () =>
# @options.messages.each(@addOne)
addOn... | Chamber.Views.Messages ||= {}
class Chamber.Views.Messages.IndexView extends Backbone.View
template: JST["backbone/templates/messages/index"]
initialize: () ->
#@options.messages.bind('reset', @addAll)
@options.messages.bind('add', @addOne)
#addAll: () =>
# @options.messages.each(@addOne)
addOn... | Add scroll at new message | Add scroll at new message
| CoffeeScript | mit | espenhogbakk/chamber,espenhogbakk/chamber |
5939d57ca3883c52f1b007c570c0aa6a8b0aa609 | lib/bindings.coffee | lib/bindings.coffee | addBinding = ViewModel.addBinding
addBinding
name: 'text'
autorun: (c, bindArg) ->
bindArg.element.text bindArg.getVmValue()
return
addBinding
name: 'default'
bind: (bindArg) ->
bindArg.element.on bindArg.bindName, (event) ->
if ~bindArg.bindValue.indexOf(')', bindArg.bindValue.length - 1)
... | addBinding = ViewModel.addBinding
addBinding
name: 'default'
bind: (bindArg) ->
bindArg.element.on bindArg.bindName, (event) ->
if ~bindArg.bindValue.indexOf(')', bindArg.bindValue.length - 1)
bindArg.getVmValue()
else
bindArg.setVmValue(event)
return
return
addBinding
... | Add value, text, and html | Add value, text, and html
| CoffeeScript | mit | ManuelDeLeon/viewmodel |
d3488694a3b3dff907b2947f5b235960390064df | desktop/apps/artwork/components/inquire_via_phone/index.coffee | desktop/apps/artwork/components/inquire_via_phone/index.coffee | AuthModalView = require '../../../../components/auth_modal/view.coffee'
{ templateMap } = require '../../../../components/auth_modal/maps.coffee'
mediator = require '../../../../lib/mediator.coffee'
templateMap['phone_number'] = -> require('./templates/phone_number.jade') arguments...
module.exports = class InquireVi... | AuthModalView = require '../../../../components/auth_modal/view.coffee'
{ templateMap } = require '../../../../components/auth_modal/maps.coffee'
mediator = require '../../../../lib/mediator.coffee'
templateMap['phone_number'] = -> require('./templates/phone_number.jade') arguments...
module.exports = class InquireVi... | Refresh the whole page after logging in on the Inquire via Phone modal | Refresh the whole page after logging in on the Inquire via Phone modal
| CoffeeScript | mit | xtina-starr/force,artsy/force,kanaabe/force,joeyAghion/force,erikdstock/force,xtina-starr/force,anandaroop/force,anandaroop/force,cavvia/force-1,xtina-starr/force,kanaabe/force,eessex/force,artsy/force-public,joeyAghion/force,cavvia/force-1,erikdstock/force,erikdstock/force,izakp/force,kanaabe/force,yuki24/force,mzikhe... |
4f4816c5b5a62081d3240626c1a1f0836dd6b75f | app/routes/application.coffee | app/routes/application.coffee | `import BaseRoute from './_base'`
`import ajax from 'ic-ajax'`
Route = BaseRoute.extend
model: ->
mePath = '/api/me'
# return the current user as the model if authenticated, otherwise a blank object
new Ember.RSVP.Promise (resolve, reject) =>
ajax
url: mePath
dataType: 'json'
... | `import BaseRoute from './_base'`
`import ajax from 'ic-ajax'`
Route = BaseRoute.extend
model: ->
mePath = '/api/me'
# return the current user as the model if authenticated, otherwise a blank object
new Ember.RSVP.Promise (resolve, reject) =>
ajax
url: mePath
dataType: 'json'
... | Update user only on successful signin | Update user only on successful signin
| CoffeeScript | mit | artzte/fightbook-app |
8b337e522021f7fb9191cce0a7d9f2cb5e45b5d6 | src/components/buttons/browse-the-book.cjsx | src/components/buttons/browse-the-book.cjsx | React = require 'react'
BS = require 'react-bootstrap'
{CourseStore} = require '../../flux/course'
module.exports = React.createClass
displayName: 'BrowseTheBook'
contextTypes:
router: React.PropTypes.func
getDefaultProps: ->
bsStyle: 'primary'
propTypes:
courseId: React.PropTypes.string
ch... | React = require 'react'
BS = require 'react-bootstrap'
{CourseStore} = require '../../flux/course'
module.exports = React.createClass
displayName: 'BrowseTheBook'
contextTypes:
router: React.PropTypes.func
getDefaultProps: ->
bsStyle: 'primary'
propTypes:
courseId: React.PropTypes.string
ch... | Read book_id from course and use that for link | Read book_id from course and use that for link
| CoffeeScript | agpl-3.0 | openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js |
7e3752da5eba857a38a2819bfa36f61a58782012 | src/course/registration.cjsx | src/course/registration.cjsx | React = require 'react'
NewCourseRegistration = require './new-registration'
ModifyCourseRegistration = require './modify-registration'
UserStatus = require '../user/status-mixin'
Course = require './model'
CourseRegistration = React.createClass
propTypes:
collectionUUID: React.PropTypes.string.isRequired
... | React = require 'react'
NewCourseRegistration = require './new-registration'
ModifyCourseRegistration = require './modify-registration'
UserStatus = require '../user/status-mixin'
Course = require './model'
CourseRegistration = React.createClass
propTypes:
collectionUUID: React.PropTypes.string.isRequired
... | Modify needs to know current course | Modify needs to know current course
| CoffeeScript | agpl-3.0 | openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js |
454797f91d140ee25e11959893ac9b50e6c5bd0c | .atom/config.cson | .atom/config.cson | 'global':
'editor':
'showInvisibles': true
'preferredLineLength': 120
'softWrapped': true
'showIndentGuide': true
'fontSize': 12
'invisibles': {}
'core':
'disabledPackages': [
'metrics'
]
'themes': [
'atom-dark-ui'
'glitterbomb'
]
'exception-reporting':
... | 'global':
'editor':
'showInvisibles': true
'preferredLineLength': 120
'softWrapped': true
'showIndentGuide': true
'fontSize': 12
'invisibles': {}
'core':
'disabledPackages': [
'metrics'
]
'exception-reporting':
'userId': '2f6c1fe2-cfdb-87de-4712-11b4b505fed4'
'welcome':... | Remove glitterbomb as default template in atom | Remove glitterbomb as default template in atom
| CoffeeScript | mit | rollbrettler/dotfiles,rollbrettler/dotfiles,rollbrettler/dotfiles,rollbrettler/dotfiles |
de46276e9afb274ae5d03868353188cdd3fce424 | src/app.coffee | src/app.coffee | # App
# ===
# Highest-level application script.
# Dependencies
# ------------
# Configure RequireJS. Dependency references default to the `lib` directory.
# We're using CoffeeScript, so our `app` package code is in the compiled js
# directory `release`.
requirejs.config
baseUrl: 'lib'
paths:
app: '../release'
... | # App
# ===
# Highest-level application script.
# Dependencies
# ------------
# Configure RequireJS. Dependency references default to the `lib` directory.
# We're using CoffeeScript, so our `app` package code is in the compiled js
# directory `release`.
requirejs.config
baseUrl: 'lib'
paths:
app: '../release'
... | Fix AMD and Phaser integration. | Fix AMD and Phaser integration. | CoffeeScript | artistic-2.0 | hlfcoding/morning-stroll |
0f15015834ead9904039cefd4ce51b77184d8291 | scripts/hot-topics.coffee | scripts/hot-topics.coffee | # Let people know of emergent / constant questions
#
# hot topic anything = whatever you want to rememeber
# forget hot topic anything
# hot topics
module.exports = (robot) ->
robot.brain.data.hot_topics or= {}
robot.respond /hot topic (.*) = (.*)/i, (msg) ->
robot.brain.data.hot_topics[msg.match[1].toLowerCa... | # Let people know of emergent / constant questions
#
# hot topic anything = whatever you want to rememeber
# forget hot topic anything
# hot topics
module.exports = (robot) ->
robot.brain.data.hot_topics or= {}
robot.respond /hot topic (.*) = (.*)/i, (msg) ->
robot.brain.data.hot_topics[msg.match[1].toLowerCa... | Allow regexp in hot topics | Allow regexp in hot topics | CoffeeScript | mit | RiotGamesMinions/lefay,RiotGamesMinions/lefay |
b8b2af87570034892a0117067f5280a06680c4da | server.coffee | server.coffee | dgram = require "dgram"
class ListenServer
passphrase: ''
handleMessage: (msg, rinfo) ->
try
data = JSON.parse(msg)
if data and @checkPassphrase(data)
@incomingData(data)
checkPassphrase: (data) ->
if @passphrase == ''
true
else
data.passphrase and data.passphrase == ... | dgram = require "dgram"
class ListenServer
passphrase: ''
handleMessage: (msg, rinfo) ->
try
data = JSON.parse(msg)
if data and @checkPassphrase(data)
@incomingData(data)
checkPassphrase: (data) ->
if @passphrase == ''
true
else
data.passphrase and data.passphrase == ... | Comment out listening event for now | Comment out listening event for now | CoffeeScript | mit | findmejobs/fire-and-forget,findmejobs/fire-and-forget |
945fb8a1948352d5faff7a64fa99fead409ab44a | client/views/locations/location_edit.coffee | client/views/locations/location_edit.coffee | # fillOptions = () ->
# $('#selectLocation').
Template.locationEdit.created = () ->
Meteor.call 'getOptions', (error, result) ->
locationsData = JSON.parse result
locations = locationsData.locations
for location in locations
$('#selectLocation').append '<option>'+location.name+'</option>'
Templ... | fillOptions = (name) ->
$('#selectLocation').append '<option>' + name + '</option>'
Template.locationEdit.created = () ->
Meteor.call 'getOptions', (error, result) ->
locationsData = JSON.parse result
locations = locationsData.locations
for location in locations
fillOptions location.name
Templa... | Add fillingOptions as its own method | Add fillingOptions as its own method
| CoffeeScript | mit | josephktcheung/pdf |
973012686f0875618427956c284aecf1fea95219 | app/assets/javascripts/map.js.coffee | app/assets/javascripts/map.js.coffee | # medellin coords 6.29, -75.54
map_center = new google.maps.LatLng(19.311143,-39.199219)
marker = null
map = null
initialize_map = ->
mapOptions =
zoom: 2,
scrollwheel: false,
mapTypeId: google.maps.MapTypeId.ROADMAP,
center: map_center
map = new google.maps.Map(document.getElementById('mapa'), ma... | # medellin coords 6.29, -75.54
map_center = new google.maps.LatLng(19.311143,-39.199219)
marker = null
map = null
initialize_map = ->
mapOptions =
zoom: 2,
scrollwheel: false,
draggable: true,
panControl: true,
mapTypeId: google.maps.MapTypeId.ROADMAP,
center: map_center
map = new google.m... | Add additional controls to the index page Map | Add additional controls to the index page Map
| CoffeeScript | mit | jasnow/contrib-hub,orendon/contrib-hub,jasnow/contrib-hub,orendon/contrib-hub,orendon/contrib-hub,jasnow/contrib-hub |
ada17fa3b82e6da4e7a1553d7fafcf8c046e053f | app/assets/javascripts/ppt.js.coffee | app/assets/javascripts/ppt.js.coffee | loadPpt = ->
pptData = StrutBuilder.build(JSON.parse(localStorage.regions))
#[
#{ #slide 1
#start: 0,
#end: 2.5,
#texts: [
#{text: 'Hum', position: 1.2},
#{text: 'bewafaa', position: 1.7}
#]
#},
#{ #slide 2
#start: ... | loadPpt = ->
pptData = StrutBuilder.build(JSON.parse(localStorage.regions))
#[
#{ #slide 1
#start: 0,
#end: 2.5,
#texts: [
#{text: 'Hum', position: 1.2},
#{text: 'bewafaa', position: 1.7}
#]
#},
#{ #slide 2
#start: ... | Add strut session initial data, for fixing first-load bug | Add strut session initial data, for fixing first-load bug
| CoffeeScript | mit | shirshendu/kine_type,shirshendu/kine_type,shirshendu/kine_type,shirshendu/kine_type |
2d4e5ee9cf1c47c2b403ee3664a5fbd3176f93da | app/assets/javascripts/stores/article_store.coffee | app/assets/javascripts/stores/article_store.coffee | StockStore = require './stock_store.coffee'
ArticleStore = new StockStore(
sortKey: 'title'
sortAsc: true
descKeys:
character_sum: true
view_count: true
modelKey: 'article'
)
module.exports = ArticleStore.store
| StockStore = require './stock_store.coffee'
ArticleStore = new StockStore(
sortKey: 'character_sum'
descKeys:
character_sum: true
view_count: true
modelKey: 'article'
)
module.exports = ArticleStore.store
| Change default sort to character_sum for Articles | Change default sort to character_sum for Articles
| CoffeeScript | mit | MusikAnimal/WikiEduDashboard,sejalkhatri/WikiEduDashboard,KarmaHater/WikiEduDashboard,Wowu/WikiEduDashboard,KarmaHater/WikiEduDashboard,majakomel/WikiEduDashboard,sejalkhatri/WikiEduDashboard,MusikAnimal/WikiEduDashboard,sejalkhatri/WikiEduDashboard,Wowu/WikiEduDashboard,feelfreelinux/WikiEduDashboard,WikiEducationFoun... |
7f23cf9997a2a690850b8e5ccae4fbb2e64bc2a3 | src/common/finish_game.coffee | src/common/finish_game.coffee | $ = require 'jquery'
FinishGame =
submitResults: (state) ->
window.onbeforeunload = ->
gameParams = {rounds: state.round.get('rounds').toJS()}
gameId = state.game.get('id')
$.ajax
url: "/games/#{gameId}/finish"
data: { game: gameParams }
method: 'PUT'
headers:
'X-CSRF-T... | $ = require 'jquery'
FinishGame =
submitResults: (state) ->
window.onbeforeunload = ->
$('#finish-game-button').html('Finishing Game...')
$('#finish-game-button').attr('disabled', true)
gameParams = {rounds: state.round.get('rounds').toJS()}
gameId = state.game.get('id')
$.ajax
url: "/g... | Disable finish game on click | Disable finish game on click
| CoffeeScript | mit | rossfoley/darts-react,rossfoley/darts-react |
fe0d3739450aacca215b676ca3a1fd184fb4cc26 | src/trix/models/attachment.coffee | src/trix/models/attachment.coffee | #= require trix/utilities/object
class Trix.Attachment extends Trix.Object
constructor: (@file) ->
| #= require trix/utilities/object
class Trix.Attachment extends Trix.Object
constructor: (@file) ->
super
| Call super so we get an id | Call super so we get an id
| CoffeeScript | mit | urossmolnik/trix,ChenMichael/trix,basecamp/trix,GabiGrin/trix,ChenMichael/trix,urossmolnik/trix,GabiGrin/trix,basecamp/trix,GabiGrin/trix,urossmolnik/trix,ChenMichael/trix,basecamp/trix,basecamp/trix |
bf01a66505e06e5f149bccf36e561c96a770b279 | app/scripts/controllers/main.coffee | app/scripts/controllers/main.coffee | 'use strict'
angular.module('ccApp.controllers')
.controller 'MainCtrl', ($scope, _, questions, scores) ->
questionsByCategory = _.groupBy questions, (question) -> question.tags[0]
$scope.questions = questions
$scope.questionGroups = questionsByCategory
$scope.sections = _.keys(questionsByCategory)
$scope... | 'use strict'
angular.module('ccApp.controllers')
.controller 'MainCtrl', ($scope, _, questions, scores) ->
questionsByCategory = _.groupBy questions, (question) -> question.tags[0]
$scope.questions = questions
$scope.questionGroups = questionsByCategory
$scope.sections = _.keys(questionsByCategory)
$scope... | Add watch on questions, so that scores are updated in real time | Add watch on questions, so that scores are updated in real time
| CoffeeScript | mit | iparips/code-cutter,iparips/code-cutter |
1d3a4f5072722cba4c15d4d37536331f9f439457 | lib/snippet-body-parser.coffee | lib/snippet-body-parser.coffee | PEG = require 'pegjs'
{fs} = require 'atom'
grammarSrc = fs.readFileSync(require.resolve('./snippet-body.pegjs'), 'utf8')
module.exports = PEG.buildParser(grammarSrc, trackLineAndColumn: true)
| try
parser = require './snippet-body'
catch
{fs} = require 'atom'
PEG = require 'pegjs'
grammarSrc = fs.readFileSync(require.resolve('./snippet-body.pegjs'), 'utf8')
parser = PEG.buildParser(grammarSrc, trackLineAndColumn: true)
module.exports = parser
| Use pre-compiled parser when available | Use pre-compiled parser when available
| CoffeeScript | mit | bengy/snippets,terrycloth/atom-snippets,lpommers/snippets,syndbg/snippets,atom/snippets |
7733c133666c8719dc4528c8cb6fef8e15ec61e5 | lib/main.coffee | lib/main.coffee | module.exports =
config:
autocompleteBrackets:
type: 'boolean'
default: true
autocompleteSmartQuotes:
type: 'boolean'
default: true
wrapSelectionsInBrackets:
type: 'boolean'
default: true
activate: ->
atom.workspace.observeTextEditors (editor) ->
editorElem... | BracketMatcherView = null
BracketMatcher = null
module.exports =
config:
autocompleteBrackets:
type: 'boolean'
default: true
autocompleteSmartQuotes:
type: 'boolean'
default: true
wrapSelectionsInBrackets:
type: 'boolean'
default: true
activate: ->
atom.workspac... | Use ?= to assign deferred requires | :art: Use ?= to assign deferred requires
| CoffeeScript | mit | atom/bracket-matcher,adamCoGithub/Bracket-Matcher-no-autoclose,jacekkopecky/bracket-matcher,lpommers/bracket-matcher,adamCoGithub/Bracket-Matcher-no-smart-quotes,jacekkopecky/bracket-matcher,bwinton/bracket-matcher,adamCoGithub/Bracket-Matcher-no-autoclose,adamCoGithub/Bracket-Matcher-no-smart-quotes,bwinton/bracket-ma... |
c88c7112790dccd554c6cc9c913a3dbae5fba334 | app/assets/javascripts/backbone/routers/trees_controller.js.coffee | app/assets/javascripts/backbone/routers/trees_controller.js.coffee | class Water.TreesController extends Backbone.Router
routes:
"/tree/*path": "fetch_tree"
"/blob/*path": "fetch_blob"
"*anything": "root"
fetch_tree: (path) ->
@fetcher.fetch("trees", path)
fetch_blob: (path) ->
@fetcher.fetch("blobs", path)
root: () ->
@fetcher.fetch("trees", "")
... | # Takes care of routing.
# Relays data to breadcrumbs and tree_fetcher models
class Water.TreesController extends Backbone.Router
initialize: (params) =>
@fetcher = params.fetcher
@breadcrumbs = params.breadcrumbs
routes:
"/tree/*path": "fetch_tree"
"/blob/*path": "fetch_blob"
"*anything": "ro... | Add breadcrumb methods in router | Add breadcrumb methods in router
| CoffeeScript | agpl-3.0 | water/mainline,water/mainline,water/mainline |
d6675ac2ec2648616cdc5b69f733a0a3ce32091a | app/coffee/modules/projects.coffee | app/coffee/modules/projects.coffee | module = angular.module("taigaProject", [])
| ###
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino Garcia <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán Merino <bameda@dbarragan.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
... | Add copiright and license terms | Add copiright and license terms
| CoffeeScript | agpl-3.0 | Rademade/taiga-front,joshisa/taiga-front,allistera/taiga-front,CMLL/taiga-front,CoolCloud/taiga-front,seanchen/taiga-front,bartuspan/taiga-front,Comi9/taiga-front,astagi/taiga-front,dycodedev/taiga-front,topalavlad/taiga-front,trimolesi/taiga-front,mikkame/taiga-front,artlepool/taiga-front,trimolesi/taiga-front,dycoded... |
7c5d8520728f91f315e1d89c868967b29eb9e16e | SingularityUI/app/utils.coffee | SingularityUI/app/utils.coffee | class Utils
getHTMLTitleFromHistoryFragment: (fragment) ->
_.capitalize(fragment.split('\/').join(' '))
stringJSON: (object) ->
JSON.stringify object, null, ' '
viewJSON: (object) ->
vex.dialog.alert
contentCSS:
width: 800
message: "<pre>... | class Utils
getHTMLTitleFromHistoryFragment: (fragment) ->
_.capitalize(fragment.split('\/').join(' '))
stringJSON: (object) ->
JSON.stringify object, null, ' '
viewJSON: (object) ->
objectClone = _.extend {}, object
delete objectClone.JSONString
vex.dialog.aler... | Remove JSONString property when displaying JSON | Remove JSONString property when displaying JSON | CoffeeScript | apache-2.0 | evertrue/Singularity,nvoron23/Singularity,stevenschlansker/Singularity,stevenschlansker/Singularity,tejasmanohar/Singularity,calebTomlinson/Singularity,acbellini/Singularity,hs-jenkins-bot/Singularity,stevenschlansker/Singularity,acbellini/Singularity,acbellini/Singularity,tejasmanohar/Singularity,mjball/Singularity,gr... |
12d0ae0fcce0531bfe6d9e2d8b0cce0e19c4a6d6 | app/assets/javascripts/resolve/holding_requests.js.coffee | app/assets/javascripts/resolve/holding_requests.js.coffee | $ ->
scan_request_option_id = '#entire_no'
scan_request_container_class = '#holding-request-option-offsite-scan'
# Select scan request if any of the text inputs have a value
$(document).on 'keypress', scan_request_container_class + ' fieldset input', ->
$(this).closest('fieldset').prev('label').find('input'... | $ ->
scan_request_option_id = '#entire_no'
scan_request_container_class = '[id^=holding-request-option][id$=-scan]'
# Select scan request if any of the text inputs have a value
$(document).on 'keypress', scan_request_container_class + ' fieldset input', ->
$(this).closest('fieldset').prev('label').find('inp... | Change holding request JS to select scans regardless of holding status div id | Change holding request JS to select scans regardless of holding status div id
| CoffeeScript | mit | NYULibraries/getit,NYULibraries/getit,NYULibraries/getit,NYULibraries/getit |
6e955f8070d4daac31f6e00245330dc36098ff90 | lib/main.coffee | lib/main.coffee | commandDisposable = null
grammarListView = null
grammarStatusView = null
module.exports =
config:
showOnRightSideOfStatusBar:
type: 'boolean'
default: true
activate: ->
commandDisposable = atom.commands.add('atom-text-editor', 'grammar-selector:show', createGrammarListView)
deactivate: ->
... | commandDisposable = null
grammarListView = null
grammarStatusView = null
module.exports =
config:
showOnRightSideOfStatusBar:
type: 'boolean'
default: true
description: 'Show the active pane item\'s langauge on the right side of Atom\'s status bar, instead of the left.'
activate: ->
comm... | Add description for config setting | Add description for config setting
| CoffeeScript | mit | atom/grammar-selector |
db07c7e3d74a2c57de07c21b43d1997b7ce738c6 | lib/main.coffee | lib/main.coffee | module.exports = s =
# Convenience method: wrap services in complete middleware stack
# accepts {serviceName: serviceDef}
# returns {serviceName: serviceDef} (wrapped)
create: (defs, jargon=[], policy=[], resolvers={}) ->
services = s.process defs, jargon
withPolicy = s.applyPolicy services, policy
... | module.exports = s =
# Convenience method: wrap services in complete middleware stack
# accepts {serviceName: serviceDef}
# returns {serviceName: serviceDef} (wrapped)
create: (defs, jargon=[], policy=[], resolvers={}) ->
services = s.process defs, jargon
withPolicy = s.applyPolicy services, policy
... | Fix syntax error in export | Fix syntax error in export
| CoffeeScript | mit | TorchlightSoftware/law |
a65bfa3c0b2b71b03bb212d9ab2f3b463d617d0e | src/fs_utils/write.coffee | src/fs_utils/write.coffee | 'use strict'
async = require 'async'
sysPath = require 'path'
inflection = require 'inflection'
GeneratedFile = require './generated_file'
getGeneratedFilesPaths = (sourceFile, joinConfig) ->
sourceFileJoinConfig = joinConfig[inflection.pluralize sourceFile.type] or {}
Object.keys(sourceFileJoinConfig).filter (ge... | 'use strict'
async = require 'async'
sysPath = require 'path'
inflection = require 'inflection'
GeneratedFile = require './generated_file'
getGeneratedFilesPaths = (sourceFile, joinConfig) ->
sourceFileJoinConfig = joinConfig[inflection.pluralize sourceFile.type] or {}
Object.keys(sourceFileJoinConfig).filter (ge... | Fix calling callback after writing of every file. | Fix calling callback after writing of every file.
| CoffeeScript | mit | brunch/brunch,hellyeahllc/brunch,rlugojr/brunch,Flaise/brunch,kidaa/brunch,hayesgm/brunch,lalomartins/brunch,justinwoo/brunch,PeterDaveHello/brunch,ondreian/brunch |
751953765777faafc2ff4548d7ceb782c177b983 | app/coffee/DockerRunner.coffee | app/coffee/DockerRunner.coffee | spawn = require("child_process").spawn
exec = require("child_process").exec
logger = require "logger-sharelatex"
module.exports = DockerRunner =
_docker: 'docker'
_baseCommand: ['run', '--rm=true', '-t', '-v', '$COMPILE_DIR:/source', '--name=texlive-$PROJECT_ID', 'texlive']
run: (project_id, command, directory... | spawn = require("child_process").spawn
exec = require("child_process").exec
logger = require "logger-sharelatex"
Settings = require "settings-sharelatex"
module.exports = DockerRunner =
_docker: 'docker'
_baseCommand: ['run', '--rm=true', '-t', '-v', '$COMPILE_DIR:/source', '--name=texlive-$PROJECT_ID']
run: ... | Implement docker based latex compilation. | Implement docker based latex compilation.
Implement a docker based command runner that runs compilation in a docker container, for added isolation and security.
This implementation also supports timeouts.
| CoffeeScript | agpl-3.0 | EDP-Sciences/clsi-sharelatex |
95a1dcc51cc61eca11bcaef9432e4a6a16b0f09a | _coffee/keyboard.coffee | _coffee/keyboard.coffee | bindArrows = ->
Mousetrap.bind 'left', ->
if jekyll_page_previous? and not window.disable_keyboard_nav
Turbolinks.visit(jekyll_page_previous)
Mousetrap.bind 'right', ->
if jekyll_page_next? and not window.disable_keyboard_nav
Turbolinks.visit(jekyll_page_next)
# Mousetrap.bind 'up', ->
# if ... | bindArrows = ->
Mousetrap.bind 'left', ->
if jekyll_page_previous? and not window.disable_keyboard_nav
Turbolinks.visit(jekyll_page_previous)
Mousetrap.bind 'right', ->
if jekyll_page_next? and not window.disable_keyboard_nav
Turbolinks.visit(jekyll_page_next)
# Mousetrap.bind 'up', ->
# if ... | Fix debug mode toggle not persisting between turbonav bug | Fix debug mode toggle not persisting between turbonav bug
| CoffeeScript | mit | johnathan99j/history-project,johnathan99j/history-project,johnathan99j/history-project,johnathan99j/history-project,newtheatre/history-project,newtheatre/history-project,johnathan99j/history-project,newtheatre/history-project,newtheatre/history-project,newtheatre/history-project |
25df1907640b4174fb872792bd59f85272688afb | src/code/data/migrations/migrations.coffee | src/code/data/migrations/migrations.coffee | # Add new migrations here.
# I wasn't able to get automatic path globed `require` to work with gulp.
migrations = [
require "./01_base"
require "./02_add_initial_values"
]
module.exports =
migrations: migrations
update: (data) ->
for m in migrations
if m.update
data = m.update(data)
data
... | # Add new migrations here.
# I wasn't able to get automatic path globed `require` to work with gulp.
migrations = [
require "./01_base"
]
module.exports =
migrations: migrations
update: (data) ->
for m in migrations
if m.update
data = m.update(data)
data
latestVersion: ->
@lastMigrat... | Fix tests:, rm non-existant migration. | Fix tests:, rm non-existant migration.
| CoffeeScript | mit | concord-consortium/building-models,concord-consortium/building-models,concord-consortium/building-models,concord-consortium/building-models,concord-consortium/building-models |
6077899813fcfa4a58bdb4307bba667376e05e40 | client/Login/AppController.coffee | client/Login/AppController.coffee | class LoginAppsController extends AppController
KD.registerAppClass this,
name : "Login"
route : [
'/:name?/Login'
'/:name?/Redeem'
'/:name?/Register'
'/:name?/Recover'
'/:name?/ResendToken'
]
hiddenHandle : yes
labels : ['Redeem', 'Register', 'R... | class LoginAppsController extends AppController
KD.registerAppClass this,
name : "Login"
route : [
'/:name?/Login'
'/:name?/Redeem'
'/:name?/Register'
'/:name?/Recover'
'/:name?/ResendToken'
]
hiddenHandle : yes
labels : ['Redeem', 'Register', 'R... | Handle all type of calling for the app, you can either use router or applicationManager | Login: Handle all type of calling for the app, you can either use router or applicationManager | CoffeeScript | agpl-3.0 | acbodine/koding,acbodine/koding,rjeczalik/koding,jack89129/koding,cihangir/koding,szkl/koding,szkl/koding,drewsetski/koding,koding/koding,kwagdy/koding-1,gokmen/koding,gokmen/koding,sinan/koding,drewsetski/koding,usirin/koding,cihangir/koding,szkl/koding,rjeczalik/koding,usirin/koding,mertaytore/koding,gokmen/koding,dr... |
b4bcda41bf161c858d0c367f88354abf109317f8 | test/helpers/index.coffee | test/helpers/index.coffee | app = require '../../test.js'
_ = require 'underscore'
module.exports =
Backbone: app.Backbone
chai: require 'chai'
require: (path) ->
app.require path
| app = require '../../test.js'
_ = require 'underscore'
module.exports =
Backbone: app.Backbone
chai: require 'chai'
require: (path) ->
app.stitchRequire path
| Use stitchRequire stitch identifier in test helper | Use stitchRequire stitch identifier in test helper
| CoffeeScript | mit | trabian/titanium-backbone,vcu/titanium-backbone,trabian/titanium-backbone,vcu/titanium-backbone |
cb5c53111b95bf90926b84e43b7bdb53a91702ae | client/landing/app/Applications/Chat.kdapplication/Views/mainchatpanel.coffee | client/landing/app/Applications/Chat.kdapplication/Views/mainchatpanel.coffee | class MainChatPanel extends JView
constructor:->
super
cssClass : 'main-chat-panel visible'
@registerSingleton "chatPanel", @, yes
@header = new MainChatHeader
@conversationList = new ChatConversationListView
@conversationListController = new ChatConversationListController
view : @c... | class MainChatPanel extends JView
constructor:->
super
cssClass : 'main-chat-panel'
@registerSingleton "chatPanel", @, yes
@header = new MainChatHeader
@conversationList = new ChatConversationListView
@conversationListController = new ChatConversationListController
view : @conversat... | Hide the panel when it looses focues | Hide the panel when it looses focues
| CoffeeScript | agpl-3.0 | usirin/koding,rjeczalik/koding,acbodine/koding,alex-ionochkin/koding,mertaytore/koding,acbodine/koding,gokmen/koding,usirin/koding,andrewjcasal/koding,andrewjcasal/koding,cihangir/koding,mertaytore/koding,mertaytore/koding,drewsetski/koding,mertaytore/koding,drewsetski/koding,rjeczalik/koding,usirin/koding,koding/kodin... |
703b4bcd11e42a37dbfb076ff3ebaf85009ad533 | app/assets/javascripts/routes/admin_route.js.coffee | app/assets/javascripts/routes/admin_route.js.coffee | ETahi.AdminRoute = ETahi.AuthorizedRoute.extend
actions:
viewUserDetails: (user) ->
@controllerFor('adminJournalUser').set('model', user)
@render 'userDetailOverlay',
into: 'application'
outlet: 'overlay'
controller: 'adminJournalUser'
didTransition: ->
$('html').att... | ETahi.AdminRoute = ETahi.AuthorizedRoute.extend
beforeModel: ->
Ember.$.ajax '/admin/journals/authorization',
headers:
'Tahi-Authorization-Check': true
actions:
viewUserDetails: (user) ->
@controllerFor('adminJournalUser').set('model', user)
@render 'userDetailOverlay',
in... | Add authorization check on admin route. | Add authorization check on admin route.
Since we're loading the model asynchronously a 403
from the server won't trigger the error state and the
subsequent transition back to the dashboard.
| CoffeeScript | mit | johan--/tahi,johan--/tahi,johan--/tahi,johan--/tahi |
91887afe6e99c6ab5480d928a424bfaff6c3f72b | app/assets/javascripts/spree/frontend/spree_multi_currency.js.coffee | app/assets/javascripts/spree/frontend/spree_multi_currency.js.coffee | $ ->
$('#currency').change ->
$.ajax(
type: 'POST'
url: $(this).data('href')
data:
currency: $(this).val()
).done ->
window.location.reload()
| $ ->
$('#currency').on 'change', ->
$.ajax(
type: 'POST'
url: $(this).data('href')
data:
currency: $(this).val()
).done ->
window.location.reload()
| Use jQuery "on" for event hook. | Use jQuery "on" for event hook.
| CoffeeScript | bsd-3-clause | Lostmyname/spree_multi_currency,Lostmyname/spree_multi_currency,Lostmyname/spree_multi_currency |
1d5bef4274ce7a5957c724850cc1ac3de6d87de4 | spec/custom-element-spec.coffee | spec/custom-element-spec.coffee | describe 'Custom Element Base', ->
registerCustomElement = require('../base.min.js')
{getCustomElement} = require('./helper')
it 'fires the events in order', ->
lastRan = null
element = new (registerCustomElement(getCustomElement({
name: 'x-custom-element'
created: -> lastRan = 'created'
... | describe 'Custom Element Base', ->
registerCustomElement = require('../base.min.js')
{getCustomElement} = require('./helper')
it 'fires the events in order', ->
lastRan = null
element = new (registerCustomElement(getCustomElement({
name: 'x-spec-event-order'
created: -> lastRan = 'created'
... | Add a spec about attribute change firing | :new: Add a spec about attribute change firing
| CoffeeScript | mit | steelbrain/custom-element-base,steelbrain/custom-element-base |
310a1341a19019cc0dd31f12c122eaf5e5988180 | services/web/public/coffee/ide/review-panel/directives/reviewPanelToggle.coffee | services/web/public/coffee/ide/review-panel/directives/reviewPanelToggle.coffee | define [
"base"
], (App) ->
App.directive "reviewPanelToggle", () ->
restrict: "E"
scope:
onToggle: '&'
ngModel: '='
disabled: '=?'
onDisabledClick: '=?'
link: (scope) ->
if !scope.disabled?
scope.disabled = false
scope.onChange = (args...) ->
scope.onToggle({ isOn: scope.localModel }... | define [
"base"
], (App) ->
App.directive "reviewPanelToggle", () ->
restrict: "E"
scope:
onToggle: '&'
ngModel: '='
valWhenUndefined: '=?'
disabled: '=?'
onDisabledClick: '=?'
link: (scope) ->
if !scope.disabled?
scope.disabled = false
scope.onChange = (args...) ->
scope.onToggle(... | Support a default value when undefined in the review panel toggles. | Support a default value when undefined in the review panel toggles.
| CoffeeScript | agpl-3.0 | sharelatex/sharelatex |
0c482cd8a71c803422b2791fc7f5666d77974d2b | test/models/time_entry.coffee | test/models/time_entry.coffee | TimeEntry = require '../../models/time_entry'
should = require 'should'
makeT = (offset = 10) ->
t = new TimeEntry
start: new Date() - 5
end: new Date() - offset
duration: 60 * 60
message: 'message goes here'
userId: 'someuserID'
projectId: 'someprojectID'
describe 'TimeEntry Model', ->
it... | TimeEntry = require '../../models/time_entry'
should = require 'should'
makeT = (offset = 10) ->
t = new TimeEntry
start: new Date() - 5
end: new Date() - offset
message: 'message goes here'
userId: 'someuserID'
projectId: 'someprojectID'
describe 'TimeEntry Model', ->
it 'should be able to cr... | Add a validation checker for time entry | Add a validation checker for time entry
| CoffeeScript | bsd-3-clause | t3mpus/tempus-api |
720b8f324e904724042c901434e42006ef94d1fa | Gruntfile.coffee | Gruntfile.coffee | module.exports = (grunt) ->
grunt.initConfig
nodewebkit:
options:
build_dir: './builds'
version: '0.8.3'
mac: true
win: true
linux32: false
linux64: false
src: [ './src/**/*' ]
grunt.loadNpmTasks 'grunt-node-webkit-builder'
grunt.registerTask 'defau... | module.exports = (grunt) ->
grunt.initConfig
nodewebkit:
options:
build_dir: './builds'
version: '0.8.4'
mac: true
win: true
linux32: false
linux64: false
src: [ './src/**/*' ]
grunt.loadNpmTasks 'grunt-node-webkit-builder'
grunt.registerTask 'defau... | Update node-webkit version for builder | Update node-webkit version for builder
| CoffeeScript | mit | MaxSvargal/syncstray |
746dc8cef7ddca61ce0d77e9febfaf61540a2f31 | keymaps/coffee-compile.cson | keymaps/coffee-compile.cson | # Keybindings require three things to be fully defined: A selector that is
# matched against the focused element, the keystroke and the command to
# execute.
#
# Below is a basic keybinding which registers on all platforms by applying to
# the root workspace element.
# For more detailed documentation see
# https://ato... | # Keybindings require three things to be fully defined: A selector that is
# matched against the focused element, the keystroke and the command to
# execute.
#
# Below is a basic keybinding which registers on all platforms by applying to
# the root workspace element.
# For more detailed documentation see
# https://ato... | Add keybindings for win32 and linux | Add keybindings for win32 and linux
| CoffeeScript | mit | adrianlee44/atom-coffee-compile |
90a9c98dc0ff32c0b1765d2500482c7f2f7ecb21 | app/assets/javascripts/spree/backend/solidus_virtual_gift_card.coffee | app/assets/javascripts/spree/backend/solidus_virtual_gift_card.coffee | window.GiftCards =
_bindLookupGiftCard: ->
$(document).on('submit', '#lookup-redemption-code', (event) ->
event.preventDefault()
window.location.href = $(this).attr('action') + '/' + $(this).find('#gift_card_redemption_code').val()
)
init: ->
@_bindLookupGiftCard()
setAdminDatepicker: ()... | window.GiftCards =
_bindLookupGiftCard: ->
$(document).on('submit', '#lookup-redemption-code', (event) ->
event.preventDefault()
window.location.href = $(this).attr('action') + '/' + $(this).find('#gift_card_redemption_code').val()
)
init: ->
@_bindLookupGiftCard()
setAdminDatepicker: ()... | Set datepicker when there is a datepicker on the page | Set datepicker when there is a datepicker on the page
| CoffeeScript | bsd-3-clause | solidusio/solidus_virtual_gift_card,solidusio/solidus_virtual_gift_card |
3ac557dd2190a9ee983393509f3d2085f1368c8f | main.coffee | main.coffee | vorpal = require 'vorpal'
chalk = vorpal().chalk
_ = require 'underscore'
awkward = vorpal()
.delimiter process.env.USER+'@awk'
.localStorage 'awkward@iostreamer'
.history 'awkward@iostreamer/history'
global.chalk = chalk
global.awkward = awkward
global._ = _
require('./terminal/main')(awkward)
... | vorpal = require 'vorpal'
chalk = vorpal().chalk
_ = require 'underscore'
os = require 'os'
user = process.env.USER
user = process.env.USERNAME if (os.platform() is "win32")
awkward = vorpal()
.delimiter user + '@awk'
.localStorage 'awkward@iostreamer'
.history 'awkward@iostreamer/history'
globa... | Fix undefined username in Windows | Fix undefined username in Windows
| CoffeeScript | mit | iostreamer-X/Awkward |
a25e890fcfc525d1c997eb7f5541aa78c34bdfc3 | src/ac-webhooks.coffee | src/ac-webhooks.coffee | # Description:
# Listens for ac webhooks and post in chat
#
# Dependencies:
# None
#
# Configuration:
# None
#
# Commands:
# None
#
# Notes:
# None
#
# Author:
# digitalsadhu
module.exports = (robot) ->
robot.router.get "/hubot/ac-webhooks", (req, res) ->
robot.send "ac webhooks url hit!" | # Description:
# Listens for ac webhooks and post in chat
#
# Dependencies:
# None
#
# Configuration:
# None
#
# Commands:
# None
#
# Notes:
# None
#
# Author:
# digitalsadhu
module.exports = (robot) ->
robot.router.post "/hubot/ac-webhooks", (req, res) ->
console.log req.body
user = {}
user.r... | Add post hook endpoint and console logging | Add post hook endpoint and console logging
| CoffeeScript | mit | mediasuitenz/hubot-ac-webhooks |
2b8b7542bc9e13278b74ec75333960dabe90b180 | app/components/loading-indicator.cjsx | app/components/loading-indicator.cjsx | React = require 'react'
module.exports = React.createClass
displayName: 'LoadingIndicator'
render: ->
<span {...@props} className="loading-indicator">
<span>•</span>
<span>•</span>
<span>•</span>
</span>
| React = require 'react'
module.exports = React.createClass
displayName: 'LoadingIndicator'
render: ->
# TODO
<i className="fa fa-spin fa-spinner"></i>
| Simplify loading indicator for now | Simplify loading indicator for now | CoffeeScript | apache-2.0 | CKrawczyk/Panoptes-Front-End,parrish/Panoptes-Front-End,marten/Panoptes-Front-End,fmnhExhibits/Panoptes-Front-End,CKrawczyk/Panoptes-Front-End,jelliotartz/Panoptes-Front-End,alexbfree/Panoptes-Front-End,fmnhExhibits/Panoptes-Front-End,marten/Panoptes-Front-End,tfmorris/Panoptes-Front-End,aliburchard/Panoptes-Front-End,... |
58cf5b23ffd75ec994e8e7231fc659df4cc55c5d | atom/init.coffee | atom/init.coffee | # Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
path = require 'path'
oldWindowDimensions = {}
oldThemes = []
atom.commands.add 'atom-workspace',
'custom:open-todo-list':... | # Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
path = require 'path'
oldWindowDimensions = {}
oldThemes = []
atom.commands.add 'atom-workspace',
'custom:open-todo-list':... | Convert command creation to new syntax | Convert command creation to new syntax
| CoffeeScript | mit | lee-dohm/dotfiles,lee-dohm/dotfiles,lee-dohm/dotfiles,lee-dohm/dotfiles |
bbaf87906087ef78313c44005dc925893e2df6fc | app/assets/javascripts/dot_ledger/views/reports/income_and_expenses/filter.js.coffee | app/assets/javascripts/dot_ledger/views/reports/income_and_expenses/filter.js.coffee | DotLedger.module 'Views.Reports.IncomeAndExpenses', ->
class @Filter extends Backbone.Marionette.ItemView
template: 'reports/income_and_expenses/filter'
className: 'nav nav-pills nav-justified'
tagName: 'ul'
events:
'click .period a': 'clickPeriod'
onRender: ->
@$el.find(".period.p... | DotLedger.module 'Views.Reports.IncomeAndExpenses', ->
class @Filter extends Backbone.Marionette.ItemView
template: 'reports/income_and_expenses/filter'
className: 'nav nav-small nav-pills'
tagName: 'ul'
events:
'click .period a': 'clickPeriod'
onRender: ->
@$el.find(".period.perio... | Use small pills for the income and expenses report. | Use small pills for the income and expenses report.
| CoffeeScript | apache-2.0 | malclocke/dotledger,malclocke/dotledger,dotledger/dotledger,malclocke/dotledger,dotledger/dotledger,dotledger/dotledger,dotledger/dotledger |
4a7b39c309fb24029de2f7eb7ce3de59eca6ee4d | src/models/InteractiveSubject.coffee | src/models/InteractiveSubject.coffee | Spine = require 'spine'
Api = require 'zooniverse/lib/api'
User = require 'zooniverse/lib/models/user'
class InteractiveSubject extends Spine.Model
@configure 'InteractiveSubject', 'redshift', 'color', 'subject', 'classification', 'type'
@fetch: ({random=false, limit, user=false}) =>
url = @url(random, limit,... | Spine = require 'spine'
Api = require 'zooniverse/lib/api'
User = require 'zooniverse/lib/models/user'
class InteractiveSubject extends Spine.Model
@configure 'InteractiveSubject', 'redshift', 'color', 'subject', 'classification', 'type'
@fetch: ({random=false, limit, user=false}) =>
url = @url(random, limit,... | Fix paths for interactive subject requests | Fix paths for interactive subject requests
| CoffeeScript | mit | zooniverse/Ubret,willettk/Ubret,zooniverse/Ubret |
adbd05a1c4132b40078031e6aca6468844e20b58 | test/index_spec.coffee | test/index_spec.coffee | sinos = require('../index')
describe 'sinos-river-level-twitter', ->
describe '#search', ->
it 'is a function', ->
expect(sinos.search).to.be.instanceof Function
| Stream = require('stream')
Twitter = require('twitter')
sinos = require('../index')
config = require('../lib/config')
describe 'sinos-river-level-twitter', ->
describe '#search', ->
beforeEach ->
@stub = sinon.stub Twitter::, 'get'
afterEach ->
@stub.restore()
it 'is a function', ->
... | Test for calls on index | Test for calls on index
| CoffeeScript | mit | paulodiovani/sinos-river-scraper-twitter |
28b90a1e683c8f2a5a475275353f5658e080cecb | app/coffee/DockerRunner.coffee | app/coffee/DockerRunner.coffee | spawn = require("child_process").spawn
logger = require "logger-sharelatex"
Settings = require "settings-sharelatex"
module.exports = DockerRunner =
_docker: Settings.clsi?.docker?.binary or 'docker'
_baseCommand: ['run', '--rm=true', '-t', '-v', '$COMPILE_DIR:/source', '--name=texlive-$PROJECT_ID']
run: (proj... | spawn = require("child_process").spawn
logger = require "logger-sharelatex"
Settings = require "settings-sharelatex"
module.exports = DockerRunner =
_docker: Settings.clsi?.docker?.binary or 'docker'
_baseCommand: ['run', '--rm=true', '-t', '-v', '$COMPILE_DIR:/source', '--name=texlive-$PROJECT_ID']
run: (proj... | Fix the double callback call on docker timeout. | Fix the double callback call on docker timeout.
When the timeout handler is called, disable the callback in the close handler so that the success of the stop command doesnt produce two calls to the callback, the first one meaning success.
| CoffeeScript | agpl-3.0 | EDP-Sciences/clsi-sharelatex |
f9ffc0cab9577168e8631ac8ab32827eca67a83c | source/server/events.coffee | source/server/events.coffee | Space.messaging.define Space.messaging.Event, 'Space.accounts',
UserCreated: {
sourceId: Guid
timestamp: Date
username: Username
email: EmailAddress
password: Password
}
UserLoggedIn: {
sourceId: Guid
timestamp: Date
via: String
}
UserLoginFailed: {
sourceId: Guid
ti... | Space.messaging.define Space.messaging.Event, 'Space.accounts',
UserCreated: {
username: Username
email: EmailAddress
password: Password
}
UserLoggedIn: {
via: String
}
UserLoginFailed: {
via: String
error: String
}
| Remove event properties now setup by default | Remove event properties now setup by default
| CoffeeScript | mit | meteor-space/accounts,meteor-space/accounts |
c87636df161d9da2346c9b504e032be26f89f3e9 | client/app/Applications/Chat.kdapplication/Controllers/conversationlistcontroller.coffee | client/app/Applications/Chat.kdapplication/Controllers/conversationlistcontroller.coffee | class ChatConversationListController extends CommonChatController
constructor:->
super
@getListView().on 'moveToIndexRequested', @bound 'moveItemToIndex'
addItem:(data)->
# Make sure there is one conversation with same channel name
{conversation, chatChannel} = data
for chat in @itemsOrdered
... | class ChatConversationListController extends CommonChatController
constructor:->
super
@getListView().on 'moveToIndexRequested', @bound 'moveItemToIndex'
addItem:(data)->
# Make sure there is one conversation with same channel name
{conversation, chatChannel} = data
for chat in @itemsOrdered
... | Make sure there is a conversations variable | Make sure there is a conversations variable
| CoffeeScript | agpl-3.0 | koding/koding,koding/koding,usirin/koding,cihangir/koding,acbodine/koding,koding/koding,drewsetski/koding,sinan/koding,andrewjcasal/koding,acbodine/koding,drewsetski/koding,mertaytore/koding,drewsetski/koding,szkl/koding,andrewjcasal/koding,mertaytore/koding,gokmen/koding,drewsetski/koding,alex-ionochkin/koding,usirin/... |
4c32eb42c794c1123707a165e0aeca3bd549c8da | menus/coffee-refactor.cson | menus/coffee-refactor.cson | # See https://atom.io/docs/latest/creating-a-package#menus for more details
'context-menu':
'.overlayer':
'Rename coffee-refactor': 'coffee-refactor:rename'
'menu': [
{
'label': 'Packages'
'submenu': [
'label': 'coffee-refactor'
'submenu': [
{ 'label': 'Rename', 'command': 'coffee... | # See https://atom.io/docs/latest/creating-a-package#menus for more details
'context-menu':
'.overlayer':
'Rename Coffee Refactor': 'coffee-refactor:rename'
'menu': [
'label': 'Packages'
'submenu': [
'label': 'Coffee Refactor'
'submenu': [
'label': 'Rename'
'command': 'coffee-refactor:r... | Rewrite labels in context-menu and menu | Rewrite labels in context-menu and menu
| CoffeeScript | mit | minodisk/coffee-refactor,Ragg-/coffee-refactor |
1b4bf9c8f66c8f7116b84f4c1cad2021c3e1acf1 | lib/index.coffee | lib/index.coffee | fs = require 'fs'
upnp = require 'upnp-server'
Tag = require('taglib').Tag
mediaServer = upnp.createDevice 'MediaServer', 'Bragi', (err, device, msg) ->
throw err if err
device.start (err) ->
throw err if err
fs.readdir dir, (err, files) ->
for file in files
try
... | argv = require('optimist')
.usage('Usage: $0 -c [directory]')
.demand('c')
.alias('c', 'content')
.describe('c', 'Share the content of directory')
.argv
dir = argv.c
fs = require 'fs'
Tag = require('taglib').Tag
upnp = require 'upnp-device'
# If all keys in array are the same, return the value,
... | Add optimist to parse arguments and build a media data structure | Add optimist to parse arguments and build a media data structure
| CoffeeScript | mit | jacobrask/bragi |
8e981b4544f08e0b6c797cf86f734a9da558c793 | lib/index.coffee | lib/index.coffee |
isFunction = require 'is-function'
isObjectOrArray = require 'is-object'
isArray = require 'is-array'
###
when passed an object, returns an array of its keys.
when passed an array, returns an array of its indexes.
arrayify({a: 'aa', b: 'bb', c: 'cc'})
-> ['a', 'b', 'c']
arrayify(['one', 'two', 'three'])... |
isFunction = require 'is-function'
isObjectOrArray = require 'is-object'
isArray = require 'is-array'
###
when passed an object, returns an array of its keys.
when passed an array, returns an array of its indexes.
arrayify({a: 'aa', b: 'bb', c: 'cc'})
-> ['a', 'b', 'c']
arrayify(['one', 'two', 'three'])... | Add parent type as argument of callback | Add parent type as argument of callback
When passed a callback, the callback will now be called with a third
argument: The type of the parent. This can be relevant as the parent can
be both an object or an array.
| CoffeeScript | mit | simon-johansson/keyfinder |
0fe523f0377c3bec78153f6ad5fc17fb6e8d91b4 | collections/items.coffee | collections/items.coffee | _ = require 'underscore'
sd = require('sharify').data
Backbone = require 'backbone'
Item = require '../models/item.coffee'
module.exports = class Items extends Backbone.Collection
url: -> "#{sd.ARTSY_URL}/api/v1/set/#{@id}/items"
model: (attrs, options) ->
heuristicType = (attrs) ->
... | _ = require 'underscore'
sd = require('sharify').data
Backbone = require 'backbone'
Item = require '../models/item.coffee'
PageableCollection = require 'backbone-pageable'
# Collection of Items for an OrderedSet
module.exports = class Items extends Pageable... | Allow Items collection to be pageable | Allow Items collection to be pageable
| CoffeeScript | mit | izakp/force,izakp/force,kanaabe/force,anandaroop/force,erikdstock/force,mzikherman/force,cavvia/force-1,TribeMedia/force-public,eessex/force,artsy/force,eessex/force,cavvia/force-1,erikdstock/force,xtina-starr/force,eessex/force,yuki24/force,cavvia/force-1,artsy/force,dblock/force,kanaabe/force,joeyAghion/force,damassi... |
5cf17b2540654714131926204c68e99ae6d82892 | menus/git.cson | menus/git.cson | 'menu': [
{
'label': 'View'
'submenu': [
{
'label': 'Toggle Git Panel'
'command': 'github:toggle-git-panel'
}
]
}
{
'label': 'Packages'
'submenu': [
{
'label': 'GitHub',
'submenu': [
{
'label': 'Toggle'
'comman... | 'menu': [
{
'label': 'View'
'submenu': [
{
'label': 'Toggle Git Panel'
'command': 'github:toggle-git-panel'
}
]
}
{
'label': 'Packages'
'submenu': [
{
'label': 'GitHub',
'submenu': [
{
'label': 'Toggle'
'comman... | Add context menu to staging view with "Open File" | Add context menu to staging view with "Open File"
| CoffeeScript | mit | atom/github,atom/github,atom/github |
5712f6cb4c9699aa8f0a6ca4d39b524122b75719 | src/keypath_observer.coffee | src/keypath_observer.coffee | class KeypathObserver
constructor: (@view, @model, @keypath, @callback) ->
@interfaces = (k for k, v of @view.adapters)
@objectPath = []
@tokens = Rivets.KeypathParser.parse @keypath, @interfaces, @view.config.rootInterface
@root = @tokens.shift()
@key = @tokens.pop()
@target = @realize()
u... | class KeypathObserver
constructor: (@view, @model, @keypath, @callback) ->
@interfaces = (k for k, v of @view.adapters)
@objectPath = []
@tokens = Rivets.KeypathParser.parse @keypath, @interfaces, @view.config.rootInterface
@root = @tokens.shift()
@key = @tokens.pop()
@target = @realize()
u... | Make sure we start from the actual @model passed in to the KeypathObserver. | Make sure we start from the actual @model passed in to the KeypathObserver.
| CoffeeScript | mit | nopnop/rivets,altmind/rivets,jccazeaux/rivets,nopnop/rivets,GerHobbelt/rivets,MishaMykhalyuk/rivets,altmind/rivets,re-clone/rivets,benderTheCrime/tiny-rivets,zongkelong/rivets,QAPInt/rivets,mikeric/rivets,GerHobbelt/rivets,QAPInt/rivets,npmcomponent/mikeric-rivets,mikeric/rivets,nopnop/rivets,re-clone/rivets,GerHobbelt... |
119aa8307c66a1ad64ce4af091f0d9eb215b1993 | lib/latex.coffee | lib/latex.coffee | path = require "path"
runas = require "runas"
module.exports =
activate: ->
atom.workspaceView.command "latex:build", => @build()
build: ->
editor = atom.workspace.activePaneItem
# console.debug editor
file = editor.buffer.file
# console.debug file
if file?
# file = editor.getUri()... | path = require "path"
runas = require "runas"
module.exports =
activate: ->
atom.workspaceView.command "latex:build", => @build()
build: ->
editor = atom.workspace.activePaneItem
file = editor.buffer.file
if file?
dir = path.dirname(file.path)
outdir = path.join(dir, "output") # TODO:... | Remove unnecessary debug messages, and add TODO messages | Remove unnecessary debug messages, and add TODO messages
| CoffeeScript | mit | WoodyWoodsta/atom-latex,thomasjo/atom-latex,WoodyWoodsta/atom-latex,thomasjo/atom-latex,thomasjo/atom-latex |
66e629206dd2610d87bb85cfb0ed3ef23c21b958 | atom.symlink/config.cson | atom.symlink/config.cson | "*":
core:
disabledPackages: [
"background-tips"
"exception-reporting"
"metrics"
]
followSymlinks: false
hideGitIgnoredFiles: true
ignoredNames: [
".bundle"
".git"
"log"
"repositories"
"tmp"
"vendor"
]
themes: [
"unity-ui"
"... | "*":
core:
disabledPackages: [
"background-tips"
"exception-reporting"
"metrics"
]
followSymlinks: false
hideGitIgnoredFiles: true
ignoredNames: [
".bundle"
".git"
"log"
"repositories"
"tmp"
"vendor"
]
themes: [
"atom-dark-ui"
... | Change to dark atom theme | Change to dark atom theme
| CoffeeScript | mit | justinharringa/dotfiles,justinharringa/dotfiles |
1199986b4907b90bfb6a6a1f41f939b1aa08b3f1 | src/flux/course-listing.coffee | src/flux/course-listing.coffee | # coffeelint: disable=no_empty_functions
_ = require 'underscore'
flux = require 'flux-react'
{CourseActions, CourseStore} = require './course'
{CrudConfig, makeSimpleStore, extendConfig} = require './helpers'
LOADING = 'loading'
LOADED = 'loaded'
FAILED = 'failed'
CourseListingActions = flux.createActions [
'lo... | # coffeelint: disable=no_empty_functions
_ = require 'underscore'
flux = require 'flux-react'
{CourseActions, CourseStore} = require './course'
LOADING = 'loading'
LOADED = 'loaded'
FAILED = 'failed'
CourseListingActions = flux.createActions [
'load'
'loaded'
'reset'
]
CourseListingStore = flux.createStore
... | Add FAILED action, remove unused helpers | Add FAILED action, remove unused helpers
| CoffeeScript | agpl-3.0 | openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js |
97ceed5b8d36b027a10e94f69282cdf35a30dcd2 | Gruntfile.coffee | Gruntfile.coffee | module.exports = (grunt) ->
files = [
'src/*.coffee'
]
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
watch:
coffee:
files: files
tasks: ['default']
coffee:
build:
options:
join: true
files:
'tweenmachine.js': files
... | module.exports = (grunt) ->
files = [
'src/tweenmachine.coffee'
'src/*.coffee'
]
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
watch:
coffee:
files: files
tasks: ['default']
coffee:
build:
options:
join: true
files:
... | Make sure main file is built first. | Make sure main file is built first.
| CoffeeScript | mit | ryngonzalez/TweenMachine |
acf3e7736e62dadd9c243d7adc305c7955d4724c | 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 | HubSpot/select,dieface/select,PeterDaveHello/select,pigult/select |
95e5da91e0b844d34a78fa2c0814c879a5ce119f | lib/viewers/skim-viewer.coffee | lib/viewers/skim-viewer.coffee | BaseViewer = require './base-viewer'
{is_dir} = require '../ltutils'
{execSync} = require 'child_process'
path = require 'path'
module.exports =
class SkimViewer extends BaseViewer
_getArgs = (opts = {}) ->
args = ["-r"]
args.push "-g" if opts?.keepFocus
args
forwardSync: (pdfFile, texFile, line, col,... | BaseViewer = require './base-viewer'
{is_dir} = require '../ltutils'
{execSync} = require 'child_process'
path = require 'path'
module.exports =
class SkimViewer extends BaseViewer
_getArgs = (opts = {}) ->
args = ["-r"]
args.push "-g" if opts?.keepFocus
args
forwardSync: (pdfFile, texFile, line, col,... | Correct path to displayfile script | Correct path to displayfile script
| CoffeeScript | mit | mperessotti/atom-latextools,ig0774/atom-latextools,msiniscalchi/atom-latextools,ig0774/atom-latextools |
547ec0b4637b42b31e3e713e992071843a1e1f51 | src/vocabulary/disclose.coffee | src/vocabulary/disclose.coffee | {APLArray} = require '../array'
@['⊃'] = (omega, alpha) ->
if alpha
# Pick (`⊃`)
#
# ⍬⊃3 <=> 3
# 2⊃'PICK' <=> 'C'
# 1 0⊃2 2⍴'ABCD' <=> 'C'
# 1⊃'foo' 'bar' <=> 'bar'
if alpha.shape.length > 1
throw RankError
pick = alpha.toArray()
if pick.length isnt omega.... | {APLArray} = require '../array'
{RankError, IndexError} = require '../errors'
@['⊃'] = (omega, alpha) ->
if alpha
# Pick (`⊃`)
#
# ⍬⊃3 <=> 3
# 2⊃'PICK' <=> 'C'
# 1 0⊃2 2⍴'ABCD' <=> 'C'
# 1⊃'foo' 'bar' <=> 'bar'
# (2 2⍴0)⊃1 2 !!! RANK ERROR
# (2 2)⊃1 2 !!! RA... | Fix error handling in pick. | Fix error handling in pick.
| CoffeeScript | mit | fineline/apl,fineline/apl,fineline/apl,fineline/apl |
4379a79f9c531c78b3d8e56673f1c83da9dd171a | app/assets/javascripts/custom.coffee | app/assets/javascripts/custom.coffee | $(document).on "turbolinks:load", ->
$('div.calendar').calendar()
$('.calendar_range_start').calendar
endCalendar: $('.calendar_range_end'),
type: 'date'
$('.calendar_range_end').calendar
startCalendar: $('.calendar_range_start'),
type: 'date'
$('.ui.accordion').accordion()
$('.ui.dropdown')... | $(document).on "turbolinks:load", ->
$('div.calendar').calendar
firstDayOfWeek: 1
$('.calendar_range_start').calendar
endCalendar: $('.calendar_range_end'),
type: 'date',
firstDayOfWeek: 1
$('.calendar_range_end').calendar
startCalendar: $('.calendar_range_start'),
type: 'date',
firs... | Add Monday as first day of the week | Add Monday as first day of the week
| CoffeeScript | mit | freakuency/agile-team-dashboard,freakuency/agile-team-dashboard,freakuency/agile-team-dashboard,freakuency/agile-team-dashboard |
e529798c1796bb04bc2d991485517d04a697e5e3 | app/js/jail_iframe/util/create.coffee | app/js/jail_iframe/util/create.coffee | FactlinkJailRoot.createFactFromSelection = (current_user_opinion) ->
success = ->
window.document.getSelection().removeAllRanges()
FactlinkJailRoot.createButton.hide()
FactlinkJailRoot.off 'modalOpened', success
selInfo =
text: window.document.getSelection().toString()
title: window.document.ti... | FactlinkJailRoot.createFactFromSelection = (current_user_opinion) ->
success = ->
window.document.getSelection().removeAllRanges()
FactlinkJailRoot.createButton.stopLoading()
FactlinkJailRoot.createButton.hide()
FactlinkJailRoot.off 'modalOpened', success
selInfo =
text: window.document.getSele... | Stop loading when modal opened | Stop loading when modal opened
| CoffeeScript | mit | Factlink/js-library,Factlink/js-library,Factlink/js-library |
59e3d392d499a203b79b572753ea8a0f86c74361 | app/assets/javascripts/sprangular/directives/creditCardForm.coffee | app/assets/javascripts/sprangular/directives/creditCardForm.coffee | Sprangular.directive 'creditCardForm', ->
restrict: 'E'
templateUrl: 'credit_cards/form.html'
scope:
creditCard: '='
controller: ($scope, $locale) ->
$scope.months = _.map $locale.DATETIME_FORMATS.MONTH, (month, index) ->
{"index": index, "name": month}
currentYear = (new Date).getFullYear()
... | Sprangular.directive 'creditCardForm', ->
restrict: 'E'
templateUrl: 'credit_cards/form.html'
scope:
creditCard: '='
controller: ($scope, $locale) ->
$scope.months = _.map $locale.DATETIME_FORMATS.MONTH, (month, index) ->
{"index": index + 1, "name": month}
currentYear = (new Date).getFullYea... | Index of an enumerable starts at 0 for JS. | Index of an enumerable starts at 0 for JS.
| CoffeeScript | mit | sprangular/sprangular,sprangular/sprangular,sprangular/sprangular |
b8521e947d1ea3c92c3d2a99a81d92c385e774ef | lib/load-paths-task.coffee | lib/load-paths-task.coffee | _ = require 'underscore'
BufferedProcess = require 'buffered-process'
module.exports =
class LoadPathsTask
constructor: (@callback) ->
start: ->
rootPath = project.getPath()
ignoredNames = config.get('fuzzyFinder.ignoredNames') ? []
ignoredNames = ignoredNames.concat(config.get('core.ignoredNames') ? ... | _ = require 'underscore'
BufferedProcess = require 'buffered-process'
module.exports =
class LoadPathsTask
constructor: (@callback) ->
start: ->
rootPath = project.getPath()
ignoredNames = config.get('fuzzyFinder.ignoredNames') ? []
ignoredNames = ignoredNames.concat(config.get('core.ignoredNames') ? ... | Include hidden files when running nak | Include hidden files when running nak
| CoffeeScript | mit | atom/fuzzy-finder,nielsAD/fuzzy-finder,pombredanne/fuzzy-finder,viddo/fuzzy-finder,pombredanne/fuzzy-finder,Spy-Seth/fuzzy-finder,gvanderest/fuzzy-finder,Spy-Seth/fuzzy-finder,segiddins/fuzzy-finder,toshi-saito/fuzzy-finder,segiddins/fuzzy-finder,gvanderest/fuzzy-finder,Kerruba/fuzzy-finder,Kerruba/fuzzy-finder,viddo/f... |
0b3ff1a49af7a63f15841c162d1535fb3725fd1c | components/EnsureLocalRuntimes.coffee | components/EnsureLocalRuntimes.coffee | noflo = require 'noflo'
uuid = require 'uuid'
iframeAddress = 'https://noflojs.org/noflo-browser/everything.html?fbp_noload=true&fbp_protocol=iframe'
ensureOneIframeRuntime = (runtimes) ->
for runtime in runtimes
# Check that we don't have the iframe runtime already
if runtime.protocol is 'iframe' and runti... | noflo = require 'noflo'
uuid = require 'uuid'
iframeAddress = 'https://noflojs.org/noflo-browser/everything.html?fbp_noload=true&fbp_protocol=iframe'
ensureOneIframeRuntime = (runtimes) ->
for runtime in runtimes
# Check that we don't have the iframe runtime already
if runtime.protocol is 'iframe' and runti... | Use URL from the variable | Use URL from the variable
| CoffeeScript | mit | noflo/noflo-ui,noflo/noflo-ui |
7c732427a0d09d94bfc5b77f778d290750686ae9 | spec/countries/CAN-spec.coffee | spec/countries/CAN-spec.coffee | expect = require('chai').expect
Phone = require('../../src/script/Phone')
canada = require('../../src/script/countries/CAN')
describe 'Canada', ->
describe 'Should get', ->
number = ''
afterEach ->
# Act
result = Phone.getPhoneInternational(number)
# Assert
expect(result.valid).to.be.true
expe... | expect = require('chai').expect
Phone = require('../../src/script/Phone')
canada = require('../../src/script/countries/CAN')
describe 'Canada', ->
describe 'Should get', ->
number = ''
it 'a number', ->
# Arrange
number = "+1 204 9898656"
# Act
result = Phone.getPhoneInternational(number)
# A... | Add more tests to Canadian phones | Add more tests to Canadian phones
| CoffeeScript | mit | vtex/front.phone |
9840926701c61b576a06e68fc749b7356f944937 | app/cells/select/select.coffee | app/cells/select/select.coffee | # Selects all options of a multi-select box belonging to a optgroup, when
# clicking on the optgroup label.
init_group_selectable = (select) ->
chosen = select.next()
chosen.on 'click', '.group-result', (e) ->
target = $(e.target)
group_name = target.text()
options = select.find('optgroup[label="' + gro... | # Selects all options of a multi-select box belonging to a optgroup, when
# clicking on the optgroup label.
init_group_selectable = (select) ->
chosen = select.next()
chosen.on 'click', '.group-result', (e) ->
target = $(e.target)
group_name = target.text()
options = select.find('optgroup[label="' + gro... | Remove JS-applied help block CSS | Remove JS-applied help block CSS
This causes layout issues in most of our use cases (e.g., with
`form-horizontal`) and is difficult to override in the CSS because it's
applied to the element directly.
I think it should just be applied manually in the target application's
CSS in any special cases where it's actually n... | CoffeeScript | mit | ad2games/ui_components,ad2games/ui_components,ad2games/ui_components |
33a2033cd74298b9a776715913b116df3dbf43e4 | app/collections/show-list.cjsx | app/collections/show-list.cjsx | React = require 'react'
talkClient = require '../api/talk'
apiClient = require '../api/client'
Paginator = require '../talk/lib/paginator'
SubjectViewer = require '../components/subject-viewer'
PromiseRenderer = require '../components/promise-renderer'
{Navigation} = require 'react-router'
module?.exports = React.crea... | React = require 'react'
talkClient = require '../api/talk'
apiClient = require '../api/client'
Paginator = require '../talk/lib/paginator'
SubjectViewer = require '../components/subject-viewer'
PromiseRenderer = require '../components/promise-renderer'
{Navigation} = require 'react-router'
module?.exports = React.crea... | Use collection get now that the backend supports it | Use collection get now that the backend supports it
| CoffeeScript | apache-2.0 | fmnhExhibits/Panoptes-Front-End,camallen/Panoptes-Front-End,edpaget/Panoptes-Front-End,fmnhExhibits/Panoptes-Front-End,parrish/Panoptes-Front-End,jelliotartz/Panoptes-Front-End,jelliotartz/Panoptes-Front-End,tfmorris/Panoptes-Front-End,zooniverse/Panoptes-Front-End,mrniaboc/Panoptes-Front-End,amyrebecca/Panoptes-Front-... |
60f25d7069c2243cea87aaa4f38f7395fdc0e710 | spec/spec-bootstrap.coffee | spec/spec-bootstrap.coffee | require 'atom'
{runSpecSuite} = require 'jasmine-helper'
document.title = "Spec Suite"
runSpecSuite "spec-suite"
| require 'atom'
atom.show()
{runSpecSuite} = require 'jasmine-helper'
document.title = "Spec Suite"
runSpecSuite "spec-suite"
| Call atom.show() in spec bootstrap | Call atom.show() in spec bootstrap
| CoffeeScript | mit | originye/atom,palita01/atom,ppamorim/atom,harshdattani/atom,jacekkopecky/atom,yomybaby/atom,sxgao3001/atom,jordanbtucker/atom,sekcheong/atom,ali/atom,chfritz/atom,mostafaeweda/atom,ivoadf/atom,fscherwi/atom,ezeoleaf/atom,kc8wxm/atom,lpommers/atom,elkingtonmcb/atom,ilovezy/atom,lisonma/atom,kjav/atom,ReddTea/atom,folpin... |
a151ab61d7b3dcd8caf9155688ff8fe2e86b2da1 | model/Recipe/ListenToYourHeart.coffee | model/Recipe/ListenToYourHeart.coffee | class Recipes.ListenToYourHeart extends Recipes.Bitly
generateSteps: ->
position = 1
@generateStep(
key: "GoogleChooseAvatar"
,
$setOnInsert:
cls: "GoogleChooseAvatar"
api: "Google"
scopes: ["https://www.googleapis.com/auth/drive", "https://spreadsheets.google.com/feed... | class Recipes.ListenToYourHeart extends Recipes.Bitly
generateSteps: ->
position = 1
@generateStep(
key: "GoogleChooseAvatar"
,
$setOnInsert:
cls: "GoogleChooseAvatar"
api: "Google"
scopes: ["https://www.googleapis.com/auth/drive", "https://spreadsheets.google.com/feed... | Fix i18n and Google API credentials | Fix i18n and Google API credentials
| CoffeeScript | agpl-3.0 | fixin-platform/frontend-test,spirehq/frontend-test |
84cde26ba946cbb3c5aed2faa7614a90063a5eeb | src/scripts/modules/media/header/header.coffee | src/scripts/modules/media/header/header.coffee | define (require) ->
$ = require('jquery')
BaseView = require('cs!helpers/backbone/views/base')
BookPopoverView = require('cs!./popovers/book/book')
template = require('hbs!./header-template')
require('less!./header')
return class MediaHeaderView extends BaseView
template: template
templateHelpers: ... | define (require) ->
$ = require('jquery')
BaseView = require('cs!helpers/backbone/views/base')
BookPopoverView = require('cs!./popovers/book/book')
template = require('hbs!./header-template')
require('less!./header')
return class MediaHeaderView extends BaseView
template: template
templateHelpers: ... | Convert model in templatehelper to json earlier for better performance | Convert model in templatehelper to json earlier for better performance
| CoffeeScript | agpl-3.0 | katalysteducation/webview,katalysteducation/webview,katalysteducation/webview,dak/webview,Connexions/webview,Connexions/webview,Connexions/webview,Connexions/webview,dak/webview,katalysteducation/webview,dak/webview,carolinelane10/webview |
6741f250098fd13395a8bfb91913cc74ba147e94 | test/dummy-project/gulp.coffee | test/dummy-project/gulp.coffee | all = require('../../src')
tasks = {
clean: () ->
all.task.clean()
build: () ->
all.task.library({
library: {
isPlugin: true
dependencies: [
{
param: 'ko'
name: 'knockout'
}
{
param: 'isAn'
name: 'is-an'
... | all = require('../../src')
tasks = {
clean: () ->
all.task.clean()
build: () ->
all.task.library({
library: {
isPlugin: true
dependencies: [
{
param: 'ko'
name: 'knockout'
}
{
param: 'isAn'
name: 'is-an'
... | Add examples for dummy project | Add examples for dummy project
| CoffeeScript | apache-2.0 | WHenderson/gulp-library,WHenderson/gulp-library |
b345f24aa33297e0fe4edbd41898db39a49d4de9 | dist/config.cson | dist/config.cson | "title": "Your Blog title"
"api":
"baseUrl": "http://dev.julienrenaux.fr/wp-json"
"timeout": 10000
"maxAttempt": 3
"translation":
# "displayed" : ["en", "fr"]
# "prefered": "en"
"cordova":
"pushNotifications":
"enabled": false
"baseUrl": "http://yourDomain.com/pnfw"
"a... | "title": "Your Blog title"
"api":
"baseUrl": "http://dev.julienrenaux.fr/wp-json"
"timeout": 10000
"maxAttempt": 3
"translation":
"displayed" : ["en", "fr"]
"prefered": "en"
"cordova":
"pushNotifications":
"enabled": false
"baseUrl": "http://yourDomain.com/pnfw"
"andro... | Set FR and EN to default languages | Set FR and EN to default languages | CoffeeScript | mit | shprink/wordpress-hybrid-client,wordpress-clients/hybrid,pramttl/wordpress-hybrid-client,wordpress-clients/hybrid,wordpress-clients/hybrid,wordpress-clients/hybrid,pramttl/wordpress-hybrid-client,shprink/wordpress-hybrid-client,pramttl/wordpress-hybrid-client,shprink/wordpress-hybrid-client |
02171261f3fe986e0c399d2270c2d1da89886a85 | config/routes.coffee | config/routes.coffee | config = require './config'
module.exports = (app, passport) ->
isLoggedIn = app.middlewares.auth.isLoggedIn
isNotLoggedIn = app.middlewares.auth.isNotLoggedIn
setLocals = app.middlewares.auth.setLocals
errorHandlers = app.middlewares.error
app.get '/login', isNotLoggedIn, app.controllers.sessions.new
app... | config = require './config'
module.exports = (app, passport) ->
isLoggedIn = app.middlewares.auth.isLoggedIn
isNotLoggedIn = app.middlewares.auth.isNotLoggedIn
setLocals = app.middlewares.auth.setLocals
errorHandlers = app.middlewares.error
app.get '/login', isNotLoggedIn, app.controllers.sessions.new
app... | Enable middleware for catching validation errors | Enable middleware for catching validation errors
| CoffeeScript | mit | webzepter/node-tt |
bf26a26743bebd47e4f44f5646589f2829226049 | app/assets/javascripts/darkswarm/directives/page_view.js.coffee | app/assets/javascripts/darkswarm/directives/page_view.js.coffee | Darkswarm.directive "pageView", ->
restrict: "C"
require: "^^pagesetCtrl"
template: "<div ng-include='template'></div>"
scope:
templates: "="
link: (scope, element, attrs, ctrl) ->
scope.template = null
ctrl.registerSelectionListener (prefix, selection) ->
if selection?
selection = ... | Darkswarm.directive "pageView", ->
restrict: "C"
require: "^^pagesetCtrl"
template: "<div ng-include='template'></div>"
scope:
templates: "="
link: (scope, element, attrs, ctrl) ->
scope.template = null
ctrl.registerSelectionListener (prefix, selection) ->
scope.template = "#{prefix}/#{sele... | Reduce complexity by removing unused code branch | Reduce complexity by removing unused code branch
| CoffeeScript | agpl-3.0 | openfoodfoundation/openfoodnetwork,lin-d-hop/openfoodnetwork,mkllnk/openfoodnetwork,lin-d-hop/openfoodnetwork,mkllnk/openfoodnetwork,lin-d-hop/openfoodnetwork,Matt-Yorkley/openfoodnetwork,mkllnk/openfoodnetwork,Matt-Yorkley/openfoodnetwork,mkllnk/openfoodnetwork,Matt-Yorkley/openfoodnetwork,openfoodfoundation/openfoodn... |
a2d70b5a3f38b0cce83e7cb229727233edf80473 | lib/tempfile-repo-lib.coffee | lib/tempfile-repo-lib.coffee | {File} = require 'file-utils'
class LocaleTempFileRepository
items : null
constructor : (@items = []) ->
setInterval (=> @gc()), 60000
gc : ->
console.log 'LocaleTempFileRepository.gc'
now = new Date()
validUntil = now - 60
for id, item in @items when item.created < validUntil
consol... | {File} = require 'file-utils'
fs = require 'fs'
class LocaleTempFileRepository
items : null
constructor : (@items = {}) ->
setInterval (=> @gc()), 60000
gc : ->
console.log 'LocaleTempFileRepository.gc'
now = new Date()
validUntil = now - 60
for id, item of @items #when item.created < vali... | Fix deleting old temp files. | Fix deleting old temp files.
| CoffeeScript | mit | knalli/jenkins-nodejs-watcher |
7c8d20e28b11d7a281ae145e831f08f57d1e5a74 | static/tests/test_controllers.coffee | static/tests/test_controllers.coffee | define [
'chai'
'underscore'
'controllers'
], (chai, _, controllers) ->
chai.should()
describe 'Index controller', =>
it 'should set not authentication status', =>
scope = {}
window.isAuthenticated = false
controllers.IndexCtrl scope
scope.isAu... | define [
'chai'
'underscore'
'controllers'
], (chai, _, controllers) ->
chai.should()
describe 'Index controller', =>
it 'should set not authentication status', =>
scope = {}
window.isAuthenticated = false
controllers.IndexCtrl scope
scope.isAu... | Add manage projects controller tests | Add manage projects controller tests
| CoffeeScript | mit | nvbn/coviolations_web,nvbn/coviolations_web |
0ce23e3d4313d39252a09ccce3e7896e98a99ba6 | design.coffee | design.coffee | module.exports =
_id: '_design/repos'
languange: 'javascript'
views:
by_watchers:
map: (doc) -> emit doc.watchers, doc.description if doc.watchers
by_language:
map: (doc) -> emit doc.languange, doc.description if doc.languange
by_prefix:
map: (doc) ->
return unless doc.type ... | module.exports =
_id: '_design/repos'
languange: 'javascript'
views:
by_watchers:
map: (doc) -> emit doc.watchers, doc.description if doc.watchers
by_language:
map: (doc) -> emit doc.languange, doc.description if doc.languange
by_prefix:
map: (doc) ->
return unless doc.type ... | Fix indexing of repo names | Fix indexing of repo names
| CoffeeScript | mit | lackac/omnicat |
843249c0b73d6721a6d87aa38a92c7bee12e4167 | lib/load-paths-handler.coffee | lib/load-paths-handler.coffee | fs = require 'fs'
_ = require 'underscore'
module.exports =
loadPaths: (rootPath, ignoredNames, excludeGitIgnoredPaths) ->
if excludeGitIgnoredPaths
Git = require 'git'
repo = Git.open(rootPath, refreshIndexOnFocus: false)
paths = []
isIgnored = (path) ->
for segment in path.split('/')... | fs = require 'fs'
_ = require 'underscore'
module.exports =
loadPaths: (rootPath, ignoredNames, excludeGitIgnoredPaths) ->
if excludeGitIgnoredPaths
Git = require 'git'
repo = Git.open(rootPath, refreshOnWindowFocus: false)
paths = []
isIgnored = (path) ->
for segment in path.split('/'... | Add task to refresh status of repository | Add task to refresh status of repository
By default this will occur when the window gains
focus and the Git class can now be subscribed to
so listeners can become notified when the status
of a repository changes.
| CoffeeScript | mit | Kerruba/fuzzy-finder,gvanderest/fuzzy-finder,pombredanne/fuzzy-finder,nielsAD/fuzzy-finder,Spy-Seth/fuzzy-finder,gvanderest/fuzzy-finder,atom/fuzzy-finder,Kerruba/fuzzy-finder,viddo/fuzzy-finder,Spy-Seth/fuzzy-finder,segiddins/fuzzy-finder,toshi-saito/fuzzy-finder,viddo/fuzzy-finder,pombredanne/fuzzy-finder,segiddins/f... |
ac726b4f85e41c537e7fc3cc5ef426739c3b4eed | app/assets/javascripts/controllers/overlays/authors_overlay_controller.js.coffee | app/assets/javascripts/controllers/overlays/authors_overlay_controller.js.coffee | ETahi.AuthorsOverlayController = ETahi.TaskController.extend
resolvedPaper: null
_setPaper: ( ->
@get('paper').then (paper) =>
@set('resolvedPaper', paper)
).observes('paper')
actions:
addAuthorGroup: ->
newAuthorGroup = @store.createRecord('authorGroup', {})
newAuthorGroup.set('pape... | ETahi.AuthorsOverlayController = ETahi.TaskController.extend
resolvedPaper: null
_setPaper: ( ->
@get('paper').then (paper) =>
@set('resolvedPaper', paper)
).observes('paper')
lastAuthorGroup: Ember.computed.alias('resolvedPaper.authorGroups.lastObject')
canDeleteLastGroup: Ember.computed.empty('l... | Clean up logic for deleting author groups. | Clean up logic for deleting author groups.
| CoffeeScript | mit | johan--/tahi,johan--/tahi,johan--/tahi,johan--/tahi |
4dcee5edac49a5a2ed5df37157557a198a4181bf | webpack/src/index.coffee | webpack/src/index.coffee | require('./styles/index.scss')
require('leaflet/dist/leaflet.css')
require('leaflet')
document.addEventListener('DOMContentLoaded', ->
map = L.map('map').setView([25.1701, 121.5948], 13)
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png',
attribution: '© <a href="http://osm.org/copyright">OpenStreetM... | require('./styles/index.scss')
require('leaflet/dist/leaflet.css')
require('leaflet')
findClosestTo = (origin, parsed) ->
minDistance = 1000
found = null
for element in parsed.elements
elemLatLng = new L.LatLng(element.lat, element.lon)
if origin.distanceTo(elemLatLng) < minDistance
found = elemLa... | Put marker on node nearest to click event | Put marker on node nearest to click event
| CoffeeScript | mit | DawidJanczak/elevation_profiler,DawidJanczak/elevation_profiler |
59c2221e6704852f41219f638755d08e33dd99f4 | bin/tangle-app-build.coffee | bin/tangle-app-build.coffee | !/usr/bin/env coffee
exports.command =
description: 'Build a tangle app'
if require.main is module
path = require 'path'
grunt = require 'grunt'
grunt.cli
gruntfile: path.join(__dirname, '..', 'subcommands', 'build', 'index.coffee')
base: process.cwd()
| #!/usr/bin/env coffee
exports.command =
description: 'Build a tangle app'
if require.main is module
path = require 'path'
grunt = require 'grunt'
grunt.cli
gruntfile: path.join(__dirname, '..', 'subcommands', 'build', 'index.coffee')
base: process.cwd()
| Fix hashbang that got macro-bliterated | Fix hashbang that got macro-bliterated
| CoffeeScript | mit | tanglejs/app |
721664042726d266e549cbc7044d8a7356bf435b | apps/legacy_routes/index.coffee | apps/legacy_routes/index.coffee | express = require 'express'
app = module.exports = express()
to = require './to'
app.get '/filter/artworks', to '/browse'
app.get '/filter/artworks/*', to '/browse'
app.get '/genes', to '/categories'
app.get '/partner-application', to '/apply'
app.get '/fair-application', to '/apply/fair'
app.get '/fairs', to 'art-fai... | express = require 'express'
app = module.exports = express()
to = require './to'
app.get '/filter/artworks', to '/browse'
app.get '/filter/artworks/*', to '/browse'
app.get '/genes', to '/categories'
app.get '/partner-application', to '/apply'
app.get '/fair-application', to '/apply/fair'
app.get '/fairs', to 'art-fai... | Fix up press legacy routes | Fix up press legacy routes
| CoffeeScript | mit | oxaudo/force,joeyAghion/force,eessex/force,eessex/force,damassi/force,oxaudo/force,artsy/force-public,anandaroop/force,cavvia/force-1,erikdstock/force,erikdstock/force,mzikherman/force,artsy/force,anandaroop/force,izakp/force,erikdstock/force,TribeMedia/force-public,xtina-starr/force,joeyAghion/force,yuki24/force,joeyA... |
a662c15749de3a134e2d400acc6ae8fee259b33a | app/assets/javascripts/backbone/views/rooms/show_view.js.coffee | app/assets/javascripts/backbone/views/rooms/show_view.js.coffee | Chamber.Views.Rooms ||= {}
class Chamber.Views.Rooms.ShowView extends Backbone.View
template: JST["backbone/templates/rooms/show"]
events: {
"click input[type=submit]": "doSubmit",
}
initialize: ->
@messages_index_view = new Chamber.Views.Messages.IndexView(
{
el: $("#messages", @el... | Chamber.Views.Rooms ||= {}
class Chamber.Views.Rooms.ShowView extends Backbone.View
template: JST["backbone/templates/rooms/show"]
events: {
"click input[type=submit]": "doSubmit",
}
initialize: ->
@messages_index_view = new Chamber.Views.Messages.IndexView(
{
el: $("#messages", @el... | Clear the chat box immediately upon submitting a new message | Clear the chat box immediately upon submitting a new message
| CoffeeScript | mit | espenhogbakk/chamber,espenhogbakk/chamber |
074a699b816d52eaf2e143f48e51c222f17f88e4 | app/assets/javascripts/interaction_web_tools/app.coffee | app/assets/javascripts/interaction_web_tools/app.coffee | window.InteractionWebTools ||= {}
window.InteractionWebTools.Chat ||= {}
jQuery ->
@chatClient = new InteractionWebTools.Chat.Client
InteractionWebTools.Chat.instance = @chatClient
$(document).on 'click', '.chat > .controls > a.open', =>
@chatClient.open()
false
$(document).on 'click', '.chat > .cont... | window.InteractionWebTools ||= {}
window.InteractionWebTools.Chat ||= {}
jQuery ->
@chatClient = new InteractionWebTools.Chat.Client
InteractionWebTools.Chat.instance = @chatClient
$(document).on 'click', '.chat > .controls > a.open', =>
@chatClient.open()
false
$(document).on 'click', '.chat > .cont... | Fix window unload event binding | Fix window unload event binding
| CoffeeScript | mit | folkia/interaction_web_tools_rails,folkia/interaction_web_tools_rails,folkia/interaction_web_tools_rails |
3c0d994053a450e4b1384bdfa335423141c08ac3 | config/settings.defaults.coffee | config/settings.defaults.coffee | http = require('http')
http.globalAgent.maxSockets = 300
module.exports =
internal:
packageindexer:
port: 3022
host: "localhost"
mongo:
url: 'mongodb://127.0.0.1/sharelatex'
| http = require('http')
http.globalAgent.maxSockets = 300
module.exports =
internal:
packageindexer:
port: 3034
host: "localhost"
mongo:
url: 'mongodb://127.0.0.1/sharelatex'
| Change default port to 3034 | Change default port to 3034
| CoffeeScript | agpl-3.0 | sharelatex/package-indexer-sharelatex |
dae23d3c3ba970b47c4ded0d8a3c2a739b051b7f | app/assets/javascripts/darkswarm/controllers/offcanvas_controller.js.coffee | app/assets/javascripts/darkswarm/controllers/offcanvas_controller.js.coffee | Darkswarm.controller "OffcanvasCtrl", ($scope, $window) ->
$scope.menu = $(".left-off-canvas-menu")
$scope.setOffcanvasMenuHeight = ->
$scope.menu.height($(window).height())
$scope.bind = ->
$(window).on("resize", $scope.setOffcanvasMenuHeight)
$scope.setOffcanvasMenuHeight()
$scope.bind()
| Darkswarm.controller "OffcanvasCtrl", ($scope) ->
$scope.menu = $(".left-off-canvas-menu")
$scope.setOffcanvasMenuHeight = ->
$scope.menu.height($(window).height())
$scope.bind = ->
$(window).on("resize", $scope.setOffcanvasMenuHeight)
$scope.setOffcanvasMenuHeight()
$scope.bind()
| Remove unused inclusion of $window in OffcanvasCtrl | Remove unused inclusion of $window in OffcanvasCtrl
| CoffeeScript | agpl-3.0 | Matt-Yorkley/openfoodnetwork,openfoodfoundation/openfoodnetwork,lin-d-hop/openfoodnetwork,openfoodfoundation/openfoodnetwork,mkllnk/openfoodnetwork,lin-d-hop/openfoodnetwork,Matt-Yorkley/openfoodnetwork,lin-d-hop/openfoodnetwork,openfoodfoundation/openfoodnetwork,openfoodfoundation/openfoodnetwork,Matt-Yorkley/openfood... |
197b252f4990ee41c83a6d9914ce6e79972860a9 | src/modules/todo/module.coffee | src/modules/todo/module.coffee | Marionette = require 'backbone.marionette'
TodoLayout = require './views/layout/layout'
class TodoModule extends Marionette.Module
initialize: ->
this.todoRegionId = 'todo-region'
onStart: ->
this._createContainer()
this._addRegion()
this._addLayout()
onStop: ->
... | Marionette = require 'backbone.marionette'
TodoLayout = require './views/layout/layout'
class TodoModule extends Marionette.Module
initialize: ->
this.todoRegionId = 'todo-module-region'
onStart: ->
# encapsulate each module in a container
# so you can do what you want without
... | Clean up & add comments | Clean up & add comments
| CoffeeScript | bsd-3-clause | JSteunou/marionetteify |
16c9cb478f498d540d419a1de215b674cfabe011 | spec/spec-helper.coffee | spec/spec-helper.coffee | require '../src/ext/svg-circle'
require '../src/ext/svg-draggable'
require '../src/ext/svg-export'
beforeEach ->
jasmine.addMatchers
toShow: ->
compare: (actual) ->
{passed: actual.css('display') != 'none'}
toHide: ->
compare: (actual) ->
{passed: actual.css('display') != 'none'}... | require '../src/ext/svg-circle'
require '../src/ext/svg-draggable'
require '../src/ext/svg-export'
util = require 'util'
beforeEach ->
jasmine.addMatchers
toShow: ->
compare: (actual) ->
pass = getComputedStyle(actual)['display'] isnt 'none'
{pass}
toHide: ->
compare: (actual) -... | Add some sweet spec helpers | Add some sweet spec helpers | CoffeeScript | mit | benogle/curve,benogle/curve |
43b4b468e68b677196cc2837512de1a72cfdb0ca | src/github/pullrequests.coffee | src/github/pullrequests.coffee | _ = require "underscore"
moment = require "moment"
Octokat = require "octokat"
Config = require "../config"
PullRequest = require "./pullrequest"
Utils = require "../utils"
octo = new Octokat token: Config.github.token
class PullRequests
constructor: (prs) ->
@prs = (new PullRequest p for p in prs)
@fromKey... | _ = require "underscore"
moment = require "moment"
Octokat = require "octokat"
Config = require "../config"
PullRequest = require "./pullrequest"
Utils = require "../utils"
octo = new Octokat token: Config.github.token
class PullRequests
constructor: (prs) ->
@prs = (new PullRequest p for p in prs)
@fromKey... | Add type:pr to restrict search results to only pull requests | Add type:pr to restrict search results to only pull requests
| CoffeeScript | mit | ndaversa/hubot-jira-bot |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.