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 |
|---|---|---|---|---|---|---|---|---|---|
d64d7ba443c08e03cc9fb760d71e8f3ae10c07e3 | t/compiler/harness.coffee | t/compiler/harness.coffee | {Client} = require "mysql"
fs = require "fs"
context =
compiler: require "../../lib/compiler"
object: { id: 1, rgt: 1, lft: 2, permalink: "home" }
reflector: (callback) ->
configuration = JSON.parse fs.readFileSync("#{__dirname}/../../configuration.json", "utf8")
mysql = configuration.databases.mysql
... | {Client} = require "mysql"
fs = require "fs"
context =
compiler: require "../../lib/compiler"
object: { id: 1, rgt: 1, lft: 2, permalink: "home" }
reflector: (callback) ->
configuration = JSON.parse fs.readFileSync("#{__dirname}/../../configuration.json", "utf8")
mysql = configuration.databases.mysql
... | Remove debugging messages for Travis CI. | Remove debugging messages for Travis CI.
Removed the debugging messages used to debug the Travis CI build.
| CoffeeScript | mit | bigeasy/relatable,bigeasy/relatable |
5337f07def498614dbae9245683fff75e22aa296 | test/deadline_test.coffee | test/deadline_test.coffee | assert = require 'assertive'
Dateline = require '../lib'
timekeeper = require 'timekeeper'
testNativeMethod = (methodName, dateObj=new Date()) ->
it "calls through to native #{methodName} method", ->
assert.equal dateObj[methodName](), new Dateline(dateObj)[methodName]()
describe 'Dateline', ->
before ->
... | assert = require 'assertive'
Dateline = require '../lib'
timekeeper = require 'timekeeper'
testNativeMethod = (methodName) ->
dateObj = new Date()
datelineObj = new Dateline(dateObj)
it "calls through to native #{methodName} method", ->
assert.equal dateObj[methodName](), datelineObj[methodName]()
describe... | Remove unneeded option from test helper | Remove unneeded option from test helper
| CoffeeScript | mit | banterability/dateline |
b7d21ef2c484cbbf78cc8d5e52ced27a79d87ebd | scripts/custom.coffee | scripts/custom.coffee | # Description:
# Example scripts for you to examine and try out.
#
# Notes:
# They are commented out by default, because most of them are pretty silly and
# wouldn't be useful and amusing enough for day to day huboting.
# Uncomment the ones you want to try and experiment with.
#
# These are from the scripting... | # Description:
# Example scripts for you to examine and try out.
#
# Notes:
# They are commented out by default, because most of them are pretty silly and
# wouldn't be useful and amusing enough for day to day huboting.
# Uncomment the ones you want to try and experiment with.
#
# These are from the scripting... | Add a method that detects 'impossible/impossiburu' | Add a method that detects 'impossible/impossiburu'
| CoffeeScript | mit | pentiumx/hubot-custom |
983e5ce539d1716fe5201283c7451a407a2c8637 | settings/language-xquery.cson | settings/language-xquery.cson | '.source.xq':
'editor':
'commentStart': '(: '
'commentEnd': ' :)'
'increaseIndentPattern': '[\\({]\\s*$|<[^>]+>\\s*$|(then|return)\\s*$|let.*:=\\s*$'
'decreaseIndentPattern': '^\\s*</[^>]+>' | '.source.xq':
'editor':
'commentStart': '(: '
'commentEnd': ' :)'
'increaseIndentPattern': '[\\({]\\s*$|<[^>]+>\\s*$|(then|return)\\s*$|let.*:=\\s*$'
'decreaseIndentPattern': '^\\s*[)}]|^\\s*</[^>]+>' | Add outdent for ) and } | Add outdent for ) and }
| CoffeeScript | mit | wolfgangmm/atom-existdb |
af03f3c2d056956e78eaf318efe30907c7b531f1 | app/assets/javascripts/angular/controllers/result_controller.js.coffee | app/assets/javascripts/angular/controllers/result_controller.js.coffee | angular
.module("Poll")
.controller "ResultController", ["$scope", "$interval", "Pusher", ($scope, $interval, Pusher) ->
$scope.ctx = $('canvas')[0].getContext("2d")
$scope.chartData = []
$scope.chartOptions = {
responsive: true
showTooltips: false
}
$scope.updateCha... | angular
.module("Poll")
.controller "ResultController", ["$scope", "$interval", "Pusher", ($scope, $interval, Pusher) ->
$scope.ctx = $('canvas')[0].getContext("2d")
$scope.chartData = []
$scope.chartOptions = {
responsive: true
showTooltips: false
animationSteps: 45
... | Add animationSteps option and set to 45 | Add animationSteps option and set to 45
| CoffeeScript | mit | maripiyoko/poll,adambutler/poll,maripiyoko/poll,lefred/poll,adambutler/poll,lefred/poll,maripiyoko/poll,adambutler/poll,lefred/poll |
b363bfbaaad6ebb4c8e95a2957533dffbf5d218e | app/assets/components/TraceInfo.coffee | app/assets/components/TraceInfo.coffee | import {
Component,
createElement as $
} from './core'
import PropTypes from 'prop-types'
export class TraceInfo extends Component
@contextTypes =
routes: PropTypes.object
render: ->
{ start, application, origin_uuid, origin_url, hostname } = this.props.trace
$ 'section', className: 'traceinfo'... | import {
Component,
createElement as $
} from './core'
import PropTypes from 'prop-types'
export class TraceInfo extends Component
@contextTypes =
routes: PropTypes.object
render: ->
{ start, application, origin, hostname } = this.props.trace
$ 'section', className: 'traceinfo',
$ Field,
... | Fix trace info origin fields | Fix trace info origin fields
* Change due to API changes
| CoffeeScript | agpl-3.0 | jgraichen/mnemosyne-server,jgraichen/mnemosyne-server,jgraichen/mnemosyne-server |
9389ebc0fe478db2dc0bddbae72b9e26ebf103e0 | test/forecast-test.coffee | test/forecast-test.coffee | chai = require 'chai'
sinon = require 'sinon'
chai.use require 'sinon-chai'
expect = chai.expect
describe 'forecast', ->
beforeEach ->
@robot =
respond: sinon.spy()
hear: sinon.spy()
require('../src/forecast')(@robot)
it 'registers a respond listener', ->
expect(@robot.respond).to.have.b... | chai = require 'chai'
sinon = require 'sinon'
chai.use require 'sinon-chai'
expect = chai.expect
describe 'forecast', ->
beforeEach ->
@robot =
respond: sinon.spy()
hear: sinon.spy()
require('../src/forecast')(@robot)
| Remove default tests that have no bearing | Remove default tests that have no bearing
| CoffeeScript | mit | jeffbyrnes/hubot-forecast |
10c3eac35798fdd1bcfd6b1fc896454e8a66dfd6 | test/util/data-gen.coffee | test/util/data-gen.coffee | "use strict"
ObjectID = require('mongodb').ObjectID
Moniker = require('moniker')
rand = (min, max) -> Math.floor (Math.random() * (max - min + 1) + min)
lisence = [
"CC BY-NC-ND 3.0 NO"
"CC BY-NC 3.0 NO"
"CC BY-ND 3.0 NO"
"CC BY 3.0 NO"
]
provider = [
"DNT"
"NRK"
"TURAPP"
]
module.exports = (num) ->
... | "use strict"
ObjectID = require('mongodb').ObjectID
Moniker = require('moniker')
rand = (min, max) -> Math.floor (Math.random() * (max - min + 1) + min)
lisence = [
"CC BY-NC-ND 3.0 NO"
"CC BY-NC 3.0 NO"
"CC BY-ND 3.0 NO"
"CC BY 3.0 NO"
]
provider = [
"DNT"
"NRK"
"TURAPP"
]
tags = [
'Sted'
'Hytte... | Add tag support to data generator | Add tag support to data generator
| CoffeeScript | mit | Turistforeningen/Turbasen,Turbasen/Turbasen |
0b462398951a6077ea7f5ecb8ce176567286ba3d | js/libs/placeholder.coffee | js/libs/placeholder.coffee | define [ "outer", "js/vendor/jquery.placeholder" ], () ->
$("input, textarea").placeholder()
| define [ "js/vendor/jquery.placeholder" ], () ->
$("input, textarea").placeholder()
| Remove unneeded dependency from Placeholder | Remove unneeded dependency from Placeholder
| CoffeeScript | epl-1.0 | RayRutjes/frontend,circleci/frontend,circleci/frontend,prathamesh-sonpatki/frontend,circleci/frontend,prathamesh-sonpatki/frontend,RayRutjes/frontend |
d9366f34e87c6188eadb01a968bb107011f581f6 | Gruntfile.coffee | Gruntfile.coffee | module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON('package.json')
coffee:
compile:
files:
'drop.js': 'drop.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:
'drop.js': 'drop.coffee'
'docs/welcome/js/welcome.js': 'docs/welcome/coffee/welcome.coffee'
watch:
coffee:
files: ['*.coffee', 'sass/*', 'docs/**/*... | Add bower config to gruntfile | Add bower config to gruntfile | CoffeeScript | mit | chrisdrackett/drop,alihalabyah/drop,dandv/drop,mcanthony/drop,jacemonje/drop,alexananiev/drop,dieface/drop,HubSpot/drop,UmarMughal/drop |
a52df404f71e0423130b140275fa7f7546db7203 | src/calculator.coffee | src/calculator.coffee | # Description:
# Allows Hubot to do mathematics.
#
# Dependencies:
# "mathjs": ">= 0.16.0"
#
# Configuration:
# None
#
# Commands:
# hubot calculate <expression> - Calculate the given math expression.
# hubot convert <expression> in <units> - Convert expression to given units.
#
# Author:
# canadianveggie
... | # Description:
# Allows Hubot to do mathematics.
#
# Dependencies:
# "mathjs": ">= 0.16.0"
#
# Configuration:
# None
#
# Commands:
# hubot calculate <expression> - Calculate the given math expression.
# hubot convert <expression> in <units> - Convert expression to given units.
#
# Author:
# canadianveggie
... | Fix TypeError: object is not a function | Fix TypeError: object is not a function
Newer version of mathjs don't return a constructor function anymore, but a singleton. | CoffeeScript | mit | canadianveggie/hubot-calculator,hubot-scripts/hubot-calculator |
46f097c81239a59c1485c278a9c0bd843759224e | client/landing/app/CommonViews/linkviews/applinkview.coffee | client/landing/app/CommonViews/linkviews/applinkview.coffee | class AppLinkView extends LinkView
constructor:(options = {}, data)->
options.tooltip =
title : data.body
placement : "above"
delayIn : 120
offset : 1
super options, data
# FIXME GG, Need to implement AppIsDeleted
data.on? "AppIsDeleted", =>
@destroy()
pista... | class AppLinkView extends LinkView
constructor:(options = {}, data)->
super options, data
# FIXME something wrong with setTooltip
@on "OriginLoadComplete", (data)=>
log data
@setTooltip
title : data.body
placement : "above"
delayIn : 120
offset : 1
... | Update tooltip after loadFromOrigin finished | Update tooltip after loadFromOrigin finished
| CoffeeScript | agpl-3.0 | acbodine/koding,acbodine/koding,kwagdy/koding-1,cihangir/koding,acbodine/koding,kwagdy/koding-1,jack89129/koding,kwagdy/koding-1,acbodine/koding,usirin/koding,cihangir/koding,andrewjcasal/koding,sinan/koding,szkl/koding,drewsetski/koding,jack89129/koding,mertaytore/koding,koding/koding,usirin/koding,drewsetski/koding,r... |
45873080b39083b5e1214b9a52138944289eb3c5 | plugins/pagerduty/index.coffee | plugins/pagerduty/index.coffee | NotificationPlugin = require "../../notification-plugin"
class PagerDuty extends NotificationPlugin
pagerDutyDetails = (event) ->
details =
message : event.trigger.message
project : event.project.name
class : event.error.exceptionClass
url : event.error.url
stackTrace : event.error.... | NotificationPlugin = require "../../notification-plugin"
class PagerDuty extends NotificationPlugin
pagerDutyDetails = (event) ->
details =
message : event.trigger.message
project : event.project.name
class : event.error.exceptionClass
url : event.error.url
stackTrace : event.error.... | Allow pagerduty to de-dupe events. | Allow pagerduty to de-dupe events.
If the same exception fires many times before a pagerduty incident is resolved then it currently creates multiple pages. This change allows pagerduty to de-dupe and only have one open page based on the grouping in bugsnag.
The relevant pagerduty documentation is available here: ht... | CoffeeScript | mit | 6wunderkinder/bugsnag-notification-plugins,korealert/bugsnag-notification-plugins,cagedata/bugsnag-notification-plugins,sharesight/bugsnag-notification-plugins,jacobmarshall/bugsnag-notification-plugins,6wunderkinder/bugsnag-notification-plugins,indirect/bugsnag-notification-plugins,korealert/bugsnag-notification-plugi... |
b936cddd6db893c74245d534f3e0c08a5b2e503a | menus/merge-conflicts.cson | menus/merge-conflicts.cson | # See https://atom.io/docs/latest/creating-a-package#menus for more details
'context-menu':
'.overlayer':
'Enable merge-conflicts': 'merge-conflicts:toggle'
'menu': [
{
'label': 'Packages'
'submenu': [
'label': 'merge-conflicts'
'submenu': [
{ 'label': 'Toggle', 'command': 'merge-... | # See https://atom.io/docs/latest/creating-a-package#menus for more details
'context-menu':
'.conflicted':
'Resolve: Current': 'merge-conflicts:accept-current'
'Resolve: Ours': 'merge-conflicts:accept-ours'
'Resolve: Theirs': 'merge-conflicts:accept-theirs'
'Resolve: Ours Then Theirs': 'merge-conflict... | Add Resolve: entries to the context menu. | Add Resolve: entries to the context menu.
| CoffeeScript | mit | smashwilson/merge-conflicts,smashwilson/merge-conflicts,antcodd/merge-conflicts |
41c4c260ab8db71eb43c69e733e8cee40e2f91de | test/elvis-backbone-test.coffee | test/elvis-backbone-test.coffee | el = @elvis
describe 'el.backbone.model', ->
# it 'can handle basic bindings', ->
# model = new Backbone.Model(foo: 'bar')
# element = el('div', el.bind(model, 'foo'))
# expect(element.innerHTML).to.equal('bar')
# model.set(foo: 'quux')
# expect(element.innerHTML).to.equal('quux')
it 'can hand... | el = @elvis
describe 'el.backbone.model', ->
it 'can handle basic bindings', ->
model = new Backbone.Model(foo: 'bar')
element = el('div', el.bind(model, 'foo'))
expect(element.innerHTML).to.equal('bar')
model.set(foo: 'quux')
expect(element.innerHTML).to.equal('quux')
it 'can handle binding i... | Enable test for plain argument | Enable test for plain argument
| CoffeeScript | isc | myme/elvis |
f7e710f8129fd7f6ed3b0322f4c87eb492622d48 | app/assets/javascripts/views/components/status-filter-button.component.js.coffee | app/assets/javascripts/views/components/status-filter-button.component.js.coffee | Wheelmap.StatusFilterButtonComponent = Wheelmap.WheelchairPopoverComponent.extend
tagName: 'button'
classNameBindings: [':btn', 'isActive:active', ':btn-info', 'wheelchair']
wheelchair: null
activeFilters: null
init: ()->
@_super()
popoverOptions:
trigger: 'hover'
placement: () ->
if win... | Wheelmap.StatusFilterButtonComponent = Wheelmap.WheelchairPopoverComponent.extend
tagName: 'button'
classNameBindings: [':btn', 'isActive:active', ':btn-info', 'wheelchair']
wheelchair: null
activeFilters: null
init: ()->
@_super()
popoverOptions:
trigger: 'hover'
placement: () ->
if win... | Fix bug where toolbars wheelchair status button tooltips were not displayed. | Fix bug where toolbars wheelchair status button tooltips were not displayed.
| CoffeeScript | agpl-3.0 | sozialhelden/wheelmap,sozialhelden/wheelmap,sozialhelden/wheelmap,sozialhelden/wheelmap,sozialhelden/wheelmap |
10de47bef81e961466657ad6505cd92aff3ce98f | atom/config.cson | atom/config.cson | "*":
core:
disabledPackages: [
"archive-view"
"background-tips"
"dev-live-reload"
"welcome"
"update-package-dependencies"
"timecop"
"exception-reporting"
"image-view"
"metrics"
"open-on-github"
"release-notes"
"styleguide"
"autocomplete... | "*":
core:
disabledPackages: [
"archive-view"
"background-tips"
"dev-live-reload"
"welcome"
"update-package-dependencies"
"timecop"
"exception-reporting"
"image-view"
"metrics"
"open-on-github"
"release-notes"
"styleguide"
"autocomplete... | Disable all Atom autocomplete packages | Disable all Atom autocomplete packages
| CoffeeScript | mit | caleb531/dotfiles,caleb531/dotfiles,caleb531/dotfiles,caleb531/dotfiles |
87e47dcda9420107894a87e4355f26e863b8bb2b | atom/keymap.cson | atom/keymap.cson | 'atom-workspace':
'ctrl-cmd-r': 'tree-view:reveal-active-file'
'ctrl-cmd-t': 'window:run-package-specs'
'ctrl-shift-alt-t': 'custom:open-todo-list'
'atom-text-editor':
'ctrl-shift-a': 'asciidoc-preview:toggle'
'.platform-darwin atom-workspace':
'ctrl-"': 'toggle-quotes:toggle'
'alt-cmd-n': 'advanced-open-fi... | 'atom-workspace':
'ctrl-cmd-r': 'tree-view:reveal-active-file'
'ctrl-cmd-t': 'window:run-package-specs'
'ctrl-shift-alt-t': 'custom:open-todo-list'
'atom-text-editor':
'ctrl-shift-a': 'asciidoc-preview:toggle'
'.platform-darwin atom-workspace':
'ctrl-"': 'toggle-quotes:toggle'
'alt-cmd-n': 'advanced-open-fi... | Add key binding for chmod package | Add key binding for chmod package
| CoffeeScript | mit | lee-dohm/dotfiles,lee-dohm/dotfiles,lee-dohm/dotfiles,lee-dohm/dotfiles |
7350556d9817db171e31aa3d13d340d699a659f8 | app/assets/javascripts/components/overview/inline_users.cjsx | app/assets/javascripts/components/overview/inline_users.cjsx | React = require 'react'
EnrollButton = require '../students/enroll_button'
InlineUsers = React.createClass(
displayName: 'InlineUsers'
render: ->
key = @props.title + '_' + @props.role
last_user_index = @props.users.length - 1
user_list = @props.users.map (user, index) ->
link = ... | React = require 'react'
EnrollButton = require '../students/enroll_button'
InlineUsers = React.createClass(
displayName: 'InlineUsers'
render: ->
key = @props.title + '_' + @props.role
last_user_index = @props.users.length - 1
user_list = @props.users.map (user, index) ->
link = ... | Use real name instead of username in parens | Use real name instead of username in parens
| CoffeeScript | mit | Wowu/WikiEduDashboard,majakomel/WikiEduDashboard,MusikAnimal/WikiEduDashboard,feelfreelinux/WikiEduDashboard,feelfreelinux/WikiEduDashboard,ragesoss/WikiEduDashboard,MusikAnimal/WikiEduDashboard,sejalkhatri/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,KarmaHater/WikiEduDashboard,WikiEducationFoundation/Wik... |
336bcc2926396c9235968fb456e725c7a4028f54 | test/testMount.coffee | test/testMount.coffee | assert = (require 'chai').assert
Mount = require '../src/Mount'
{Todo, TodoList, NewTodo, TodoApp} = require './fixtures/components'
todos = [
{ title: 'Go to town' }
{ title: 'Buy some food' }
]
describe 'Mount', ->
app = null
beforeEach ->
elem = document.createElement('div')
document.body.appendC... | _ = require 'lodash'
assert = (require 'chai').assert
Mount = require '../src/Mount'
{Todo, TodoList, NewTodo, TodoApp} = require './fixtures/components'
todos = [
{ title: 'Go to town' }
{ title: 'Buy some food' }
]
todos2 = [
{ title: 'foo' }
{ title: 'bar' }
{ title: 'baz' }
]
describe 'Mount', ->
ap... | Test update tracking of Mount | Test update tracking of Mount
| CoffeeScript | mit | seanchas116/decompose |
98563dea1131430199ea9ab55a4647828e4c5aae | spec/path-scanner-spec.coffee | spec/path-scanner-spec.coffee | fs = require 'fs'
path = require 'path'
PathScanner = require '../lib/path-scanner'
describe "PathScanner", ->
describe "a non-git directory with many files", ->
rootPath = fs.realpathSync("spec/fixtures/many-files")
it 'lists all non-hidden files', ->
scanner = new PathScanner(rootPath)
sca... | fs = require 'fs'
path = require 'path'
PathScanner = require '../lib/path-scanner'
describe "PathScanner", ->
describe "a non-git directory with many files", ->
rootPath = fs.realpathSync("spec/fixtures/many-files")
it 'lists all non-hidden files', ->
scanner = new PathScanner(rootPath)
sca... | Add tests for path inclusion | Add tests for path inclusion
| CoffeeScript | mit | pombredanne/scandal,atom/scandal,pombredanne/scandal |
cc6141b54a4a94e6a5c8eee3825ec59f982533e9 | server/models/entry.coffee | server/models/entry.coffee | mongoose = require 'mongoose'
chrono = require 'chrono-node'
db = require '../lib/database'
Schema = mongoose.Schema
entrySchema = new Schema
title:
type: String
required: yes
description: String
slug:
type: String
status:
type: String
enum: ['hidden', 'draft', 'live']
required: yes
... | mongoose = require 'mongoose'
chrono = require 'chrono-node'
db = require '../lib/database'
Schema = mongoose.Schema
entrySchema = new Schema
title:
type: String
required: yes
description: String
slug:
type: String
status:
type: String
enum: ['hidden', 'draft', 'live', 'pending']
requ... | Add pending as a status type | Add pending as a status type
| CoffeeScript | agpl-3.0 | mikesmithmsm/buckets,edolyne/hive,asm-products/buckets,edolyne/buckets,nishant8BITS/buckets,bucketsio/buckets,artelse/buckets,mamute/buckets,bucketsio/buckets,dut3062796s/buckets,edolyne/hive,asm-products/buckets,artelse/buckets,edolyne/buckets,dut3062796s/buckets,mikesmithmsm/buckets,nishant8BITS/buckets,mamute/bucket... |
5047ab05393a6a0ac62513f60f1fe85450812cd6 | app/assets/javascripts/offline/synchronizer.js.coffee | app/assets/javascripts/offline/synchronizer.js.coffee |
Backbone.backendSync = Backbone.sync
Backbone.sync = (method, model, options) ->
url = _.result(model, 'url')
if method is 'read'
if navigator.onLine
# Store the fetched result also in our local cache
Backbone.backendSync(arguments...).then (data) ->
localStorage[url] = JSON.stringify(data... |
Backbone.backendSync = Backbone.sync
Backbone.sync = (method, model, options) ->
url = _.result(model, 'url')
synclist = JSON.parse(localStorage['toSync'] || '[]')
if method is 'read'
getData = (method, model, options) ->
defer = $.Deferred()
if navigator.onLine
# Store the fetched re... | Update fetched data with yet to sync data | Update fetched data with yet to sync data
| CoffeeScript | mit | matthijsgroen/backbone-offline |
d3b152613e96fb27e17074a42b39c106199af1d2 | client/landing/app/MainApp/sidebar/groupavatar.coffee | client/landing/app/MainApp/sidebar/groupavatar.coffee | class GroupAvatar extends JView
constructor:(options = {}, data)->
options.cssClass = 'group-avatar-drop'
groupsController = KD.getSingleton 'groupsController'
super options, groupsController.getCurrentGroupData()
groupsController.on 'GroupChanged', @bound 'render'
render:(slug, group)->
if ... | class GroupAvatar extends JView
constructor:(options = {}, data)->
options.cssClass = 'group-avatar-drop hidden'
groupsController = KD.getSingleton 'groupsController'
super options, groupsController.getCurrentGroupData()
groupsController.on 'GroupChanged', @bound 'render'
render:(slug, group)->
... | Hide if slug is koding | Hide if slug is koding
| CoffeeScript | agpl-3.0 | koding/koding,cihangir/koding,acbodine/koding,drewsetski/koding,drewsetski/koding,usirin/koding,drewsetski/koding,szkl/koding,andrewjcasal/koding,acbodine/koding,jack89129/koding,sinan/koding,rjeczalik/koding,cihangir/koding,andrewjcasal/koding,sinan/koding,kwagdy/koding-1,usirin/koding,koding/koding,jack89129/koding,u... |
93f8bfecd8418617b7ed1c6f4a9bd94cf05c8e1b | cgFileUploadWorker.coffee | cgFileUploadWorker.coffee | uploadChunk = (blob, url, filename, chunk, chunks) ->
xhr = new XMLHttpRequest
xhr.open 'POST', url, false
xhr.onerror = -> throw new Error 'error while uploading'
formData = new FormData
formData.append 'name', filename
formData.append 'chunk', chunk
formData.append 'chunks', chunks
for... | uploadChunk = (blob, url, filename, chunk, chunks) ->
xhr = new XMLHttpRequest
xhr.open 'POST', url, false
xhr.onerror = -> throw new Error 'error while uploading'
formData = new FormData
formData.append 'name', filename
formData.append 'chunk', chunk
formData.append 'chunks', chunks
for... | Add current timestamp to filename | Add current timestamp to filename
| CoffeeScript | mit | Gutenberg-Technology/cg-file-upload |
485e74a803ca6f442a6998d2cb11cf16936fdfb1 | ObjectLogger.coffee | ObjectLogger.coffee | class ObjectLogger
constructor:(@className, @defaultLevel = 'info')->
@log = loglevel.createLogger(@className, @defaultLevel)
@callStack = []
@log.enter = @enter.bind(@, 'debug')
@log.fineEnter = @enter.bind(@, 'fine')
@log.return = @return.bind(@, 'debug')
@log.fineReturn = @return.bind(@... | class ObjectLogger
constructor:(@className, @defaultLevel = 'info')->
@log = loglevel.createLogger(@className, @defaultLevel)
@callStack = []
@log.enter = @bindMethod(@enter, 'debug')
@log.fineEnter = @bindMethod(@enter, 'fine')
@log.return = @bindMethod(@return, 'debug')
@log.fineReturn =... | Fix method bind problems in phantomjs | Fix method bind problems in phantomjs
| CoffeeScript | mit | solderzzc/meteor-loglevel,practicalmeteor/meteor-loglevel |
8e34b13c9134137ede7343b7b7be41d475e634e9 | app/lib/view-helper.coffee | app/lib/view-helper.coffee | Chaplin = require 'chaplin'
# Application-specific view helpers
# http://handlebarsjs.com/#helpers
# --------------------------------
# Map helpers
# -----------
# Make 'with' behave a little more mustachey.
Handlebars.registerHelper 'with', (context, options) ->
if not context or Handlebars.Utils.isEmpty context
... | Chaplin = require 'chaplin'
Handlebars = require 'Handlebars' unless Handlebars?
# Application-specific view helpers
# http://handlebarsjs.com/#helpers
# --------------------------------
# Map helpers
# -----------
# Make 'with' behave a little more mustachey.
Handlebars.registerHelper 'with', (context, options) ->
... | Update view helpers to work with my fixed brunch-handlebars plugin | Update view helpers to work with my fixed brunch-handlebars plugin
Fixes handlebars when used with source maps.
| CoffeeScript | apache-2.0 | despairblue/scegratoo |
70388e4686fc5de2f07cabec53571660b91f364f | views/coffee/timer.coffee | views/coffee/timer.coffee | 'use strict'
@start = (limit) ->
window.startDate = new Date().getTime()
window.seconds = 0
window.minutes = 0
window.limit = limit
window.timerID = setInterval(timeCounter, 1000)
return
@stop = ->
clearInterval timerID
return
timeCounter = ->
if seconds >= limit
stop()
return
time = new... | 'use strict'
@start = (limit) ->
window.startDate = new Date().getTime()
window.elapsedSeconds = 0
window.seconds = 0
window.minutes = 0
window.limit = limit
window.timerID = setInterval(timeCounter, 1000)
return
@stop = ->
clearInterval timerID
return
timeCounter = ->
if elapsedSeconds >= limit
... | Set proper value to seconds if it passed 60 | Set proper value to seconds if it passed 60
| CoffeeScript | mit | aasare/panadora |
64e68f4ce34d02059bbf912286b00a23917637ee | js-library/app/js/jail_iframe/classes/notification.coffee | js-library/app/js/jail_iframe/classes/notification.coffee | FactlinkJailRoot.showShouldSelectTextNotification = ->
showNotification
message: 'To create an annotation, select a statement and click the Factlink button.'
type_classes: 'fl-message-icon-add'
FactlinkJailRoot.showLoadedNotification = ->
showNotification
message: 'Factlink is loaded!'
type_classes... | FactlinkJailRoot.showShouldSelectTextNotification = ->
showNotification
message: 'To create an annotation, select a statement and click the Factlink button.'
type_classes: 'fl-message-icon-add'
FactlinkJailRoot.showLoadedNotification = ->
showNotification
message: 'Factlink is loaded!'
type_classes... | Trim remove_delay down closer to transition duration | Trim remove_delay down closer to transition duration
| CoffeeScript | mit | Factlink/factlink-core,daukantas/factlink-core,Factlink/factlink-core,daukantas/factlink-core,daukantas/factlink-core,Factlink/factlink-core,Factlink/factlink-core,daukantas/factlink-core |
abd7b983e34929bceb37005f8ab9f92e2df20cb1 | src/code/stores/nodes-store.coffee | src/code/stores/nodes-store.coffee | PaletteStore = require './palette-store'
GraphStore = require './graph-store'
nodeActions = Reflux.createActions(
[
"nodesChanged"
]
)
nodeStore = Reflux.createStore
listenables: [nodeActions]
init: ->
@nodes = []
@paletteItemHasNodes = false
@selectedPaletteItem... | PaletteStore = require './palette-store'
GraphActions = require '../actions/graph-actions'
nodeActions = Reflux.createActions(
[
"nodesChanged"
]
)
nodeStore = Reflux.createStore
listenables: [nodeActions]
init: ->
@nodes = []
@paletteItemHasNodes = false
@selected... | Fix regression: Deleting items from the pallete doesn't replace them. | Fix regression: Deleting items from the pallete doesn't replace them.
[#105213716]
https://www.pivotaltracker.com/story/show/105213716
| CoffeeScript | mit | concord-consortium/building-models,concord-consortium/building-models,concord-consortium/building-models,concord-consortium/building-models,concord-consortium/building-models |
132fc488b3ff711a1fff092b81769b6b341c1297 | client/Finder/fs/fsfolder.coffee | client/Finder/fs/fsfolder.coffee | class FSFolder extends FSFile
fetchContents:(callback, dontWatch=yes)->
{ treeController } = @getOptions()
@emit "fs.job.started"
@vmController.run
method : 'fs.readDirectory'
vmName : @vmName
withArgs :
onChange : if dontWatch then null else (change)=>
FSHe... | class FSFolder extends FSFile
fetchContents:(callback, dontWatch=yes)->
{ treeController } = @getOptions()
@emit "fs.job.started"
@vmController.run
method : 'fs.readDirectory'
vmName : @vmName
withArgs :
onChange : if dontWatch then null else (change)=>
FSHe... | Use treeController's delegate as FinderController since there is no more FinderController singleton | FSFolder: Use treeController's delegate as FinderController since there is no more FinderController singleton
| CoffeeScript | agpl-3.0 | jack89129/koding,alex-ionochkin/koding,acbodine/koding,jack89129/koding,gokmen/koding,andrewjcasal/koding,andrewjcasal/koding,szkl/koding,drewsetski/koding,drewsetski/koding,acbodine/koding,usirin/koding,acbodine/koding,szkl/koding,rjeczalik/koding,jack89129/koding,koding/koding,sinan/koding,koding/koding,alex-ionochki... |
9c3e7499eefa4d72a7dccc5d1a13aa2bcd7a2563 | app/client/questions/questions.coffee | app/client/questions/questions.coffee | Parse = require 'parse'
Sort = require 'sortablejs'
{updateSortOrder} = require '../../imports/helpers'
{Question} = require '../../imports/models'
Template.questions.onCreated ->
@fetched = new ReactiveVar false
@survey = @data.survey
@questions = @data.questions
@form = @data.form
instance = @
@form.getQ... | Sort = require 'sortablejs'
{updateSortOrder} = require '../../imports/helpers'
{Question} = require '../../imports/models'
Template.questions.onCreated ->
@fetched = new ReactiveVar false
@survey = @data.survey
@questions = @data.questions
@form = @data.form
instance = @
@form.getQuestions(true, @question... | Remove required Parse causing error on question delete | Remove required Parse causing error on question delete
| CoffeeScript | apache-2.0 | ecohealthalliance/mobile-survey,ecohealthalliance/mobile-survey,ecohealthalliance/mobile-survey |
17dcc919d04d11c2415f93bc4e85e83bbf74608f | test/javascripts/paper_test.coffee | test/javascripts/paper_test.coffee | #= require test_helper
emq.globalize()
ETahi.setupForTesting()
ETahi.injectTestHelpers()
ETahi.Resolver = Ember.DefaultResolver.extend namespace: ETahi
setResolver ETahi.Resolver.create()
ETahi.setupForTesting()
moduleForModel 'paper', 'Unit: Paper Model'
moduleForModel 'user', 'Unit: User Model'
test 'displayTitle... | #= require test_helper
emq.globalize()
ETahi.injectTestHelpers()
ETahi.Resolver = Ember.DefaultResolver.extend namespace: ETahi
setResolver ETahi.__container__
ETahi.setupForTesting()
moduleForModel 'paper', 'Unit: Paper Model',
needs: ['model:user', 'model:declaration', 'model:figure', 'model:journal', 'model:pha... | Use preferred way of testing computed properties | Use preferred way of testing computed properties
| CoffeeScript | mit | johan--/tahi,johan--/tahi,johan--/tahi,johan--/tahi |
aa162766accd13dd961eeb08638ba7d85b65e92c | src/index.coffee | src/index.coffee | require 'postmortem/register'
path = require 'path'
# Ensure local node_modules bin is on the front of $PATH
binPath = path.join process.cwd(), 'node_modules/', '.bin'
process.env.PATH = ([binPath].concat process.env.PATH.split ':').join ':'
global.cp = require './cp'
global.exec = require 'executive'
globa... | require 'postmortem/register'
require 'vigil'
path = require 'path'
# Ensure local node_modules bin is on the front of $PATH
binPath = path.join process.cwd(), 'node_modules/', '.bin'
process.env.PATH = ([binPath].concat process.env.PATH.split ':').join ':'
global.cp = require './cp'
global.exec = require '... | Add default walk and watch options. | Add default walk and watch options.
| CoffeeScript | mit | zeekay/shortcake |
b93d666f2b1d5f699287dfe37d69fdbd2e53fac2 | atom/.atom/config.cson | atom/.atom/config.cson | "*":
"atom-beautify":
analytics: false
"autocomplete-plus":
autoActivationDelay: 150
core:
telemetryConsent: "no"
themes: [
"atom-dark-ui"
"atom-dark-syntax"
]
editor:
fontSize: 12
invisibles: {}
showIndentGuide: true
showInvisibles: true
"exception-reporting":
... | "*":
"atom-beautify":
analytics: false
"autocomplete-plus":
autoActivationDelay: 150
core:
telemetryConsent: "no"
themes: [
"atom-dark-ui"
"atom-dark-syntax"
]
editor:
fontSize: 12
preferredLineLength: 79
invisibles: {}
showIndentGuide: true
showInvisibles: tr... | Set line length to 79 (per PEP8) | Set line length to 79 (per PEP8)
Feel the :heart: @jianbin-wei | CoffeeScript | mit | jeffwidman/dotfiles |
e6ee0dd1b58bc8d779d6803e463d9182276c535e | test/js/totodoo.coffee | test/js/totodoo.coffee | selenium = require 'selenium-webdriver'
chai = require 'chai'
chai.use require 'chai-as-promised'
expect = chai.expect
before ->
@driver = new selenium.Builder()
.withCapabilities(selenium.Capabilities.phantomjs())
.build()
@driver.getWindowHandle()
after ->
@driver.quit()
describe 'Totodoo App', ->
@timeou... | selenium = require 'selenium-webdriver'
chai = require 'chai'
chai.use require 'chai-as-promised'
expect = chai.expect
before ->
@driver = new selenium.Builder()
.withCapabilities(selenium.Capabilities.phantomjs())
.build()
@driver.getWindowHandle()
after ->
@driver.quit()
describe 'Totodoo App', ->
@timeou... | Revert to the last working test | Revert to the last working test
| CoffeeScript | mit | markomanninen/totodoo,markomanninen/totodoo |
0055911af6f40f3d2ad75b8d4fe6661ffabf801d | app/coffee/filters/common.coffee | app/coffee/filters/common.coffee | angular.module('greenmine.filters.common', []).
filter('onlyVisible', ->
return (input) ->
return _.filter input, (item) ->
return item.__hidden != true
).
filter('truncate', ->
return (input, num) ->
num = 25 if num == undefined
return _.s... | angular.module('greenmine.filters.common', []).
filter('onlyVisible', ->
return (input) ->
return _.filter input, (item) ->
return item.__hidden != true
).
filter('truncate', ->
return (input, num) ->
num = 25 if num == undefined
return _.s... | Add partial refactor of filters. | Add partial refactor of filters.
| CoffeeScript | agpl-3.0 | taigaio/taiga-front-old |
ac984e5d8c6dab3a387202651f613c185d568194 | gulp/helper/child_process.coffee | gulp/helper/child_process.coffee | gutil = require 'gulp-util'
child_process = require 'child_process'
module.exports = (name, command, callback = ->) ->
child_process.exec(
command
(error, stdout, stderr) ->
if error and error.code
customError =
message: "Failed: #{name}"
gutil.log stdout
guti... | gutil = require 'gulp-util'
child_process = require 'child_process'
module.exports = (name, command, callback = ->) ->
child_process.exec(
command
(error, stdout, stderr) ->
if error and error.code
customError =
message: "Failed: #{name}"
gutil.log stdout
guti... | Change ci-env-detection from "workstation" to "CI" | Change ci-env-detection from "workstation" to "CI"
| CoffeeScript | mit | efacilitation/eventric |
0b5d70f645b56d7c98c0c067fc80cdc3ea7a3e78 | app/assets/javascripts/active_admin/lib/per_page.js.coffee | app/assets/javascripts/active_admin/lib/per_page.js.coffee | class ActiveAdmin.PerPage
constructor: (@options, @element)->
@$element = $(@element)
@_init()
@_bind()
_init: ->
@$params = @_queryParams()
_bind: ->
@$element.change =>
@$params['per_page'] = @$element.val()
delete @$params['page']
location.search = $.param(@$params)
_... | class ActiveAdmin.PerPage
constructor: (@options, @element)->
@$element = $(@element)
@_init()
@_bind()
_init: ->
@$params = @_queryParams()
_bind: ->
@$element.change =>
@$params['per_page'] = @$element.val()
delete @$params['page']
location.search = $.param(@$params)
_... | Remove plus sign (+) in URL query string while per_page switching | Remove plus sign (+) in URL query string while per_page switching
| CoffeeScript | mit | Davidzhu001/activeadmin,hyperoslo/activeadmin,quikly/active_admin,gogovan/activeadmin,mediebruket/activeadmin,siutin/activeadmin,hobbes37/activeadmin,mateusg/active_admin,Davidzhu001/activeadmin,wspurgin/activeadmin,vraravam/activeadmin,hiroponz/activeadmin,quikly/active_admin,krautcomputing/activeadmin,jclay/active_ad... |
0778ea6367432c64c6beef4a1cb047305fe1a0f5 | keymaps/rubocop.cson | keymaps/rubocop.cson | # Keybindings require three things to be fully defined: A selector that is
# matched against the focused element, the keystroke and the command to
# execute.
#
# Below is a basic keybinding which registers on all platforms by applying to
# the root workspace element.
# For more detailed documentation see
# https://ato... | # Keybindings require three things to be fully defined: A selector that is
# matched against the focused element, the keystroke and the command to
# execute.
#
# Below is a basic keybinding which registers on all platforms by applying to
# the root workspace element.
# For more detailed documentation see
# https://ato... | Change default shortcut to 'alt-shift-a' | Change default shortcut to 'alt-shift-a'
| CoffeeScript | mit | asux/atom-rubocop |
6aba7bb3557975045e90b4a36f0f8f7cd795c91a | static/scripts/models.coffee | static/scripts/models.coffee | define ['angular', 'underscore', 'underscoreString'], (angular, _, _s) ->
_.mixin _s.exports()
module = angular.module 'coviolations.models', []
getTaskModel = ($http) ->
class Tasks
### Tasks model ###
constructor: (@limit=20, @options={}) ->
@items = []
... | define ['angular', 'underscore', 'underscoreString'], (angular, _, _s) ->
_.mixin _s.exports()
module = angular.module 'coviolations.models', []
getTaskModel = ($http) ->
class Tasks
### Tasks model ###
constructor: (@limit=20, @options={}) ->
@items = []
... | Add lock for preventing concurrent tasks loading | Add lock for preventing concurrent tasks loading
| CoffeeScript | mit | nvbn/coviolations_web,nvbn/coviolations_web |
3814491cf299bb1cc14b1cc13149dd7d8c850a7a | coffee/db/mongo.coffee | coffee/db/mongo.coffee | EventEmitter = require('events').EventEmitter
MongoClient = require('mongodb').MongoClient
inherits = require('util').inherits
Mongo = (uri) ->
EventEmitter.call @
new MongoClient.connect uri, (err, database) =>
throw err if err
@db = database
for col in ['arrangementer', 'bilder', 'grupper', 'område... | EventEmitter = require('events').EventEmitter
MongoClient = require('mongodb').MongoClient
inherits = require('util').inherits
Mongo = (uri) ->
EventEmitter.call @
new MongoClient.connect uri, (err, database) =>
throw err if err
@db = database
for col in ['arrangementer', 'bilder', 'grupper', 'område... | Add short hand for api.user collection | Add short hand for api.user collection
| CoffeeScript | mit | Turbasen/Turbasen,Turistforeningen/Turbasen |
039fe78abc52dbf57a03126a9b3d18a1683496b2 | app/src/controllers/update/update_index_view_controller.coffee | app/src/controllers/update/update_index_view_controller.coffee | class @UpdateIndexViewController extends @UpdateViewController
navigation:
nextRoute: "/update/seed"
previousRoute: "/onboarding/device/plug"
previousParams: {animateIntro: no}
localizablePageSubtitle: "update.index.important_notice"
navigatePrevious: ->
ledger.app.setExecutionMode(ledger.app.Mo... | class @UpdateIndexViewController extends @UpdateViewController
navigation:
nextRoute: "/update/seed"
#previousRoute: "/onboarding/device/plug"
previousParams: {animateIntro: no}
localizablePageSubtitle: "update.index.important_notice"
navigatePrevious: ->
ledger.app.setExecutionMode(ledger.app.M... | Hide previous button in update index view controller | Hide previous button in update index view controller
| CoffeeScript | mit | Morveus/ledger-wallet-doge-chrome,LedgerHQ/ledger-wallet-chrome,LedgerHQ/ledger-wallet-chrome,Morveus/ledger-wallet-doge-chrome |
18277bbc94774f58ba185c6d13a661fb6ff07156 | core/app/backbone/views/evidence/evidence_bottom_view.coffee | core/app/backbone/views/evidence/evidence_bottom_view.coffee | class window.EvidenceBottomView extends Backbone.Marionette.ItemView
className: 'evidence-bottom bottom-base'
template: 'facts/bottom_base'
triggers:
'click .js-sub-comments-link': 'toggleSubCommentsList'
ui:
subCommentsLink: '.js-sub-comments-link'
subCommentsContainer: '.js-sub-comments-co... | class window.EvidenceBottomView extends Backbone.Marionette.ItemView
className: 'evidence-bottom bottom-base'
template: 'facts/bottom_base'
triggers:
'click .js-sub-comments-link': 'toggleSubCommentsList'
ui:
subCommentsLink: '.js-sub-comments-link'
subCommentsContainer: '.js-sub-comments-co... | Use css class 'hide' instead of jQuery show/hide methods to prevent jQuery weirdness. | Use css class 'hide' instead of jQuery show/hide methods to prevent jQuery weirdness.
| CoffeeScript | mit | daukantas/factlink-core,daukantas/factlink-core,Factlink/factlink-core,Factlink/factlink-core,daukantas/factlink-core,Factlink/factlink-core,daukantas/factlink-core,Factlink/factlink-core |
4b7f8ba8820cc315596c45909ec69630d1688a81 | components/DispatchAction.coffee | components/DispatchAction.coffee | noflo = require 'noflo'
findHandler = (actionParts, routes) ->
normalized = routes.map (route) ->
if route.indexOf('*') is -1
# No wildcards here
return route
routeParts = route.split ':'
for part, idx in routeParts
continue unless part is '*'
continue unless actionParts[idx]
... | noflo = require 'noflo'
findHandler = (actionParts, routes) ->
normalized = routes.map (route) ->
if route.indexOf('*') is -1
# No wildcards here
return route
routeParts = route.split ':'
for part, idx in routeParts
continue unless part is '*'
continue unless actionParts[idx]
... | Send all unhandled to PASS port | Send all unhandled to PASS port
| CoffeeScript | mit | noflo/noflo-ui,noflo/noflo-ui |
f7e68d87183e1a80c891e9deb40cd6936d6cc0ca | app/controllers/sessions.coffee | app/controllers/sessions.coffee | module.exports =
new: (req, res) ->
res.render('sessions/new')
create: (passport) ->
->
passport.authenticate 'local',
successRedirect: '/'
failureRedirect: '/login'
successFlash: 'You have successfully logged in!'
failureFlash: true
destroy: (req, res) ->
req.l... | module.exports =
new: (req, res) ->
res.render('sessions/new')
create: (passport) ->
->
passport.authenticate 'local',
successRedirect: '/'
failureRedirect: '/login'
successFlash: 'You have successfully logged in!'
failureFlash: true
destroy: (req, res) ->
req.l... | Fix redirect path after loggin out | Fix redirect path after loggin out
| CoffeeScript | mit | webzepter/node-tt |
88256918ae1c1eae4310e2d058b9bb2a5d37453d | 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... | Revert the timeout change in the docker runner | Revert the timeout change in the docker runner
Revert the timeout change in the docker runner as the conversion from seconds to milliseconds as well as the default timeout are already handled in the Request parser.
| CoffeeScript | agpl-3.0 | EDP-Sciences/clsi-sharelatex |
9852cc2c9e4adb6593f5b0dcdd632399c3b1d6b4 | Source/ExpectedWrite.coffee | Source/ExpectedWrite.coffee | # @Compiler-Output "../Dist/ExceptedWrite.js"
EventEmitter = require('events').EventEmitter
Promise = require('a-promise')
Buffer = require('buffer').Buffer
class ExpectedWrite extends EventEmitter
constructor: (@stream) ->
super
@status = true
@expected = null
@callback = null
@data = stdout: n... | # @Compiler-Output "../Dist/ExceptedWrite.js"
EventEmitter = require('events').EventEmitter
Promise = require('a-promise')
Buffer = require('buffer').Buffer
class ExpectedWrite extends EventEmitter
constructor: (@stream) ->
super
@status = true
@expected = null
@callback = null
@data = stdout: '... | Use raw strings instead of buffers | :art: Use raw strings instead of buffers
| CoffeeScript | mit | steelbrain/node-ssh |
4a48109e1628995d10740ee359aaa52b0d7dd1f9 | app/server/js/react/app.coffee | app/server/js/react/app.coffee | goog.provide 'server.react.App'
class server.react.App
###*
@constructor
###
constructor: ->
{html,head,meta,title,link,body} = React.DOM
@create = React.createClass
render: ->
html lang: 'en',
head null,
meta charSet: 'utf-8'
meta name: 'viewport', c... | goog.provide 'server.react.App'
class server.react.App
###*
@constructor
###
constructor: ->
{html,head,meta,title,link,body} = React.DOM
@create = React.createClass
render: ->
html lang: 'en',
head null,
meta charSet: 'utf-8'
# NOTE(steida): http://w... | Add minimal-ui for iOS Safari. | Add minimal-ui for iOS Safari.
| CoffeeScript | mit | steida/songary |
f20be1deef998ae8e66646b9c5a44e30826f83e4 | app/middlewares/auth.coffee | app/middlewares/auth.coffee | module.exports =
isLoggedIn: (req, res, next) ->
if req.user
next()
else
req.flash 'error', 'You must be logged in!'
res.redirect '/login'
isNotLoggedIn: (req, res, next) ->
if req.user
req.flash 'error', 'You are already logged in!'
res.redirect '/'
else
next() | module.exports =
isLoggedIn: (req, res, next) ->
if req.isAuthenticated()
next()
else
req.flash 'error', 'You must be logged in!'
res.redirect '/login'
isNotLoggedIn: (req, res, next) ->
if req.isAuthenticated()
req.flash 'error', 'You are already logged in!'
res.redirect ... | Replace property with method to improve intelligibility | Replace property with method to improve intelligibility
| CoffeeScript | mit | webzepter/node-tt |
b21c678e93aad97b8c939f741b30fd9ebfff44e0 | lib/status-bar-view.coffee | lib/status-bar-view.coffee | {_, $, $$, View} = require 'atom'
module.exports =
class StatusBarView extends View
@content: ->
@div class: 'status-bar tool-panel panel-bottom', =>
@div outlet: 'rightPanel', class: 'status-bar-right pull-right'
@div outlet: 'leftPanel', class: 'status-bar-left'
initialize: ->
@bufferSubscri... | {_, $, $$, View} = require 'atom'
module.exports =
class StatusBarView extends View
@content: ->
@div class: 'status-bar tool-panel panel-bottom', =>
@div outlet: 'rightPanel', class: 'status-bar-right pull-right'
@div outlet: 'leftPanel', class: 'status-bar-left'
initialize: ->
atom.rootView.... | Add itself as a global on rootView | Add itself as a global on rootView
| CoffeeScript | mit | pombredanne/status-bar,TShapinsky/status-bar,mertkahyaoglu/status-bar,ali/status-bar,devoncarew/status-bar,Abdillah/status-bar |
65701ccd46dd2d0f86fee8ccf03e73c9dbf5580d | client/templates/results/chart/chart.js.coffee | client/templates/results/chart/chart.js.coffee | Template.chart.helpers
nonNumberDataColumnSpec: ->
for spec in @header.slice(1)
if spec.chartType isnt "number"
return spec
reactivityHack: ->
_.defer =>
$chart = $(".chart[data-id='" + @_id + "']")
$chart.empty()
$chartContainer = $("<div class='chart-container'></div>")
... | Template.chart.helpers
nonNumberDataColumnSpec: ->
for spec in @header.slice(1)
if spec.chartType isnt "number"
return spec
reactivityHack: ->
_.defer =>
$chart = $(".chart[data-id='" + @_id + "']")
$chart.empty()
$chartContainer = $("<div class='chart-container'></div>")
... | Remove percentage values from chart output | Remove percentage values from chart output
| CoffeeScript | agpl-3.0 | rbouqueau/FlowBAT,rbouqueau/FlowBAT,rbouqueau/FlowBAT,chrissanders/FlowBAT,chrissanders/FlowBAT,chrissanders/FlowBAT |
3be298d96e76f171d231e28269ec8a23902abe54 | server/controllers/deploy.coffee | server/controllers/deploy.coffee | AppConfig = require('../initializers/config')
Deploy = require('../lib/deploy')
range_check = require('range_check')
tagRefersToServer = (tag, serverName) ->
return new RegExp("^#{serverName}").test(tag)
getIpFromRequest = (req) ->
req.connection.remoteAddress
GITHUB_IP_RANGE = "192.30.252.0/22"
ipIsFromGithub ... | AppConfig = require('../initializers/config')
Deploy = require('../lib/deploy')
range_check = require('range_check')
tagRefersToServer = (tag, serverName) ->
return new RegExp("^#{serverName}").test(tag)
getIpFromRequest = (req) ->
req.connection.remoteAddress
GITHUB_IP_RANGE = "192.30.252.0/22"
ipIsFromGithub ... | Make "don't check github ip in development" work | Make "don't check github ip in development" work
| CoffeeScript | bsd-3-clause | unepwcmc/NRT,unepwcmc/NRT |
e59dc2a922034dc5b618c039b41d00791603e58b | app/assets/javascripts/components/truncate_text.js.coffee | app/assets/javascripts/components/truncate_text.js.coffee | Hummingbird.TruncateTextComponent = Ember.Component.extend
expanded: false
isTruncated: (->
@get('text').length > @get('length') + 10
).property('text', 'length')
truncatedText: (->
if @get('isTruncated') and not @get('expanded')
jQuery.trim(@get('text')).substring(0, @get('length')).trim(this) ... | Hummingbird.TruncateTextComponent = Ember.Component.extend
expanded: false
isTruncated: (->
@get('text').length > @get('length') + 10
).property('text', 'length')
truncatedText: (->
if @get('isTruncated') and not @get('expanded')
jQuery.trim(@get('text')).substring(0, @get('length')).trim(this) ... | Use actual ellipsis unicode character for truncation. | Use actual ellipsis unicode character for truncation.
| CoffeeScript | apache-2.0 | Snitzle/hummingbird,qgustavor/hummingbird,erengy/hummingbird,vevix/hummingbird,erengy/hummingbird,hummingbird-me/hummingbird,cybrox/hummingbird,paladique/hummingbird,saintsantos/hummingbird,wlads/hummingbird,jcoady9/hummingbird,qgustavor/hummingbird,saintsantos/hummingbird,MiLk/hummingbird,jcoady9/hummingbird,xhocquet/... |
2c3fc0795c013ca255a4c5d25539df8fd8154833 | lib/path_finder.coffee | lib/path_finder.coffee | path = require 'path'
fs = require 'fs-plus'
_ = require 'underscore-plus'
module.exports =
class PathFinder
railsRootPathChildren: ['app', 'config', 'lib']
ignores: /(?:\/.git\/|\.keep$|\.DS_Store$|\.eot$|\.otf$|\.ttf$|\.woff$|\.png$|\.svg$|\.jpg$|\.gif$|\.mp4$|\.eps$|\.psd$)/
constructor: (currentPath) ->
... | path = require 'path'
fs = require 'fs-plus'
_ = require 'underscore-plus'
module.exports =
class PathFinder
railsRootPathChildren: ['app', 'config', 'lib']
ignores: /(?:\/.git\/|\.(?:git)?keep$|\.DS_Store$|\.eot$|\.otf$|\.ttf$|\.woff$|\.png$|\.svg$|\.jpg$|\.gif$|\.mp4$|\.eps$|\.psd$)/
constructor: (currentPat... | Fix tiny bug in ignores | Fix tiny bug in ignores
| CoffeeScript | mit | negipo/rails-finder |
36be656c6271caec841bc1c57b98c6d3c3b1ea73 | app/utils/location.coffee | app/utils/location.coffee | `import Ember from 'ember'`
Location = Ember.HistoryLocation.extend
init: ->
@_super.apply this, arguments
if auth = @get('auth')
# location's getURL is first called before we even
# get to routes, so autoSignIn won't be called in
# such case
auth.autoSignIn() unless auth.get('signed... | `import Ember from 'ember'`
`import config from 'travis/config/environment'`
Location = Ember.HistoryLocation.extend
init: ->
@_super.apply this, arguments
if auth = @get('auth')
# location's getURL is first called before we even
# get to routes, so autoSignIn won't be called in
# such cas... | Disable landing page on pro for now | Disable landing page on pro for now
| CoffeeScript | mit | fotinakis/travis-web,fauxton/travis-web,jlrigau/travis-web,travis-ci/travis-web,2947721120/travis-web,fauxton/travis-web,2947721120/travis-web,Tiger66639/travis-web,fauxton/travis-web,fotinakis/travis-web,fotinakis/travis-web,Tiger66639/travis-web,mjlambert/travis-web,travis-ci/travis-web,travis-ci/travis-web,Tiger6663... |
9b9fda428d47cf30c974112b832ae337349c0bb6 | prototypes/load_maps/coffeescripts/main.coffee | prototypes/load_maps/coffeescripts/main.coffee | jQuery ->
myOptions =
center: new google.maps.LatLng(-34.397, 150.644)
zoom: 8
mapTypeId: google.maps.MapTypeId.ROADMAP
map = new google.maps.Map(document.getElementById("centermap"), myOptions)
| $ ->
myOptions =
center: new google.maps.LatLng(-34.397, 150.644)
zoom: 8
disableDefaultUI: true
mapTypeId: google.maps.MapTypeId.ROADMAP
map = new google.maps.Map(document.getElementById("centermap"), myOptions)
| Disable default Google Maps controls | Disable default Google Maps controls
| CoffeeScript | bsd-2-clause | akurzhan/scenario-editor,calpath/scenario-editor,akurzhan/scenario-editor,calpath/scenario-editor,calpath/scenario-editor,akurzhan/scenario-editor |
078bb0044150da1b499ccc3ea7196a5ad3207782 | spec/link-spec.coffee | spec/link-spec.coffee | RootView = require 'root-view'
Editor = require 'editor'
ChildProcess = require 'child_process'
describe "link package", ->
[editor] = []
beforeEach ->
atom.activatePackage('javascript.tmbundle', sync: true)
atom.activatePackage('hyperlink-helper.tmbundle', sync: true)
window.rootView = new RootView
... | RootView = require 'root-view'
Editor = require 'editor'
ChildProcess = require 'child_process'
describe "link package", ->
[editor] = []
beforeEach ->
atom.activatePackage('javascript-tmbundle', sync: true)
atom.activatePackage('hyperlink-helper-tmbundle', sync: true)
window.rootView = new RootView
... | Use correct textmate package names | Use correct textmate package names
| CoffeeScript | mit | atom/link |
a115d2d9e61c8c3c61fd60549fb2f66a2356e099 | app/assets/javascripts/views/forms/chosen-select.js.coffee | app/assets/javascripts/views/forms/chosen-select.js.coffee | ETahi.ChosenView = Ember.Select.extend
multiple: false
width: '200px'
disableSearchThreshold: 0
searchContains: true
attributeBindings:['multiple', 'width', 'disableSearchThreshold', 'searchContains', 'data-placeholder']
changeAction: null
change: ->
action = @get('changeAction')
@get('controller... | ETahi.ChosenView = Ember.Select.extend
multiple: false
width: '200px'
disableSearchThreshold: 0
searchContains: true
attributeBindings:['multiple', 'width', 'disableSearchThreshold', 'searchContains', 'data-placeholder']
changeAction: null
change: ->
action = @get('changeAction')
@get('controller... | Fix issue where chosen wouldn't update if bound selected value changed elsewhere | Fix issue where chosen wouldn't update if bound
selected value changed elsewhere
| CoffeeScript | mit | johan--/tahi,johan--/tahi,johan--/tahi,johan--/tahi |
71d62e7a17874df3eb50cd2336fb9312b86d2080 | lib/atom-python-test-view.coffee | lib/atom-python-test-view.coffee | {$, ScrollView} = require 'atom-space-pen-views'
module.exports =
class AtomPythonTestView extends ScrollView
message: ''
maximized: false
@content: ->
@div class: 'atom-python-test-view native-key-bindings', outlet: 'atomTestView', tabindex: -1, overflow: "auto", =>
@div class: 'btn-tool... | {$, ScrollView} = require 'atom-space-pen-views'
module.exports =
class AtomPythonTestView extends ScrollView
message: ''
maximized: false
@content: ->
@div class: 'atom-python-test-view native-key-bindings', outlet: 'atomTestView', tabindex: -1, overflow: "auto", =>
@div class: 'btn-tool... | Hide atom python test panel on Atom opening. | Hide atom python test panel on Atom opening.
| CoffeeScript | mit | pghilardi/atom-python-test |
82a5b0e69bcd6e83a904e477bf8ffa6c3ec3f588 | app/assets/javascripts/sprangular/controllers/account.coffee | app/assets/javascripts/sprangular/controllers/account.coffee | Sprangular.controller 'AccountCtrl', ($scope, $location, $routeParams, Status, Account) ->
Status.pageTitle = 'My Account'
user = Account.user
$scope.editing = false
$scope.user = user
refreshAccount = ->
Account.init().then ->
user = Account.user
user.password = ''
user.password_conf... | Sprangular.controller 'AccountCtrl', ($scope, $location, $routeParams, Status, Account) ->
Status.pageTitle = 'My Account'
user = Account.user
$scope.editing = false
$scope.user = user
refreshAccount = ->
Account.reload().then ->
user = Account.user
user.password = ''
user.password_co... | Use `Account.reload` instead of `init` | Use `Account.reload` instead of `init`
| CoffeeScript | mit | sprangular/sprangular,sprangular/sprangular,sprangular/sprangular |
117ae6e12deea89fbd85053549655a7c9a3d69ff | app/assets/javascripts/components/inline_edit_body_part.js.coffee | app/assets/javascripts/components/inline_edit_body_part.js.coffee | ETahi.InlineEditBodyPartComponent = Em.Component.extend
editing: false
snapshot: []
confirmDelete: false
createSnapshot: (->
@set('snapshot', Em.copy(@get('block'), true))
).observes('editing')
hasContent: (->
@get('block').any(@_isEmpty)
).property('block.@each.value')
hasNoContent: Em.compu... | ETahi.InlineEditBodyPartComponent = Em.Component.extend
editing: false
snapshot: []
confirmDelete: false
createSnapshot: (->
@set('snapshot', Em.copy(@get('block'), true))
).observes('editing')
hasContent: (->
@get('block').any(@_isNotEmpty)
).property('block.@each.value')
hasNoContent: Em.co... | Correct poorly named private method | Correct poorly named private method | CoffeeScript | mit | johan--/tahi,johan--/tahi,johan--/tahi,johan--/tahi |
f6526ccec1973f1f43c72086845dc21ae80179c4 | src/api/visualizers.coffee | src/api/visualizers.coffee | logger = require 'winston'
Visualizer = require('../model/visualizer').Visualizer
authorisation = require './authorisation'
utils = require '../utils'
exports.getAllVisualizers = ->
# Must be admin
if not authorisation.inGroup 'admin', this.authenticated
utils.logAndSetResponse this, 403, "User #{this.authenti... | logger = require 'winston'
Visualizer = require('../model/visualizer').Visualizer
authorisation = require './authorisation'
utils = require '../utils'
exports.getAllVisualizers = ->
# Must be admin
if not authorisation.inGroup 'admin', this.authenticated
utils.logAndSetResponse this, 403, "User #{this.authenti... | Fix user name in log | Fix user name in log
| CoffeeScript | mpl-2.0 | jembi/openhim-core-js,jembi/openhim-core-js |
7a6417d4e62ab053be8ac4f8b56c4771cf823b5e | src/scripts/workbench/views/datastream/show_view.js.coffee | src/scripts/workbench/views/datastream/show_view.js.coffee | class Workbench.Views.DatastreamShowView extends Backbone.View
template: JST["workbench/templates/datastream"]
tagName: "li"
className: "datastream"
initialize: ->
@renderDeferred = $.Deferred()
@chartView = new Workbench.Views.DatastreamChartView
model: @model
@latestView = new Workbench.... | class Workbench.Views.DatastreamShowView extends Backbone.Marionette.ItemView
template: "workbench/templates/datastream"
tagName: "li"
className: "datastream"
initialize: ->
@renderDeferred = $.Deferred()
@chartView = new Workbench.Views.DatastreamChartView
model: @model
@latestView = new ... | Update Datastream view to ItemView | Update Datastream view to ItemView
| CoffeeScript | mit | GeoSensorWebLab/Arctic-Scholar-Portal,GeoSensorWebLab/Arctic-Scholar-Portal,GeoSensorWebLab/asw-workbench,GeoSensorWebLab/asw-workbench,GeoSensorWebLab/asw-workbench |
13662ca329348098106a051468e0051c7af49835 | app/src/controllers/wallet/pairing/wallet_pairing_progress_dialog_view_controller.coffee | app/src/controllers/wallet/pairing/wallet_pairing_progress_dialog_view_controller.coffee | class @WalletPairingProgressDialogViewController extends DialogViewController
view:
contentContainer: "#content_container"
onAfterRender: ->
super
# launch request
@_request = @params.request
@_request?.onComplete (screen, error) =>
@_request = null
if screen?
dialog = new ... | class @WalletPairingProgressDialogViewController extends DialogViewController
view:
contentContainer: "#content_container"
onAfterRender: ->
super
# launch request
@_request = @params.request
@_request?.onComplete (screen, error) =>
@_request = null
@dismiss () =>
if screen... | Fix "don't dismiss pairing progress dialog when displaying success" | Fix "don't dismiss pairing progress dialog when displaying success"
| CoffeeScript | mit | LedgerHQ/ledger-wallet-chrome,Morveus/ledger-wallet-doge-chrome,Morveus/ledger-wallet-doge-chrome,LedgerHQ/ledger-wallet-chrome |
fe7c5e42a62385c4b1c89734867b8cdef1519021 | app/assets/javascripts/hyper_admin/angularjs/config.js.coffee | app/assets/javascripts/hyper_admin/angularjs/config.js.coffee | angular.module("hyperadmin", [ "ui.router" ])
| angular.module("hyperadmin", [ "ui.router" ])
.config ($httpProvider) ->
authToken = $("meta[name=\"csrf-token\"]").attr("content")
$httpProvider.defaults.headers.common["X-CSRF-TOKEN"] = authToken
$httpProvider.defaults.headers.common["X-Requested-With"] = "XMLHttpRequest"
$httpProvider.defaults.head... | Configure $http service for Rails | Configure $http service for Rails
| CoffeeScript | mit | hyperoslo/hyper_admin,hyperoslo/hyper_admin,hyperoslo/hyper_admin |
becb2e7a0659dcb120c25adf09fb627c1bd3803e | client/app/lib/commonviews/buttonviewwithprogressbar.coffee | client/app/lib/commonviews/buttonviewwithprogressbar.coffee | kd = require 'kd'
KDButtonView = kd.ButtonView
KDProgressBarView = kd.ProgressBarView
KDCustomHTMLView = kd.CustomHTMLView
module.exports = class ButtonViewWithProgressBar extends KDCustomHTMLView
constructor: (options = {}, data) ->
super options, data
o = @getOptions(... | kd = require 'kd'
KDButtonView = kd.ButtonView
KDProgressBarView = kd.ProgressBarView
KDCustomHTMLView = kd.CustomHTMLView
module.exports = class ButtonViewWithProgressBar extends KDCustomHTMLView
constructor: (options = {}, data) ->
super options, data
o = @getOptions... | Add "startProgress" parameter to start to show progress bar. | ButtonViewWithProgressBar: Add "startProgress" parameter to start to show progress bar.
| CoffeeScript | agpl-3.0 | drewsetski/koding,sinan/koding,sinan/koding,kwagdy/koding-1,koding/koding,szkl/koding,alex-ionochkin/koding,andrewjcasal/koding,andrewjcasal/koding,gokmen/koding,usirin/koding,cihangir/koding,alex-ionochkin/koding,andrewjcasal/koding,drewsetski/koding,koding/koding,gokmen/koding,cihangir/koding,jack89129/koding,szkl/ko... |
0344c541208e76c0d06f699ee025d226fccc8eb0 | src/atom-fsharp/keymaps/core.cson | src/atom-fsharp/keymaps/core.cson | # Keybindings require three things to be fully defined: A selector that is
# matched against the focused element, the keystroke and the command to
# execute.
#
# Below is a basic keybinding which registers on all platforms by applying to
# the root workspace element.
# For more detailed documentation see
# https://ato... | # Keybindings require three things to be fully defined: A selector that is
# matched against the focused element, the keystroke and the command to
# execute.
#
# Below is a basic keybinding which registers on all platforms by applying to
# the root workspace element.
# For more detailed documentation see
# https://ato... | Change keymap selector (fixes alt-enter override in OSX) | Change keymap selector (fixes alt-enter override in OSX)
| CoffeeScript | mit | ionide/ionide-atom-fsharp,dangets/ionide-atom-fsharp,ionide/ionide-fsharp |
1745208f1728f5d3289736abc011675fbaeafcc8 | app/assets/javascripts/views/overlays/figure_overlay_view.js.coffee | app/assets/javascripts/views/overlays/figure_overlay_view.js.coffee | ETahi.FigureOverlayView = ETahi.OverlayView.extend
templateName: 'overlays/figure_overlay'
layoutName: 'layouts/no_assignee_overlay_layout' #TODO: include assignee here?
uploads: Ember.ArrayController.create content: []
figures: null
didInsertElement: ->
@set 'figures', @get('controller.paper.figures')
... | ETahi.FigureOverlayView = ETahi.OverlayView.extend
templateName: 'overlays/figure_overlay'
layoutName: 'layouts/no_assignee_overlay_layout' #TODO: include assignee here?
uploads: []
figures: Em.computed.alias('controller.paper.figures')
setupUpload: (->
uploader = $('.js-jquery-fileupload')
uploader.... | Fix deleting of newly uploaded figures | Fix deleting of newly uploaded figures
| CoffeeScript | mit | johan--/tahi,johan--/tahi,johan--/tahi,johan--/tahi |
bec2ac4eb5482644dd6ee574421583687451c049 | lib/language-idris.coffee | lib/language-idris.coffee | IdrisController = require './idris-controller'
{CompositeDisposable} = require 'atom'
module.exports =
active: false
statusbar: null
config:
pathToIdris:
type: 'string'
default: 'idris'
description: 'Path to the idris executable'
activate: ->
@disposables = new CompositeDisposable
... | IdrisController = require './idris-controller'
{CompositeDisposable} = require 'atom'
module.exports =
config:
pathToIdris:
type: 'string'
default: 'idris'
description: 'Path to the idris executable'
activate: ->
@controller = new IdrisController
subscription = atom.commands.add 'at... | Revert "only start the idris compiler when there is an idris file opened" | Revert "only start the idris compiler when there is an idris file opened"
This reverts commit 89c0032aca1593cc851a65e7836ea8f539258a11.
Conflicts:
lib/language-idris.coffee
| CoffeeScript | mit | idris-hackers/atom-language-idris |
122204a9f132359a6552b9bfe8a3c8f8c7236eef | atom/config.cson | atom/config.cson | "*":
editor:
fontFamily: "input"
fontSize: 13
showInvisibles: true
showIndentGuide: true
invisibles: {}
core:
themes: [
"one-dark-ui"
"facebook-syntax"
]
welcome:
showOnStartup: false
whitespace:
removeTrailingWhitespace: true
ignoreWhitespaceOnCurrentLine: fa... | "*":
editor:
fontFamily: "input"
fontSize: 12
showInvisibles: true
showIndentGuide: true
invisibles: {}
core:
themes: [
"atom-material-ui"
"gotham-syntax"
]
welcome:
showOnStartup: false
whitespace:
removeTrailingWhitespace: true
ignoreWhitespaceOnCurrentLine:... | Update atom theme and change font-size | Update atom theme and change font-size
| CoffeeScript | mit | therealechan/dotfiles,chankaward/dotfiles,chankaward/dotfiles,therealechan/dotfiles,therealechan/dotfiles,chankaward/dotfiles |
cec08d708f40d35ca8896990fb316d3f5d57ee96 | src/filings-cli.coffee | src/filings-cli.coffee | fs = require 'fs'
optimist = require 'optimist'
parseOptions = (args=[]) ->
options = optimist(args)
options.usage('Usage: filings <command>')
options.alias('h', 'help').describe('h', 'Print this usage message')
options.alias('v', 'version').describe('v', 'Print the filings version')
options
module.exports ... | fs = require 'fs'
path = require 'path'
optimist = require 'optimist'
{FormFour} = require './filings'
parseOptions = (args=[]) ->
options = optimist(args)
options.usage('Usage: filings <command>')
options.alias('h', 'help').describe('h', 'Print this usage message')
options.alias('v', 'version').describe('v', ... | Add form 4 profit command | Add form 4 profit command
| CoffeeScript | mit | parrondo/filings,kevinsawicki/filings,krisalexander/filings |
6c90cf0d19fb0ceb1a8200b90bd9819f59b7de25 | src/client/docs.coffee | src/client/docs.coffee | # Helper function needed to deal with array-like stylesheet objects.
toArray = (obj) -> Array::slice.call obj
# Scans your stylesheet for pseudo classes and adds a class with the same name.
# Thanks to Knyle Style Sheets for the idea.
processStyles = ->
# Compile regular expression.
pseudos = [ 'link', 'visited',... | # Scans your stylesheet for pseudo classes and adds a class with the same name.
# Thanks to Knyle Style Sheets for the idea.
$ ->
addPseudoClasses()
add = (a, b) -> a + b
addPseudoClasses = ->
# Compile regular expression.
pseudos = [ 'link', 'visited', 'hover', 'active', 'focus', 'target',
'enabl... | Refactor pseudo class selector script a bit | Refactor pseudo class selector script a bit
| CoffeeScript | mit | paulwellnerbou/styledocco,ooooooo-q/styledocco,ooooooo-q/styledocco,paulwellnerbou/styledocco,trungnghia112/styledocco,trungnghia112/styledocco,jacobrask/styledocco |
3735b4c7f839615af9af94d7aef461be9b020577 | app/js/jail_iframe/initializers/scrollbarSuppressor.coffee | app/js/jail_iframe/initializers/scrollbarSuppressor.coffee | scrollbarWidth = 0
FactlinkJailRoot.loaded_promise.then ->
# Create the measurement nod; see http://davidwalsh.name/detect-scrollbar-width
scrollDiv = document.createElement("div");
$(scrollDiv).css(
width: "100px"
height: "100px"
overflow: "scroll"
position: "absolute"
top: "-9999px"
)
do... | scrollbarWidth = 0
FactlinkJailRoot.loaded_promise.then ->
# Create the measurement nod; see http://davidwalsh.name/detect-scrollbar-width
scrollDiv = document.createElement("div");
$(scrollDiv).css(
width: "100px"
height: "100px"
overflow: "scroll"
position: "absolute"
top: "-9999px"
)
do... | Change html margin when the sidebar opens to compensate for change in | Change html margin when the sidebar opens to compensate for change in
| CoffeeScript | mit | Factlink/js-library,Factlink/js-library,Factlink/js-library |
0db7df6c144d4061059a35d68d428e14c07d7ac4 | app/assets/javascripts/admin/order_cycles/order_cycles.js.erb.coffee | app/assets/javascripts/admin/order_cycles/order_cycles.js.erb.coffee | angular.module('admin.orderCycles', ['ngTagsInput', 'admin.indexUtils', 'admin.enterprises'])
.directive 'datetimepicker', ($timeout, $parse) ->
require: "ngModel"
link: (scope, element, attrs, ngModel) ->
$timeout ->
flatpickr(element, Object.assign({},
window.FLATP... | angular.module('admin.orderCycles', ['ngTagsInput', 'admin.indexUtils', 'admin.enterprises'])
.directive 'datetimepicker', ($timeout, $parse) ->
require: "ngModel"
link: (scope, element, attrs, ngModel) ->
$timeout ->
fp = flatpickr(element, Object.assign({},
window.... | Add keyup event listener on hour/minute inputs | Add keyup event listener on hour/minute inputs
- To set the date (and trigger the onChange event) when the user is typing through its keyboard
| CoffeeScript | agpl-3.0 | lin-d-hop/openfoodnetwork,openfoodfoundation/openfoodnetwork,mkllnk/openfoodnetwork,Matt-Yorkley/openfoodnetwork,openfoodfoundation/openfoodnetwork,mkllnk/openfoodnetwork,Matt-Yorkley/openfoodnetwork,Matt-Yorkley/openfoodnetwork,lin-d-hop/openfoodnetwork,mkllnk/openfoodnetwork,mkllnk/openfoodnetwork,lin-d-hop/openfoodn... |
895d2d3334bb1ba6909df726e560ccc19ff18928 | lib/dev-live-reload.coffee | lib/dev-live-reload.coffee | UIWatcher = require './ui-watcher'
module.exports =
activate: (state) ->
uiWatcher = new UIWatcher
themeManager: atom.themes
rootView.command 'dev-live-reload:reload-all', ->
uiWatcher.reloadAll()
| $ = require 'jquery'
UIWatcher = require './ui-watcher'
module.exports =
activate: (state) ->
# HACK: I need an actvation event when the ui or packages are all loaded.
# It cant watch all the packages until they are all loaded.
createUIWatcher = ->
uiWatcher = new UIWatcher
themeManager: a... | Create the UIWatcher after everything has been loaded | Create the UIWatcher after everything has been loaded | CoffeeScript | mit | atom/dev-live-reload |
69846018df072a8180a67d785b7990523b832bb4 | src/trix/controllers/level_2_input_controller.coffee | src/trix/controllers/level_2_input_controller.coffee | #= require trix/controllers/abstract_input_controller
class Trix.Level2InputController extends Trix.AbstractInputController
events:
beforeinput: (event) ->
log(event)
input: (event) ->
log(event)
log = (event) ->
console.log("[#{event.type}] #{event.inputType}: #{JSON.stringify(event.data)}")... | #= require trix/controllers/abstract_input_controller
{objectsAreEqual} = Trix
class Trix.Level2InputController extends Trix.AbstractInputController
mutationIsExpected: (mutationSummary) ->
result = objectsAreEqual(mutationSummary, @inputSummary)
console.log("[mutation] [#{if result then "expected" else "un... | Add "insertText" and "deleteContentBackward" inputType handlers | Add "insertText" and "deleteContentBackward" inputType handlers
| CoffeeScript | mit | basecamp/trix,basecamp/trix,basecamp/trix,basecamp/trix |
2a3b6e46d1a123c581825f50e2689c3eb2c97361 | core/app/backbone/views/react_install_extension_button.coffee | core/app/backbone/views/react_install_extension_button.coffee | determineBrowser = ->
[ 'chrome', 'firefox', 'safari', 'phantom_js', 'unsupported-browser' ]
.filter( (browser) -> $('html.'+browser).length
)[0]
extension_link_by_browser =
firefox: 'https://static.factlink.com/extension/firefox/factlink-latest.xpi'
safari: 'https://static.factlink.com/extension/firefox/fac... | determineBrowser = ->
[ 'chrome', 'firefox', 'safari', 'phantom_js', 'unsupported-browser' ]
.filter( (browser) -> $('html.'+browser).length
)[0]
extension_link_by_browser =
firefox: 'https://static.factlink.com/extension/firefox/factlink-latest.xpi'
safari: 'https://static.factlink.com/extension/firefox/fac... | Simplify browser-specific extension install logic | Simplify browser-specific extension install logic
| CoffeeScript | mit | Factlink/factlink-core,Factlink/factlink-core,daukantas/factlink-core,Factlink/factlink-core,Factlink/factlink-core,daukantas/factlink-core,daukantas/factlink-core,daukantas/factlink-core |
5e174189c268c1540eb3a90ea2e431d6f3d0ce2f | coffee/node_readline.coffee | coffee/node_readline.coffee | # IMPORTANT: choose one
RL_LIB = "libreadline" # NOTE: libreadline is GPL
#RL_LIB = "libedit"
HISTORY_FILE = require('path').join(process.env.HOME, '.mal-history')
rlwrap = {} # namespace for this module in web context
ffi = require('ffi')
fs = require('fs')
rllib = ffi.Library(RL_LIB, {
'readline': ['string',... | readlineSync = require('readline-sync');
exports.readline = (prompt = 'user> ') ->
readlineSync.question(prompt)
| Fix CoffeeScript example. Use readline-sync. Old ffi thing does not work. | Fix CoffeeScript example. Use readline-sync. Old ffi thing does not work.
| CoffeeScript | mpl-2.0 | treeform/mal,treeform/mal,treeform/mal,treeform/mal,treeform/mal,treeform/mal,treeform/mal,treeform/mal,treeform/mal,treeform/mal,treeform/mal,treeform/mal,treeform/mal,treeform/mal,treeform/mal,treeform/mal |
1644dc12c6519545843ae53841cee6262b29ddbe | src/index.cjsx | src/index.cjsx | React = require 'react'
deep = require 'deep-get-set'
module.exports = React.createClass
displayName: "SimpleTable"
propTypes:
columns: React.PropTypes.array
data: React.PropTypes.array
render: ->
columns = @props.columns.map (column) ->
if typeof column is "string"
<th key={column}>{... | React = require 'react'
deep = require 'deep-get-set'
module.exports = React.createClass
displayName: "SimpleTable"
propTypes:
columns: React.PropTypes.array
data: React.PropTypes.array
render: ->
columns = @props.columns.map (column) ->
if typeof column is "string"
<th key={column}>{... | Make react happy with keys | Make react happy with keys
| CoffeeScript | mit | KyleAMathews/react-simple-table |
b04a70ddffd89c13b0a3b6f2ea048ff440a4a69b | js-library/app/js/jail_iframe/classes/control_iframe.coffee | js-library/app/js/jail_iframe/classes/control_iframe.coffee | class FactlinkJailRoot.ControlIframe
constructor: ->
@el = document.createElement('iframe')
@el.className = 'factlink-control-frame'
#need to append to outer document before we can access frame document.
FactlinkJailRoot.$factlinkCoreContainer.append(@el)
@$el = $(@el)
@doc = @el.contentWindow... | control_visibility_transition_time = 300+1000/60 #keep in sync with scss
class FactlinkJailRoot.ControlIframe
constructor: ->
@el = document.createElement('iframe')
@el.className = 'factlink-control-frame'
#need to append to outer document before we can access frame document.
FactlinkJailRoot.$factli... | Implement fadeout/in in control iframe; return deferred for completion handlers | Implement fadeout/in in control iframe; return deferred for completion handlers
| CoffeeScript | mit | daukantas/factlink-core,Factlink/factlink-core,daukantas/factlink-core,Factlink/factlink-core,daukantas/factlink-core,Factlink/factlink-core,Factlink/factlink-core,daukantas/factlink-core |
2219dc0168c1d484c050f4dbd83816b726d48930 | src/deployment-monitor.coffee | src/deployment-monitor.coffee | _ = require('underscore')
class DeploymentMonitor
timeout = 10000
constructor: ()->
@_deployment = null
@_chat = null
@_currentTimeout = 0
@_eventListeners = {
'change': ()=>
@_resetTimeout()
@_monitorTimeout()
'close': ()=>
@.removeDeployment()
'error': ... | _ = require('underscore')
class DeploymentMonitor
timeout = 10000
constructor: ()->
@_deployment = null
@_chat = null
@_currentTimeout = 0
@_eventListeners = {
change: ()=>
@_resetTimeout()
@_monitorTimeout()
close: ()=>
@.removeDeployment()
error: ()=>
... | Remove unnecessary quotes of eventListeners. | Remove unnecessary quotes of eventListeners.
| CoffeeScript | mit | cargomedia/hubot-pulsar,vogdb/hubot-pulsar,vogdb/hubot-pulsar,cargomedia/hubot-pulsar |
40d03604d8145ec0d06b0d5bf00e08fd025a3815 | app/assets/javascripts/rglossa/views/cwb/result/table_view.coffee | app/assets/javascripts/rglossa/views/cwb/result/table_view.coffee | App.CwbResultTableView = Em.View.extend
didInsertElement: ->
@$('[data-ot]').each (index, token) ->
new Opentip token, $(token).data('ot'),
style: 'dark'
fixed: true
| App.CwbResultTableView = Em.View.extend
contentBinding: 'controller.arrangedContent'
# We need to create tooltips with grammatical info for tokens after both of these have happened:
# - the controller's content property has been filled with a page of search results
# - the view has been rendered
contentDidC... | Fix creation of tooltips with grammatical token info | Fix creation of tooltips with grammatical token info
| CoffeeScript | mit | textlab/rglossa,textlab/glossa,textlab/glossa,textlab/rglossa,textlab/glossa,textlab/rglossa,textlab/glossa,textlab/rglossa,textlab/glossa,textlab/rglossa |
29603bf5accf6f0a7772fb0b0226858c02cac6a4 | app/assets/javascripts/hyrax/monkey_patch_turbolinks.js.coffee | app/assets/javascripts/hyrax/monkey_patch_turbolinks.js.coffee | # Monkey patch Turbolinks to render 401
# See https://github.com/turbolinks/turbolinks/issues/179
# https://github.com/projecthydra-labs/hyrax/issues/617
Turbolinks.HttpRequest.prototype.requestLoaded = ->
@endRequest =>
if 200 <= @xhr.status < 300 or @xhr.status == 401
@delegate.requestCompletedWithRes... | # Monkey patch Turbolinks to render 401
# See https://github.com/turbolinks/turbolinks/issues/179
# https://github.com/projecthydra-labs/hyrax/issues/617
if Turbolinks?
Turbolinks.HttpRequest.prototype.requestLoaded = ->
@endRequest =>
if 200 <= @xhr.status < 300 or @xhr.status == 401
@delegate.... | Make sure Turbolinks is defined before patching. | Make sure Turbolinks is defined before patching.
| CoffeeScript | apache-2.0 | samvera/hyrax,samvera/hyrax,samvera/hyrax,samvera/hyrax |
11d6a819422a9cdaf9a50cba7670b4f24f9b40e1 | javascripts/lib.coffee | javascripts/lib.coffee | #= require almond
window.ttm ||= {}
ttm.ClassMixer = (klass)->
klass.build = ->
it = new klass
it.initialize && it.initialize.apply(it, arguments)
it
klass.prototype.klass = klass
klass
define "lib/class_mixer", ->
return ttm.ClassMixer
| #= require almond
window.ttm ||= {}
window.decorators ||= {}
ttm.ClassMixer = (klass)->
klass.build = ->
it = new klass
it.initialize && it.initialize.apply(it, arguments)
it
klass.prototype.klass = klass
klass
define "lib/class_mixer", ->
return ttm.ClassMixer
| Implement decorator pattern for student dashboard. | WIP: Implement decorator pattern for student dashboard.
| CoffeeScript | mit | thinkthroughmath/ttm-coffeescript-utilities |
e055f9c2ba84c196c26365cdb6635b61d4fca14d | app/assets/javascripts/components/add_author_form_component.js.coffee | app/assets/javascripts/components/add_author_form_component.js.coffee | ETahi.AddAuthorFormComponent = Ember.Component.extend
tagName: 'div'
setNewAuthor: ( ->
unless @get('newAuthor')
@set('newAuthor', {})
).on('init')
actions:
toggleAuthorForm: ->
@sendAction('hideAuthorForm')
saveNewAuthor: ->
@sendAction('saveAuthor', @get('newAuthor'))
| ETahi.AddAuthorFormComponent = Ember.Component.extend
tagName: 'div'
setNewAuthor: ( ->
unless @get('newAuthor')
@set('newAuthor', {})
).on('init')
actions:
toggleAuthorForm: ->
@sendAction('hideAuthorForm')
saveNewAuthor: ->
author = @get('newAuthor')
@sendAction('saveAut... | Fix new author form holding on to new author. | Fix new author form holding on to new author.
| CoffeeScript | mit | johan--/tahi,johan--/tahi,johan--/tahi,johan--/tahi |
21485bba3aa5a56db7e7122e12d4e056f61aba18 | client/lanes/react/mixins/Screen.coffee | client/lanes/react/mixins/Screen.coffee | Lanes.React.Mixins.Screen = {
childContextTypes:
screen: React.PropTypes.object
listenNetworkEvents: true
loadOrCreateModel: (options) ->
if options.prop and @props[options.prop]
@props[options.prop]
else
model = new options.klass
if options.attr... | Lanes.React.Mixins.Screen = {
childContextTypes:
screen: React.PropTypes.object
listenNetworkEvents: true
loadOrCreateModel: (options) ->
if options.prop and @props[options.prop]
@props[options.prop]
else
model = new options.klass
if options.att... | Call setModel after fetching model | Call setModel after fetching model
Needed so the commands can notify observers
| CoffeeScript | mit | argosity/lanes,argosity/hippo,argosity/hippo,argosity/lanes,argosity/lanes,argosity/hippo |
86b2a7773ef78a48ff523da4d4d0481f62f1fddc | lib/init.coffee | lib/init.coffee | module.exports =
configDefaults:
clangCommand: 'clang'
clangPlusPlusCommand: 'clang++'
clangExecutablePath: null
clangIncludePaths: '.'
clangSuppressWarnings: false
clangDefaultCFlags: '-Wall'
clangDefaultCppFlags: '-Wall'
activate: ->
console.log 'activate linter-clang'
| module.exports =
configDefaults:
clangCommand: 'clang'
clangExecutablePath: null
clangIncludePaths: '.'
clangSuppressWarnings: false
clangDefaultCFlags: '-Wall'
clangDefaultCppFlags: '-Wall'
activate: ->
console.log 'activate linter-clang'
| Remove Clang Plus Plus Command Variable. | Remove Clang Plus Plus Command Variable.
| CoffeeScript | mit | k2b6s9j/linter-emscripten,k2b6s9j/linter-emscripten,k2b6s9j/linter-emscripten |
ab0f9e88a776f0a5daa334b2f6e802865ac9598d | src/browser/atom-protocol-handler.coffee | src/browser/atom-protocol-handler.coffee | app = require 'app'
fs = require 'fs'
path = require 'path'
protocol = require 'protocol'
# Handles requests with 'atom' protocol.
#
# It's created by {AtomApplication} upon instantiation and is used to create a
# custom resource loader for 'atom://' URLs.
#
# The following directories are searched in order:
# * ~/.... | app = require 'app'
fs = require 'fs'
path = require 'path'
protocol = require 'protocol'
# Handles requests with 'atom' protocol.
#
# It's created by {AtomApplication} upon instantiation and is used to create a
# custom resource loader for 'atom://' URLs.
#
# The following directories are searched in order:
# * ~/.... | Add dot atom directory ivar | Add dot atom directory ivar
| CoffeeScript | mit | t9md/atom,acontreras89/atom,fredericksilva/atom,abcP9110/atom,BogusCurry/atom,dijs/atom,constanzaurzua/atom,qskycolor/atom,kaicataldo/atom,bj7/atom,hellendag/atom,chengky/atom,lisonma/atom,harshdattani/atom,rlugojr/atom,sebmck/atom,YunchengLiao/atom,Galactix/atom,tmunro/atom,ashneo76/atom,lpommers/atom,rxkit/atom,qskyc... |
811012897857b1fbf69f1b011efb6921f950b1c0 | app/assets/javascripts/backbone/views/work/job_form_view.coffee | app/assets/javascripts/backbone/views/work/job_form_view.coffee | Gather.Views.Work.JobFormView = Backbone.View.extend
initialize: (options) ->
events:
'cocoon:after-insert': 'shiftInserted'
shiftInserted: (event, inserted) ->
@initDatePickers(inserted)
initDatePickers: (inserted) ->
$(inserted).find(".datetimepicker").datetimepicker()
| Gather.Views.Work.JobFormView = Backbone.View.extend
initialize: (options) ->
@formatFields()
events:
'cocoon:after-insert': 'shiftInserted'
'change #work_job_times': 'formatFields'
formatFields: ->
dateFormat = I18n.t('datepicker.pformat')
timeFormat = I18n.t('timepicker.pformat')
time... | Set picker format based on times | 7836: Set picker format based on times
| CoffeeScript | mit | touchstone-cohousing/mess,touchstone-cohousing/mess,touchstone-cohousing/mess |
b8b89b82d25cd3feed67f422a032f3064c4c27d0 | core/app/backbone/views/channels/favourite_topic_button_view.coffee | core/app/backbone/views/channels/favourite_topic_button_view.coffee | class window.FavouriteTopicButtonView extends ActionButtonView
mini: true
onRender: -> @updateButton()
initialize: ->
@user = currentUser
@bindTo @user.favourite_topics, 'add remove change reset', @updateButton, @
templateHelpers: =>
disabled_label: Factlink.Global.t.follow_topic.capitalize()
... | class window.FavouriteTopicButtonView extends ActionButtonView
mini: true
onRender: -> @updateButton()
initialize: ->
@user = currentUser
@bindTo @user.favourite_topics, 'add remove change reset', @updateButton, @
templateHelpers: =>
disabled_label: Factlink.Global.t.follow_topic.capitalize()
... | Use unfollow labels for 'Follow topic' button | Use unfollow labels for 'Follow topic' button
| CoffeeScript | mit | daukantas/factlink-core,daukantas/factlink-core,Factlink/factlink-core,Factlink/factlink-core,Factlink/factlink-core,Factlink/factlink-core,daukantas/factlink-core,daukantas/factlink-core |
765e71afe2dccc06644129baa28c14a2b53623ce | bin/tourney-time.coffee | bin/tourney-time.coffee | #!/usr/bin/env coffee
argv = require('yargs')
.usage('Usage: $0 --teams [num] --time [num] --rest [num] --areas [num]')
.demand(['teams'])
.default('time', 33)
.default('rest', 7)
.default('areas', 1)
.argv
{teams, time, rest, areas} = argv
{timeNeededMinutes, tourneySchedule, playoffGames} = require('../... | #!/usr/bin/env coffee
argv = require('yargs')
.usage('Usage: $0 --teams [num] --time [num] --rest [num] --areas [num]')
.demand(['teams'])
.default('time', 33)
.default('rest', 7)
.default('areas', 1)
.argv
{teams, time, rest, areas} = argv
{timeNeededMinutes, tourneySchedule, playoffGames, schedule} = re... | Fix for bad game time output | bug: Fix for bad game time output
| CoffeeScript | mit | duereg/tourney-time |
faf60739b936cda5479d4549d3872578faa881e9 | client/DevTools/AppController.coffee | client/DevTools/AppController.coffee | class DevToolsController extends AppController
name = "DevTools"
version = "0.1"
route = "/:name?/#{name}"
KD.registerAppClass this, {
name, version, behavior: "application", route,
menu : [
{ title : "Create a new App", eventName : "create" }
{ type : "separator"... | class DevToolsController extends AppController
name = "DevTools"
version = "0.1"
route = "/:name?/#{name}"
KD.registerAppClass this, {
name, version, behavior: "application", route,
menu : [
{ title : "Create a new App", eventName : "create" }
{ type : "separator"... | Fix the resizeHandler, dunno why it needs to be called two times ~ FIXME later | DevTools: Fix the resizeHandler, dunno why it needs to be called two times ~ FIXME later
| CoffeeScript | agpl-3.0 | szkl/koding,drewsetski/koding,drewsetski/koding,mertaytore/koding,alex-ionochkin/koding,gokmen/koding,usirin/koding,jack89129/koding,drewsetski/koding,alex-ionochkin/koding,drewsetski/koding,kwagdy/koding-1,rjeczalik/koding,rjeczalik/koding,gokmen/koding,alex-ionochkin/koding,mertaytore/koding,kwagdy/koding-1,gokmen/ko... |
5b33812749d1d662e3570236f6e6e286cd1b36b5 | coffee/simulate.coffee | coffee/simulate.coffee | unless Offline
throw new Error("Offline simulate brought in without offline.js")
for state in ['up', 'down']
if document.querySelector("script[data-simulate='#{ state }']") or localStorage.OFFLINE_SIMULATE is state
Offline.options ?= {}
Offline.options.checks ?= {}
Offline.options.checks.active = state... | unless Offline
throw new Error("Offline simulate brought in without offline.js")
for state in ['up', 'down']
if document.querySelector("script[data-simulate='#{ state }']") or localStorage?.OFFLINE_SIMULATE is state
Offline.options ?= {}
Offline.options.checks ?= {}
Offline.options.checks.active = stat... | Fix missing availability check for window.localStorage (e.g. it is disabled by default in android webviews) | Fix missing availability check for window.localStorage (e.g. it is disabled by default in android webviews)
| CoffeeScript | mit | micha/offline,micha/offline,matghaleb/offline,HubSpot/offline,sanbiv/offline,Thunderforge/offline,MartinReidy/offline,sanbiv/offline,dieface/offline,saada/offline,sombr/offline,marcomatteocci/offline,mcanthony/offline,HubSpot/offline,hadifarnoud/offline,hadifarnoud/offline,sojimaxi/offline,saada/offline,Thunderforge/of... |
c2f5fe346c069a80f85d38c6bf24d76daccf2666 | src/reactGUI/ReactDOM-shim.coffee | src/reactGUI/ReactDOM-shim.coffee | try
ReactDOM = require 'react-dom'
catch
ReactDOM = window.ReactDOM
unless ReactDOM?
throw "Can't find ReactDOM"
module.exports = ReactDOM | try
ReactDOM = require 'react-dom'
catch
ReactDOM = window.ReactDOM
# can fall back to normal React until 0.15
unless ReactDOM?
try
ReactDOM = require 'react'
catch
ReactDOM = window.React
unless ReactDOM?
throw "Can't find ReactDOM"
module.exports = ReactDOM
| Allow ReactDOM -> React fallback | Allow ReactDOM -> React fallback
| CoffeeScript | bsd-2-clause | literallycanvas/literallycanvas,irskep/literallycanvas |
05ce975ab4e0ea6ba4b62afd5430703868ad9945 | benchmark/benchmark-bootstrap.coffee | benchmark/benchmark-bootstrap.coffee | require 'atom'
{runSpecSuite} = require '../spec/jasmine-helper'
atom.openDevTools()
document.title = "Benchmark Suite"
benchmarkSuite = require.resolve('./benchmark-suite')
runSpecSuite(benchmarkSuite, true)
| require '../src/atom'
{runSpecSuite} = require '../spec/jasmine-helper'
atom.openDevTools()
document.title = "Benchmark Suite"
benchmarkSuite = require.resolve('./benchmark-suite')
runSpecSuite(benchmarkSuite, true)
| Use relative path to atom require | Use relative path to atom require
| CoffeeScript | mit | scippio/atom,vjeux/atom,stinsonga/atom,0x73/atom,DiogoXRP/atom,bolinfest/atom,AdrianVovk/substance-ide,boomwaiza/atom,Jandersolutions/atom,targeter21/atom,oggy/atom,t9md/atom,dkfiresky/atom,anuwat121/atom,CraZySacX/atom,davideg/atom,rmartin/atom,panuchart/atom,Austen-G/BlockBuilder,yalexx/atom,liuxiong332/atom,KENJU/at... |
6ec1f195b3c42954d0a551ea06af665291dad28f | client/views/tasks/add_task.coffee | client/views/tasks/add_task.coffee | Template.newTaskForm.events
'submit #new-task, click #addTaskButton': (e) ->
e.preventDefault()
body = $('#new-task-text').val()
$('#new-task-text').val("")
now = new Date()
priority = 'low'
list = 'Adel'
Tasks.insert
body: body
dateDue: moment(now).add('w', 1).toDate()
d... | Template.newTaskForm.events
'submit #new-task, click #addTaskButton': (e) ->
e.preventDefault()
body = $('#new-task-text').val()
$('#new-task-text').val("")
now = new Date()
priority = 'low'
list = 'Home'
Tasks.insert
body: body
dateDue: moment(now).add('w', 1).toDate()
d... | Add tasks to 'Home' list by default | Add tasks to 'Home' list by default
| CoffeeScript | agpl-3.0 | adelq/astroid-web |
73d154f6df2c1bcc4a99b2220c25cf74a41ac587 | src/tab.coffee | src/tab.coffee | {View} = require 'space-pen'
module.exports =
class Tab extends View
@content: (editSession) ->
@div class: 'tab', =>
@span class: 'file-name', outlet: 'fileName'
@span class: 'close-icon'
initialize: (@editSession) ->
@buffer = @editSession.buffer
@subscribe @buffer, 'path-change', => @up... | {View} = require 'space-pen'
module.exports =
class Tab extends View
@content: (editSession) ->
@div class: 'tab', =>
@span class: 'file-name', outlet: 'fileName'
@span class: 'close-icon'
initialize: (@editSession) ->
@buffer = @editSession.buffer
@subscribe @buffer, 'path-changed', => @u... | Rename `Anchor` and `Buffer` events to passive-voice scheme | Rename `Anchor` and `Buffer` events to passive-voice scheme
| CoffeeScript | mit | pombredanne/tabs,harai/tabs,acontreras89/tabs,atom/tabs |
5e1d1e9ad6359fd3f0b5c7a88492ab599b925e23 | core/app/backbone/views/opinionators/opinionators_avatars_view.coffee | core/app/backbone/views/opinionators/opinionators_avatars_view.coffee | class OpinionatorsAvatarView extends Backbone.Marionette.Layout
tagName: 'span'
className: 'opinionators-avatar'
template: 'opinionators/avatar'
onRender: ->
UserPopoverContentView.makeTooltip @, @model
class window.OpinionatorsAvatarsView extends Backbone.Marionette.CompositeView
tagName: 'span'
clas... | class OpinionatorsAvatarView extends Backbone.Marionette.Layout
tagName: 'span'
className: 'opinionators-avatar'
template: 'opinionators/avatar'
onRender: ->
UserPopoverContentView.makeTooltip @, @model
class window.OpinionatorsAvatarsView extends Backbone.Marionette.CompositeView
tagName: 'span'
clas... | Truncate to 4 images by default | Truncate to 4 images by default
| CoffeeScript | mit | Factlink/factlink-core,Factlink/factlink-core,daukantas/factlink-core,daukantas/factlink-core,Factlink/factlink-core,Factlink/factlink-core,daukantas/factlink-core,daukantas/factlink-core |
f9774141b14f0ecf46a49b5475d9cf576cfdee8b | services/web/app/coffee/Features/Analytics/AnalyticsManager.coffee | services/web/app/coffee/Features/Analytics/AnalyticsManager.coffee | settings = require "settings-sharelatex"
logger = require "logger-sharelatex"
_ = require "underscore"
request = require "request"
makeRequest: (opts, callback)->
if settings.apis?.analytics?.url?
request opts, callback
else
callback()
module.exports =
recordEvent: (user_id, event, segmentation = {}, call... | settings = require "settings-sharelatex"
logger = require "logger-sharelatex"
_ = require "underscore"
request = require "request"
makeRequest = (opts, callback)->
if settings.apis?.analytics?.url?
urlPath = opts.url
opts.url = "#{settings.apis.analytics.url}#{urlPath}"
request opts, callback
else
callback(... | Fix up makeRequest, so it copes with `analytics.url` being un-configured. | Fix up makeRequest, so it copes with `analytics.url` being un-configured.
| CoffeeScript | agpl-3.0 | sharelatex/sharelatex |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.