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 |
|---|---|---|---|---|---|---|---|---|---|
df1bc05a6e6b7f034623886e8a5931e808d6b7f2 | app/assets/javascripts/application/views/users/edit.js.coffee | app/assets/javascripts/application/views/users/edit.js.coffee | class App.Views.Users.Edit extends App.View
template: JST['application/templates/users/edit']
events:
'submit form' : 'onFormSubmit'
render: ->
@$el.html(@template(@model.attributes))
onFormSubmit: ->
form = @$el.find "form"
newAttrs = @updateModelFromForm(form)
success = =>
gh_handl... | class App.Views.Users.Edit extends App.View
template: JST['application/templates/users/edit']
events:
'submit form' : 'onFormSubmit'
render: ->
@$el.html(@template(@model.attributes))
onFormSubmit: ->
$('#get_api').attr('disabled', true)
$('#get_api').val('Loading...')
form = @$el.find "fo... | Disable button and change text while loading. | Disable button and change text while loading.
| CoffeeScript | mit | cbus-sea-lions-2015/DEVOLIO,cbus-sea-lions-2015/DEVOLIO,cbus-sea-lions-2015/DEVOLIO |
ce027085940ba5aff16770b7f454cc1becd8c830 | app/src/controllers/update/update_done_view_controller.coffee | app/src/controllers/update/update_done_view_controller.coffee | class @UpdateDoneViewController extends @UpdateViewController
localizablePageSubtitle: "update.done.update_succeeded"
localizableNextButton: "common.restore"
navigation:
nextRoute: "/onboarding/management/welcome"
navigateNext: ->
ledger.app.setExecutionMode(ledger.app.Modes.Wallet)
super | class @UpdateDoneViewController extends @UpdateViewController
localizablePageSubtitle: "update.done.update_succeeded"
localizableNextButton: "common.restore"
navigation:
nextRoute: "/onboarding/device/connecting"
navigateNext: ->
@getRequest().cancel()
ledger.app.reconnectDongleAndEnterWalletMode(... | Reconnect dongle at the end of FUP | Reconnect dongle at the end of FUP
| CoffeeScript | mit | LedgerHQ/ledger-wallet-chrome,LedgerHQ/ledger-wallet-chrome |
ab719c7bc4c2082c3e82d37f3fdd71ae8a36bbf3 | assets/js/gimme/gimme.coffee | assets/js/gimme/gimme.coffee | do ->
mapOptions =
center: new (google.maps.LatLng)(43.8321591, 4.3428536)
mapTypeId: google.maps.MapTypeId.ROADMAP
streetViewControl: false
scrollwheel: false
navigationControl: false
mapTypeControl: false
scaleControl: false
draggable: false
zoomControlOptions: style: google.maps.ZoomControlStyle.... | do ->
mapOptions =
center: new (google.maps.LatLng)(43.8321591, 4.3428536)
mapTypeId: google.maps.MapTypeId.ROADMAP
streetViewControl: false
scrollwheel: false
navigationControl: false
mapTypeControl: false
scaleControl: false
draggable: false
zoomControlOptions: style: google.maps.ZoomControlStyle.... | Add Caman process event listeners | Add Caman process event listeners
| CoffeeScript | apache-2.0 | mr-wildcard/marquis |
793d67686c6995cd145105da290dfd99214fadf0 | web/app/models/users.coffee | web/app/models/users.coffee | orm = require('orm')
module.exports = (db, callback) ->
db.define("user", {
id_str: String,
screen_name: String,
name: String,
profile_image_url: String,
location: String,
favourites_count: Number,
url: String,
lang: String,
statuses_count: Number,
friends_count: Number,
followers_count: Number
... | orm = require('orm')
module.exports = (db, callback) ->
db.define("user", {
id_str: String,
screen_name: String,
name: String,
description: String,
created_at: String,
location: String,
profile_image_url: String,
profile_image_url_https: String,
url: String,
listed_count: Number,
favourites_coun... | Adjust user model to twitterbot | Adjust user model to twitterbot
| CoffeeScript | apache-2.0 | mksplg/twitter-ads |
fc96d69859ec3a8762ccd225f0e4c1f204e9d887 | js/tests/process-test-results.coffee | js/tests/process-test-results.coffee | process = () =>
if @JasmineReporter.finished
results = @JasmineReporter.results()
json = JSON.stringify(results)
# attach it to the DOM, so the it can be retrieved by webdriver
element = @document.createElement("div")
text = @document.createTextNode(json)
element.appendChild text
element.... | process = () =>
if @JasmineReporter.finished
results = @JasmineReporter.results()
results = (v for k,v of results)
json = JSON.stringify(results)
# attach it to the DOM, so the it can be retrieved by webdriver
element = @document.createElement("div")
text = @document.createTextNode(json)
... | Convert weird object notation to proper arrays | Convert weird object notation to proper arrays
| CoffeeScript | epl-1.0 | prathamesh-sonpatki/frontend,RayRutjes/frontend,RayRutjes/frontend,circleci/frontend,circleci/frontend,prathamesh-sonpatki/frontend,circleci/frontend |
afd9c2c2d03c0b1e0f015ef46f0cd04b6903b434 | js/main.coffee | js/main.coffee | ---
---
pow2 = (exp) ->
base = 1
base *= 2 while exp-- > 0
base
update = ->
val = 0
for el in document.querySelectorAll '.flag-list input'
val += pow2 el.getAttribute 'value' if el.checked
document.querySelector('.page-heading strong').innerHTML = val
return
document.addEventListener 'DOMContentLoaded', -... | ---
---
pow2 = (exp) ->
base = 1
base *= 2 while exp-- > 0
base
recalculate = ->
val = 0
for el in document.querySelectorAll '.flag-list input'
val += pow2 el.getAttribute 'value' if el.checked
document.querySelector('.page-heading strong').innerHTML = val
return
document.addEventListener 'DOMContentLoade... | Rename flag value recalculating function | Rename flag value recalculating function
| CoffeeScript | mit | ranisalt/flags-calculator |
b70201402e75f54b6bd1d358503e0e36b16fdf99 | app/data/workflows.coffee | app/data/workflows.coffee | Store = require './store'
EXAMPLE_WORKFLOW =
id: 'GZ_MAIN_WORKFLOW'
firstTask: 'interest'
tasks:
interest:
type: 'drawing'
question: 'Color some points'
tools: [
{value: 'red', label: 'Red', type: 'point', color: 'red'}
{value: 'green', label: 'Green', type: 'point', color: ... | Store = require './store'
EXAMPLE_WORKFLOW =
id: 'GZ_MAIN_WORKFLOW'
firstTask: 'interest'
tasks:
interest:
type: 'drawing'
question: 'Color some points'
tools: [
{value: 'red', label: 'Red', type: 'point', color: 'red'}
{value: 'green', label: 'Green', type: 'point', color: ... | Fix text in demo workflow | Fix text in demo workflow | CoffeeScript | apache-2.0 | mrniaboc/Panoptes-Front-End,marten/Panoptes-Front-End,edpaget/Panoptes-Front-End,edpaget/Panoptes-Front-End,alexbfree/Panoptes-Front-End,mrniaboc/Panoptes-Front-End,edpaget/Panoptes-Front-End,jelliotartz/Panoptes-Front-End,parrish/Panoptes-Front-End,amyrebecca/Panoptes-Front-End,amyrebecca/Panoptes-Front-End,mrniaboc/P... |
062d426ac1e5463f0ff2ea36af6c25878ff6d784 | app/scripts/app.js.coffee | app/scripts/app.js.coffee | define ['controllers/main_controller', 'jquery', 'websocket_rails', 'underscore', 'backbone', 'marionette'], (MainController, $) ->
# Create the single page application
App = new Backbone.Marionette.Application();
App.addInitializer ->
# Get websocket connection info
connection_params = {}
$.get('web... | define ['controllers/main_controller', 'jquery', 'websocket_rails', 'underscore', 'backbone', 'marionette'], (MainController, $) ->
# Create the single page application
App = new Backbone.Marionette.Application();
App.addInitializer ->
# Get websocket connection info
connection_params = {}
$.get('ws/... | Fix controller name for the ws connection params | [Front] Fix controller name for the ws connection params
| CoffeeScript | mit | paulRbr/block,paulRbr/block,paulRbr/block |
1637f4d2983dc4474dd79f21737d924307437eb8 | src/adapters/shell.coffee | src/adapters/shell.coffee | Readline = require 'readline'
Robot = require '../robot'
Adapter = require '../adapter'
class Shell extends Adapter
constructor: (robot) ->
super robot
@repl = null
send: (user, strings...) ->
console.log str for str in strings
@repl.prompt()
reply: (user, strings...) ->
@send user, st... | Readline = require 'readline'
Robot = require '../robot'
Adapter = require '../adapter'
class Shell extends Adapter
send: (user, strings...) ->
unless process.platform is "win32"
console.log "\033[01;32m#{str}\033[0m" for str in strings
else
console.log "#{str}" for str in strings
@repl.... | Update repl prompt to work with async requests | Update repl prompt to work with async requests
| CoffeeScript | mit | lisb/hubot,jasonrhodes/botzero,decaffeinate-examples/hubot,craig5/hubot,krahman/hubot,ToriTomyuTomyu/nothing-yet,rileytg/chenbot,pchaigno/hubot,rlugojr/hubot,minted/hubot,imkmf/bhamruby-hubot,iDTLabssl/hubot,rmdelo/appboy-hubot,Arthraim/merlin,yujiroarai/hws-hubot,eetuuuu/hubot,mcifani/dog-yoda,RiddickSky/hubot,leohmor... |
1d129eb770a68f68502fbf5c8ed2f3e7acad3a97 | src/compiler-flags.coffee | src/compiler-flags.coffee | module.exports = FLAGS =
oF: '-Ofast'
oS: '-Os'
o3: ['-O3', '-march=native']
o2: '-O2'
o1: '-O1'
o0: '-O0'
g: '-g'
pg: '-pg'
s: '-static'
ni: '-fno-inline'
pca: ['-O3', '-march=native', '-mfpmath=sse', '-ffloat-store', '-Wl,-s,-O1', '-lm']
ALIAS =
0: 'o0'
1: 'o1'
... | module.exports = FLAGS =
oF: ['-Ofast', '-march=native']
oS: '-Os'
o3: ['-O3', '-march=native']
o2: '-O2'
o1: '-O1'
o0: '-O0'
g: '-g'
pg: '-pg'
s: '-static'
ni: '-fno-inline'
pca: ['-O3', '-march=native', '-mfpmath=sse', '-ffloat-store', '-Wl,-s,-O1', '-lm']
ALIAS =
0:... | Add march=native flag to OFast | Add march=native flag to OFast
| CoffeeScript | mit | albertsgrc/optim |
9a259a77ef2401017c1c5e8cba6e31e75876269e | app/assets/javascripts/components/question_component.js.coffee | app/assets/javascripts/components/question_component.js.coffee | ETahi.QuestionComponent = Ember.Component.extend
tagName: 'div'
helpText: null
displayContent: false
model: (->
ident = @get('ident')
throw "you must specify an ident" unless ident
question = @get('task.questions').findProperty('ident', ident)
unless question
task = @get('task')
q... | ETahi.QuestionComponent = Ember.Component.extend
tagName: 'div'
helpText: null
displayContent: false
model: (->
ident = @get('ident')
throw "you must specify an ident" unless ident
question = @get('task.questions').findProperty('ident', ident)
unless question
task = @get('task')
q... | Fix question debounce bug that john already fixed. | Fix question debounce bug that john already fixed.
| CoffeeScript | mit | johan--/tahi,johan--/tahi,johan--/tahi,johan--/tahi |
a0c53df79c1b13517a798daa9c728d230b3105a9 | atom/config.cson | atom/config.cson | "*":
autoprefixer: {}
core:
themes: [
"one-dark-ui"
"cobalt2-syntax"
]
editor:
fontFamily: "Menlo"
fontSize: 15
invisibles:
cr: " "
eol: " "
tab: "⇨"
preferredLineLength: 120
showInvisibles: true
softWrap: true
softWrapAtPreferredLineLength: true
... | "*":
autoprefixer: {}
core:
themes: [
"one-dark-ui"
"cobalt2-syntax"
]
editor:
fontFamily: "Menlo"
fontSize: 15
invisibles:
cr: " "
eol: " "
tab: "⇨"
preferredLineLength: 120
showInvisibles: true
softWrap: true
softWrapAtPreferredLineLength: true
... | Hide error panel for linter | atom: Hide error panel for linter
| CoffeeScript | mit | jocelynjeffrey/mydotfiles,nicksp/dotfiles,nicksp/dotfiles,jocelynjeffrey/mydotfiles,nicksp/dotfiles,jocelynjeffrey/mydotfiles,nicksp/dotfiles |
97932b6ab70a57dd3ed6aa95ac3a222f8163b412 | lib/main.coffee | lib/main.coffee | fs = require "fs"
path = require "path"
Coffee = require "coffee-script"
Q = require "q"
Jsdom = require "jsdom"
MARKBACK_FILE = path.join(__dirname, '../build/markback.js')
readMarkback = Q.nfcall(fs.readFile, MARKBACK_FILE).then (file) ->
Q.fcall -> file.toString('utf-8')
convertHtml = (html) ->
readMarkback.t... | fs = require "fs"
path = require "path"
Coffee = require "coffee-script"
Q = require "q"
Jsdom = require "jsdom"
MARKBACK_FILE = path.join(__dirname, '../build/markback.js')
readMarkback = Q.nfcall(fs.readFile, MARKBACK_FILE).then (file) ->
Q.fcall -> file.toString('utf-8')
convertHtml = (html, callback = ->) ->
... | Handle callbacks as well as promises | Handle callbacks as well as promises
| CoffeeScript | mit | demands/markback |
a079ed7a5cd860613c674672427a457648969fa8 | config/grunt/karma.coffee | config/grunt/karma.coffee | _ = require('lodash')
browsers = require('../browsers')
remoteReporters = ['dots']
remoteReporters.push('saucelabs') if process.env.TRAVIS_BRANCH == 'master'
remoteKarma = _.reduce(browsers, (memo, config, browser) ->
memo[browser] =
browsers: [browser]
browserDisconnectTimeout: 10000
browserDisconnect... | _ = require('lodash')
browsers = require('../browsers')
remoteReporters = ['dots']
remoteReporters.push('saucelabs') if process.env.TRAVIS_BRANCH == 'master'
remoteKarma = _.reduce(browsers, (memo, config, browser) ->
memo[browser] =
browsers: [browser]
browserDisconnectTimeout: 10000
browserDisconnect... | Switch default browser to Chrome until Phantom 2.0 | Switch default browser to Chrome until Phantom 2.0
Current version does not have function.bind
| CoffeeScript | bsd-3-clause | willrowe/quill,voxmedia/quill,casetext/quill,sferoze/quilljs,dahal/quill,DemocracyOS/quill,KentZheng/testingflow,willrowe/quill,smartsocialmedia/quill,voxmedia/quill,Asana/quill-1,willrowe/quill,KentZheng/gitFlowTIB,sferoze/quilljs,KentZheng/gitFlowTIA,KentZheng/testingflow,tim-mc/quill,eXcomm/quill,kmoe/quill,praneybe... |
10a870650a735f6cac63961ff1e0d45a4539adc8 | brunch-config.coffee | brunch-config.coffee | # noop.pw
moment = require 'moment'
{renderVita} = require './demi'
global.vita = renderVita './riptide/vita.yaml'
global._now = moment()
global.DEBUG = '-p' not in global.process.argv
module.exports = config:
paths:
watched: ['riptide']
plugins:
autoReload:
enabled: yes
coffeelint:
patter... | # noop.pw
moment = require 'moment'
{renderVita} = require './demi'
global.vita = renderVita './riptide/vita.yaml'
global._now = moment()
global.DEBUG = '-p' not in global.process.argv
module.exports = config:
paths:
watched: ['riptide']
plugins:
autoReload:
enabled: yes
coffeelint:
patter... | Update brunch to also include normalize.css in build | Update brunch to also include normalize.css in build
| CoffeeScript | mit | PrashntS/PrashntS.github.io,PrashntS/PrashntS.github.io |
b57eef6dbc27ebfdaa4c8cca91c4b007124f4e4a | src/app/keymaps/command-panel.coffee | src/app/keymaps/command-panel.coffee | window.keymap.bindKeys '*'
'meta-:': 'command-panel:toggle'
window.keymap.bindKeys '.command-panel .editor',
escape: 'command-panel:toggle'
enter: 'command-panel:execute'
window.keymap.bindKeys '.editor',
'meta-g': 'command-panel:repeat-relative-address'
'meta-e': 'command-panel:set-selection-as-regex-addre... | window.keymap.bindKeys '*'
'meta-:': 'command-panel:toggle'
window.keymap.bindKeys '.command-panel .editor',
escape: 'command-panel:toggle'
enter: 'command-panel:execute'
window.keymap.bindKeys '.editor',
'meta-g': 'command-panel:repeat-relative-address'
'meta-G': 'command-panel:repeat-relative-address-in-r... | Implement meta-G (redo search in reverse) | Implement meta-G (redo search in reverse) | CoffeeScript | mit | paulcbetts/atom,bryonwinger/atom,AdrianVovk/substance-ide,ali/atom,nvoron23/atom,codex8/atom,fang-yufeng/atom,Abdillah/atom,stuartquin/atom,CraZySacX/atom,Ju2ender/atom,nrodriguez13/atom,acontreras89/atom,kandros/atom,dijs/atom,paulcbetts/atom,davideg/atom,Ingramz/atom,hagb4rd/atom,scv119/atom,rmartin/atom,gzzhanghao/a... |
d30e183edbbad4a56e0ee9a3d6c62cbb00efabed | benchmark/benchmark-suite.coffee | benchmark/benchmark-suite.coffee | Buffer = require 'buffer'
fs = require 'fs'
require 'benchmark-helper'
describe "Editor", ->
editor = null
beforeEach ->
window.rootViewParentSelector = '#jasmine-content'
window.startup()
editor = rootView.editor
afterEach ->
window.shutdown()
benchmark "inserting and deleting a character i... | Buffer = require 'buffer'
fs = require 'fs'
require 'benchmark-helper'
describe "Editor", ->
editor = null
beforeEach ->
window.rootViewParentSelector = '#jasmine-content'
window.startup()
editor = rootView.editor
afterEach ->
window.shutdown()
benchmark "inserting and deleting a character i... | Add benchmark for inserting at the end of a file | Add benchmark for inserting at the end of a file | CoffeeScript | mit | palita01/atom,CraZySacX/atom,MjAbuz/atom,RobinTec/atom,lovesnow/atom,kittens/atom,charleswhchan/atom,dsandstrom/atom,elkingtonmcb/atom,tjkr/atom,fscherwi/atom,dijs/atom,Rodjana/atom,tmunro/atom,john-kelly/atom,crazyquark/atom,n-riesco/atom,lpommers/atom,DiogoXRP/atom,ObviouslyGreen/atom,crazyquark/atom,NunoEdgarGub1/at... |
c0c694962942e5676b940d7af87c41b3eabe60a4 | app/assets/javascripts/rating.js.coffee | app/assets/javascripts/rating.js.coffee | $('.rating').raty
path: '/assets'
score: ->
$(this).attr('data-score')
click: (score, _) ->
$.ajax
type: 'post',
url: $(this).attr('data-uri'),
data:
picture:
score: score
$(this).find('img').unbind('click')
| $('.rating').raty
path: '/assets'
score: ->
$(this).attr('data-score')
click: (score, _) ->
self = $(this)
url = self.attr('data-uri')
self.find('img').unbind('click')
$.ajax
type: 'post'
url: url
data:
picture:
score: score
success: ->
$.aj... | Update score and deactivate rating properly. | Update score and deactivate rating properly.
| CoffeeScript | agpl-3.0 | nning/imgshr,nning/imgshr,nning/imgshr,nning/imgshr |
369114187a6371d87d1bef8eb51d1c59e7344ac0 | lib/rubymotion.coffee | lib/rubymotion.coffee | _ = require 'underscore-plus'
RubyMotionAutocompleteView = require './rubymotion-autocomplete-view'
module.exports =
autocompleteViews: []
editorSubscription: null
snippetPrefixes: []
activate: (state) ->
@editorSubscription = atom.workspaceView.eachEditorView (editor) =>
if editor.attached and not ... | _ = require 'underscore-plus'
RubyMotionAutocompleteView = require './rubymotion-autocomplete-view'
Snippet = require(atom.packages.resolvePackagePath('snippets') + '/lib/snippet')
Snippets = require(atom.packages.resolvePackagePath('snippets') + '/lib/snippets')
module.exports =
autocompleteViews: []
editorSubscr... | Load snippets for cocoatouch after loading | Load snippets for cocoatouch after loading
| CoffeeScript | mit | iOSBeginner/atom-rubymotion,satococoa/atom-rubymotion |
6643ed221215e7777347f7a71000f731c636012b | spec/javascripts/tabs_spec.js.coffee | spec/javascripts/tabs_spec.js.coffee | describe "tabs", ->
beforeEach ->
# run all Blacklight.onload functions
Blacklight.activate()
describe "dashboard tabs", ->
beforeEach ->
# setup the tabs like the homepage featured and recent tabs
setFixtures '<ul id="homeTabs" class="nav nav-tabs">
<li><a hr... | describe "tabs", ->
beforeEach ->
# run all Blacklight.onload functions
Blacklight.activate()
describe "dashboard tabs", ->
beforeEach ->
# setup the tabs like the homepage featured and recent tabs
setFixtures '<ul id="homeTabs" class="nav nav-tabs">
<li><a hr... | Fix selector in tabs spec | Fix selector in tabs spec
| CoffeeScript | apache-2.0 | samvera/hyrax,samvera/hyrax,samvera/hyrax,samvera/hyrax |
9e4325d8b2487e1801170082afd6896973fd1dd9 | src/extensions/outline-view/src/tag-generator.coffee | src/extensions/outline-view/src/tag-generator.coffee | Point = require 'point'
ChildProcess = require 'child-process'
module.exports =
class TagGenerator
constructor: (@path, @callback) ->
parsePrefix: (section = "") ->
if section.indexOf('class:') is 0
section.substring(6)
else if section.indexOf('namespace:') is 0
section.substring(10)
else... | Point = require 'point'
ChildProcess = require 'child-process'
module.exports =
class TagGenerator
constructor: (@path, @callback) ->
parsePrefix: (section = "") ->
if section.indexOf('class:') is 0
section.substring(6)
else if section.indexOf('namespace:') is 0
section.substring(10)
else... | Trim struct: prefix in display output | Trim struct: prefix in display output
| CoffeeScript | mit | nucked/atom,stuartquin/atom,kittens/atom,woss/atom,AdrianVovk/substance-ide,efatsi/atom,Dennis1978/atom,davideg/atom,daxlab/atom,nrodriguez13/atom,dsandstrom/atom,Galactix/atom,Klozz/atom,omarhuanca/atom,hakatashi/atom,acontreras89/atom,mostafaeweda/atom,elkingtonmcb/atom,vinodpanicker/atom,kevinrenaers/atom,rsvip/aTom... |
f06f43804432465fc8a86ec628d07b66bda8d9c1 | app/assets/javascripts/calendar.js.coffee | app/assets/javascripts/calendar.js.coffee | class @Calendar
options =
month: "short"
day: "numeric"
year: "numeric"
constructor: (timestamps, starting_year, starting_month, calendar_activities_path) ->
cal = new CalHeatMap()
cal.init
itemName: ["contribution"]
data: timestamps
start: new Date(starting_year, starting_mon... | class @Calendar
options =
month: "short"
day: "numeric"
year: "numeric"
constructor: (timestamps, starting_year, starting_month, calendar_activities_path) ->
cal = new CalHeatMap()
cal.init
itemName: ["contribution"]
data: timestamps
start: new Date(starting_year, starting_mon... | Make commit calendar size depend on window size | Make commit calendar size depend on window size
Signed-off-by: Dmitriy Zaporozhets <be23d75b156792e5acab51b196a2deb155d35d6a@gmail.com>
| CoffeeScript | mit | eliasp/gitlabhq,jvanbaarsen/gitlabhq,dreampet/gitlab,fpgentil/gitlabhq,bozaro/gitlabhq,Datacom/gitlabhq,lvfeng1130/gitlabhq,Datacom/gitlabhq,ferdinandrosario/gitlabhq,jvanbaarsen/gitlabhq,mmkassem/gitlabhq,tk23/gitlabhq,screenpages/gitlabhq,Datacom/gitlabhq,OlegGirko/gitlab-ce,DanielZhangQingLong/gitlabhq,TheWatcher/gi... |
adb1da0a95c2928ac07b4a1aac8c60fa58558228 | src/web/model/book.coffee | src/web/model/book.coffee | Q = require('q')
mongoose = require('mongoose')
log = require("#{__dirname}/../../log")
retrieve = require("#{__dirname}/../../retrieve")
Schema = mongoose.Schema
ObjectId = Schema.Types.ObjectId
BookSchema = new Schema
isbn:
type: String
index:
unique: true
required: true
trim: true
title... | Q = require('q')
mongoose = require('mongoose')
log = require("#{__dirname}/../../log")
retrieve = require("#{__dirname}/../../retrieve")
Schema = mongoose.Schema
ObjectId = Schema.Types.ObjectId
BookSchema = new Schema
isbn:
type: String
index:
unique: true
required: true
trim: true
title... | Fix Update Book Without Author | Fix Update Book Without Author | CoffeeScript | mit | killercup/atric |
7c45517411d708851f1a00c193a8d5802929052b | bokehjs/src/coffee/models/transforms/jitter.coffee | bokehjs/src/coffee/models/transforms/jitter.coffee | _ = require "underscore"
Transform = require "./transform"
class Jitter extends Transform.Model
initialize: (attrs, options) ->
super(attrs, options)
defaults: ->
return _.extend({}, super(), {
interval: 1
})
compute: (x) ->
# Apply the transform to a single value
return(x + ((Math.ra... | _ = require "underscore"
Transform = require "./transform"
class Jitter extends Transform.Model
initialize: (attrs, options) ->
super(attrs, options)
defaults: ->
return _.extend {}, super(), {
interval: [ p.Number, 1]
}
compute: (x) ->
# Apply the transform to a single value
return(x... | Convert to using newer property initializers in the JS for Jitter | Convert to using newer property initializers in the JS for Jitter
| CoffeeScript | bsd-3-clause | bokeh/bokeh,draperjames/bokeh,dennisobrien/bokeh,aiguofer/bokeh,azjps/bokeh,schoolie/bokeh,timsnyder/bokeh,rs2/bokeh,justacec/bokeh,aavanian/bokeh,ericmjl/bokeh,jakirkham/bokeh,timsnyder/bokeh,clairetang6/bokeh,bokeh/bokeh,mindriot101/bokeh,ericmjl/bokeh,draperjames/bokeh,DuCorey/bokeh,ptitjano/bokeh,aavanian/bokeh,jak... |
dbb93b86dd7f9ebd3e424413487662008e9e3116 | core/app/backbone/models/comment.coffee | core/app/backbone/models/comment.coffee | class window.Comment extends Backbone.Model
templateHelpers: =>
creator: @creator
creator: -> new User(@get('created_by'))
can_destroy: -> @creator().get('id') == currentUser.get('id')
| class window.Comment extends Backbone.Model
templateHelpers: =>
creator: @creator
creator: -> new User(@get('created_by')).toJSON()
can_destroy: -> @creator().get('id') == currentUser.get('id')
| Create JSON of creator in Comment templateHelper | Create JSON of creator in Comment templateHelper
| CoffeeScript | mit | Factlink/factlink-core,Factlink/factlink-core,Factlink/factlink-core,Factlink/factlink-core,daukantas/factlink-core,daukantas/factlink-core,daukantas/factlink-core,daukantas/factlink-core |
61a58785c63cd6d6e2dd422a5ca22930579dac36 | components/Cache.coffee | components/Cache.coffee | noflo = require "noflo"
_s = require "underscore.string"
{ CacheStorage } = require "../lib/cache_storage"
class Cache extends noflo.Component
description: _s.clean "save incoming IPs and send the saved IPs to
port 'out' upon any data IP from 'ready'"
constructor: ->
@key = null
@cache = new CacheStora... | noflo = require "noflo"
_s = require "underscore.string"
{ CacheStorage } = require "../lib/cache_storage"
class Cache extends noflo.Component
description: _s.clean "save incoming IPs and send the saved IPs to
port 'out' upon any data IP from 'ready'"
constructor: ->
@key = null
@cache = new CacheStora... | Use ArrayPort to allow keying for 'in' and 'ready' | Use ArrayPort to allow keying for 'in' and 'ready'
| CoffeeScript | mit | meticulo3366/noflo-flow |
4f49606d237bea7e9c9664d65bd82bdd75743658 | app/coffeescripts/StudentInCourse/ParticipationData.coffee | app/coffeescripts/StudentInCourse/ParticipationData.coffee | define [
'analytics/compiled/BaseData'
'timezone'
], (BaseData, tz) ->
##
# Loads the participation data for the student and course. Exposes the data
# as the 'pageViews' and 'participations' properties once loaded.
class ParticipationData extends BaseData
constructor: (student) ->
course = stude... | define [
'analytics/compiled/BaseData'
'timezone'
], (BaseData, tz) ->
##
# Loads the participation data for the student and course. Exposes the data
# as the 'pageViews' and 'participations' properties once loaded.
class ParticipationData extends BaseData
constructor: (student) ->
course = stude... | Fix merging of participation and page views | Fix merging of participation and page views
the binning of page views and participation from the api into dates is
fixed.
closes ADMIN-1299
note: there was a change in this file from binning by day -> hour to fix
a bug that looks like was a timezone issue. See CNVS-16464 and
https://gerrit.instructure.com/#/c/44111/... | CoffeeScript | agpl-3.0 | instructure/analytics,instructure/analytics,instructure/analytics |
daf958b7d0e49b1a4c0a9f68ab12e33173d815fe | lib/file-view.coffee | lib/file-view.coffee | {View} = require 'space-pen'
$ = require 'jquery'
Git = require 'git'
fs = require 'fs'
module.exports =
class FileView extends View
@content: ({file} = {}) ->
@li class: 'file entry', =>
@span file.getBaseName(), class: 'name', outlet: 'fileName'
@span '', class: 'highlight'
file: null
initia... | {View} = require 'space-pen'
$ = require 'jquery'
Git = require 'git'
fs = require 'fs'
module.exports =
class FileView extends View
@content: ({file} = {}) ->
@li class: 'file entry', =>
@span file.getBaseName(), class: 'name', outlet: 'fileName'
@span '', class: 'highlight'
file: null
initia... | Use subscribe instead of on | Use subscribe instead of on
| CoffeeScript | mit | ayumi/tree-view,matthewbauer/tree-view,tbryant/tree-view,learn-co/learn-ide-tree,thgaskell/tree-view,samu/tree-view,jarig/tree-view,jasonhinkle/tree-view,laituan245/tree-view,cgrabowski/webgl-studio-tree-view,tomekwi/tree-view,rajendrant/tree-view-remote,benjaminRomano/tree-view,Galactix/tree-view,atom/tree-view,ALEXGU... |
1cf5bc51b42c8b5f521cbb41f3e414ad9879896b | lib/index.coffee | lib/index.coffee | class EyeTribe
@Tracker = require('./tracker')
@version = require('./version')
@loop = (config, callback)->
if typeof config == 'function'
[callback, config] = [config, {}]
@loopTracker = new @Tracker config
.loop callback
module.exports = EyeTribe
| class EyeTribe
@Tracker = require('./tracker')
@version = require('./version')
@Protocol = require('./protocol')
@GazeData = require('./gazedata')
@Point2D = require('./point2d')
@_ = require('underscore')
@loop = (config, callback)->
if typeof config == 'function'
[callback, config] = [config,... | Add references to internal modules as member variables of class EyeTribe | Add references to internal modules as member variables of class EyeTribe
| CoffeeScript | mit | kzokm/eyetribe-websocket |
b2cd042e22672508b76d70689673f9e25b75401e | lib/utils.coffee | lib/utils.coffee |
module.exports.pad = (n, size) ->
n = n.toString()
pad = ''
size = size - n.length
for i in [0 .. size]
pad += ' '
n + pad
module.exports.flatten = (arr, ret) ->
ret ?= []
len = arr.length
for i in [0 .. len]
if Array.isArray arr[i]
exports.flatten arr[i], ret
else
... |
path = require 'path'
module.exports =
pad: (n, size) ->
n = n.toString()
pad = ''
size = size - n.length
for i in [0 .. size]
pad += ' '
n + pad
flatten: (arr, ret) ->
ret ?= []
for i in [0 ... arr.length]
if Array.isArray arr[i]... | Fix flatten function (bug introduce by coffee migration) | Fix flatten function (bug introduce by coffee migration) | CoffeeScript | bsd-3-clause | wdavidw/node-shell |
6dfc5c7d45d26d25ff9a308e944228edf8842c84 | components/RunTests.coffee | components/RunTests.coffee | noflo = require 'noflo'
fbpSpec = require 'fbp-spec'
exports.getComponent = ->
c = new noflo.Component
c.inPorts.add 'in',
datatype: 'object'
description: 'Project'
c.inPorts.add 'runtime',
datatype: 'object'
required: yes
c.outPorts.add 'context',
datatype: 'object'
c.outPorts.add 'error... | noflo = require 'noflo'
fbpSpec = require 'fbp-spec'
exports.getComponent = ->
c = new noflo.Component
c.inPorts.add 'in',
datatype: 'object'
description: 'Project'
c.inPorts.add 'runtime',
datatype: 'object'
required: yes
c.outPorts.add 'context',
datatype: 'object'
c.outPorts.add 'error... | Deal with YAML parse errors | Deal with YAML parse errors
| CoffeeScript | mit | noflo/noflo-ui,oportocala/noflo-ui,noflo/noflo-ui,lxfschr/noflo-ui,rdf-pipeline/noflo-server,lxfschr/noflo-ui,rasata/noflo-ui,rasata/noflo-ui,oportocala/noflo-ui,rdf-pipeline/noflo-server |
5d8c28feb4ec2939243002c6d4b83d8eee8d50ab | backend/app/assets/javascripts/spree/backend/store_credits.js.coffee | backend/app/assets/javascripts/spree/backend/store_credits.js.coffee | $(document).ready ->
return unless $('#sc_memo_edit_form').length > 0
$('.js-edit-memo').on('click', (ev) =>
ev.preventDefault()
originalValue = $('#memo-edit-row').data('original-value')
$('#sc_memo_edit_form').find("[name='store_credit[memo]']").val(originalValue)
$('#memo-display-row').addClass(... | $(document).ready ->
return unless $('#sc_memo_edit_form').length > 0
$('.js-edit-memo').on('click', (ev) =>
ev.preventDefault()
originalValue = $('#memo-edit-row').data('original-value')
$('#sc_memo_edit_form').find("[name='store_credit[memo]']").val(originalValue)
$('#memo-display-row').addClass(... | Switch to Spree.ajax & success / error callbacks | Switch to Spree.ajax & success / error callbacks
| CoffeeScript | bsd-3-clause | devilcoders/solidus,jsurdilla/solidus,bonobos/solidus,bonobos/solidus,bonobos/solidus,pervino/solidus,Arpsara/solidus,xuewenfei/solidus,pervino/solidus,richardnuno/solidus,Arpsara/solidus,forkata/solidus,jordan-brough/solidus,lsirivong/solidus,pervino/solidus,scottcrawford03/solidus,grzlus/solidus,scottcrawford03/solid... |
648c66899ca55ece664a36f99de59b6c47c35009 | assets/javascripts/routers/posts.js.coffee | assets/javascripts/routers/posts.js.coffee | TentStatus.Routers.posts = new class PostsRouter extends TentStatus.Router
routerKey: 'posts'
routes:
"" : "root"
"profile" : "myProfile"
"posts" : "index"
"posts/:entity/:post_id" : "conversation"
"posts/:post_id" : "conversation"
index: =>
unless Ten... | TentStatus.Routers.posts = new class PostsRouter extends TentStatus.Router
routerKey: 'posts'
routes:
"" : "root"
"profile" : "myProfile"
"posts" : "index"
"posts/:entity/:post_id" : "conversation"
"posts/:post_id" : "conversation"
index: =>
if !TentSt... | Fix home page when not logged in | Fix home page when not logged in
| CoffeeScript | bsd-3-clause | tent/tent-status,tent/tent-status |
81c2fe110ba3148c10df3246bec06f48414626b7 | spec/link-spec.coffee | spec/link-spec.coffee | {RootView} = require 'atom'
shell = require 'shell'
describe "link package", ->
[editor] = []
beforeEach ->
atom.activatePackage('javascript-tmbundle', sync: true)
atom.activatePackage('hyperlink-helper-tmbundle', sync: true)
window.rootView = new RootView
rootView.openSync('sample.js')
atom.a... | {RootView} = require 'atom'
shell = require 'shell'
describe "link package", ->
[editor] = []
beforeEach ->
atom.activatePackage('language-javascript', sync: true)
atom.activatePackage('language-hyperlink', sync: true)
window.rootView = new RootView
rootView.openSync('sample.js')
atom.activate... | Update packages for new naming scheme | Update packages for new naming scheme
| CoffeeScript | mit | atom/link |
840ec773fa65f2ab2fe99be90c0bfea8c776cab2 | src/entities/toast.coffee | src/entities/toast.coffee | game.ToastEntity = me.ObjectEntity.extend(
init: (x, y, settings) ->
settings.image = 'toast'
settings.spritewidth = '12'
settings.spriteheight = '12'
@parent x, y, settings
@maxVelocity = 5
@gravity = 0
targetVector = new me.Vector2d(settings.target.x - x, settings.target.y - y)
... | game.ToastEntity = me.ObjectEntity.extend(
init: (x, y, settings) ->
settings.image = 'toast'
settings.spritewidth = '12'
settings.spriteheight = '12'
@parent x, y, settings
@maxVelocity = 5
@gravity = 0
targetVector = new me.Vector2d(settings.target.x - x, settings.target.y - y)
... | Remove bullets when collide with env. | Remove bullets when collide with env.
| CoffeeScript | mit | goozzik/btk |
82aa7c30a68b4821b09b315ec5f3e13737998b07 | services/web/public/coffee/ide/editor/directives/toggleSwitch.coffee | services/web/public/coffee/ide/editor/directives/toggleSwitch.coffee | define [
"base"
], (App) ->
App.directive "toggleSwitch", () ->
restrict: "E"
scope:
description: "@"
labelFalse: "@"
labelTrue: "@"
ngModel: "="
template: """
<fieldset class="toggle-switch">
<legend class="sr-only">{{description}}</legend>
<input
type="radio"
... | define [
"base"
], (App) ->
App.directive "toggleSwitch", () ->
restrict: "E"
scope:
description: "@"
labelFalse: "@"
labelTrue: "@"
ngModel: "="
template: """
<fieldset class="toggle-switch">
<legend class="sr-only">{{description}}</legend>
<input
type="radio"
... | Make sure each pair of radio buttons gets a unique name attribute in the toggle switch directive. | Make sure each pair of radio buttons gets a unique name attribute in the toggle switch directive.
| CoffeeScript | agpl-3.0 | sharelatex/sharelatex |
a7a52f7d24722416668fabe19c1b0e70af68db41 | 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
user_list = @props.users.map (user) ->
if user.real_name?
"#{user.real_name} (#{user.wiki_i... | React = require 'react'
EnrollButton = require '../students/enroll_button'
InlineUsers = React.createClass(
displayName: 'InlineUsers'
render: ->
key = @props.title + '_' + @props.role
user_list = @props.users.map (user) ->
link = "https://en.wikipedia.org/wiki/User:#{user.wiki_id}"
... | Make each username in InlineUsers link to the userpage | Make each username in InlineUsers link to the userpage
| CoffeeScript | mit | WikiEducationFoundation/WikiEduDashboard,ragesoss/WikiEduDashboard,feelfreelinux/WikiEduDashboard,majakomel/WikiEduDashboard,feelfreelinux/WikiEduDashboard,majakomel/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,WinnySilva/Wik... |
54873530cf823bd733d359d26a48fba7e57791fa | test/models/indicator.coffee | test/models/indicator.coffee | assert = require('chai').assert
_ = require('underscore')
sinon = require('sinon')
Indicator = require('../../models/indicator')
fs = require 'fs'
suite('Indicator')
test(".find reads the definition from definitions/indicators.json
and returns an indicator with the correct attributes for that ID", (done)->
definiti... | assert = require('chai').assert
_ = require('underscore')
sinon = require('sinon')
Indicator = require('../../models/indicator')
fs = require 'fs'
suite('Indicator')
test(".find reads the definition from definitions/indicators.json
and returns an indicator with the correct attributes for that ID", (done)->
definiti... | Add tests for new get/format data methods | Add tests for new get/format data methods
| CoffeeScript | bsd-3-clause | unepwcmc/NRT,unepwcmc/NRT |
b7527d4b9ee72b8d0a9bd068b671cef78acd7db8 | lib/resource-combiner.coffee | lib/resource-combiner.coffee | resourceRequest = require './resource-request.coffee'
virtual = require './virtual-resource.coffee'
resources = {}
# TODO : Implement cache invalidation on a periodic basis here
exports.combine = ({resources, req, separator, contentType, prefix}) ->
id = resources.length + (resources.href for resource in resources)... | resourceRequest = require './resource-request.coffee'
virtual = require './virtual-resource.coffee'
resources = {}
# TODO : Implement cache invalidation on a periodic basis here
exports.combine = ({resources, req, separator, contentType, prefix}) ->
id = resources.length + (resource.href for resource in resources).... | Fix id generation within the resource combiner | Fix id generation within the resource combiner | CoffeeScript | bsd-3-clause | setdirection/node-performer |
da4049c7c24fdda93a422942c542f46aaf6ca27e | scripts/govuk_app_owners.coffee | scripts/govuk_app_owners.coffee | # This script teaches Hubot to answer questions like "Who owns Collections Publisher?"
# and "Who owns publishing-api?"
module.exports = (robot) ->
robot.hear /who owns (.*)\?/i, (res) ->
# Best guess of the intended application.
application = res.match[1].replace(/\s/g, '-').toLowerCase()
console.log("Fe... | # This script teaches Hubot to answer questions like "Who owns Collections Publisher?"
# and "Who owns publishing-api?"
module.exports = (robot) ->
robot.hear /who owns (.*)\?/i, (res) ->
# Best guess of the intended application.
application = res.match[1].replace(/\s/g, '-').toLowerCase()
console.log("Fe... | Update product ownership to refer to Product Manager | Update product ownership to refer to Product Manager
The current state of affairs is that products are owned by product owners, and products follow them when they change team.
The team information still seems useful so we leave it in.
| CoffeeScript | mit | alphagov/gds-hubot |
7d5f4770902323d6a0c2069b3dd4f7553796ce8b | spec/spec_helper.coffee | spec/spec_helper.coffee | exports.app = app = require('../config/app').app
exports.vows = require 'vows'
exports.assert = require 'assert'
exports.should = require 'should'
exports.zombie = require 'zombie'
exports.zombie.browser = new exports.zombie.Browser
debug: false
runScripts: false
exports.tobi = r... | exports.app = app = require('../config/app').app
exports.vows = require 'vows'
exports.assert = require 'assert'
exports.should = require 'should'
exports.zombie = require 'zombie'
exports.zombie.browser = new exports.zombie.Browser
debug: false
runScripts: false
exports.tobi = r... | Make syntax more coffee like. | Make syntax more coffee like.
| CoffeeScript | mit | drip/drip |
4e7dd48fca92b3889eb871dee0481b87dd97f903 | spec/keybinding-resolver-view-spec.coffee | spec/keybinding-resolver-view-spec.coffee | KeybindingResolverView = require '../lib/keybinding-resolver-view'
{$, RootView} = require 'atom'
describe "KeybindingResolverView", ->
beforeEach ->
atom.rootView = new RootView
atom.packages.activatePackage('keybinding-resolver', immediate: true)
describe "when the keybinding-resolver:toggle event is tr... | KeybindingResolverView = require '../lib/keybinding-resolver-view'
{$, RootView} = require 'atom'
describe "KeybindingResolverView", ->
beforeEach ->
atom.rootView = new RootView
atom.packages.activatePackage('keybinding-resolver', immediate: true)
describe "when the keybinding-resolver:toggle event is tr... | Use atom.rootView as target value | Use atom.rootView as target value | CoffeeScript | mit | atom/keybinding-resolver |
b04f9f9488528dc53303f8b9977c666c49822ef9 | src/pane-axis.coffee | src/pane-axis.coffee | {View} = require './space-pen-extensions'
Pane = null
### Internal ###
module.exports =
class PaneAxis extends View
initialize: (@model) ->
@onChildAdded(child) for child in @model.children
@subscribe @model.children, 'changed', @onChildrenChanged
viewForModel: (model) ->
viewClass = model.getViewClas... | {View} = require './space-pen-extensions'
Pane = null
### Internal ###
module.exports =
class PaneAxis extends View
initialize: (@model) ->
@onChildAdded(child) for child in @model.children
@subscribe @model.children, 'changed', @onChildrenChanged
viewForModel: (model) ->
viewClass = model.getViewClas... | Remove unused methods from PaneAxis | Remove unused methods from PaneAxis | CoffeeScript | mit | alexandergmann/atom,liuxiong332/atom,basarat/atom,001szymon/atom,johnrizzo1/atom,batjko/atom,bolinfest/atom,kjav/atom,RobinTec/atom,daxlab/atom,folpindo/atom,hpham04/atom,NunoEdgarGub1/atom,amine7536/atom,kjav/atom,jjz/atom,vjeux/atom,gontadu/atom,prembasumatary/atom,ObviouslyGreen/atom,nvoron23/atom,devmario/atom,dann... |
3cb380f01402f63fe47e3d747b60b3eab8a96056 | src/namespace.coffee | src/namespace.coffee | # The global namespace, the `Batman` function will also create also create a new
# instance of Batman.Object and mixin all arguments to it.
Batman = (mixins...) ->
new Batman.Object(mixins...)
Batman.version = '0.14.1'
Batman.config =
pathToApp: '/'
usePushState: true
pathToHTML: 'html'
fetchRemoteHTML: tr... | # The global namespace, the `Batman` function will also create a new
# instance of Batman.Object and mixin all arguments to it.
Batman = (mixins...) ->
new Batman.Object(mixins...)
Batman.version = '0.14.1'
Batman.config =
pathToApp: '/'
usePushState: true
pathToHTML: 'html'
fetchRemoteHTML: true
cacheVi... | Fix a typo the file description | Fix a typo the file description | CoffeeScript | mit | getshuvo/batman,getshuvo/batman |
9d8c303e8f0f69bbd5d49b87d2eacc51d4f138c0 | app/choose-subject-set.cjsx | app/choose-subject-set.cjsx | React = require 'react'
module.exports = React.createClass
displayName: 'ChooseSubjectSet'
getInitialState: ->
subject_sets: []
componentWillMount: ->
@props.workflow?.get 'subject_sets', page_size: 40
.then (subject_sets) =>
subject_sets.sort (a, b) ->
return 1 if a.metad... | React = require 'react'
module.exports = React.createClass
displayName: 'ChooseSubjectSet'
getInitialState: ->
subject_sets: []
componentWillMount: ->
@props.workflow?.get 'subject_sets', page_size: 40
.then (subject_sets) =>
subject_sets.sort (a, b) ->
return 1 if a.metad... | Remove the report ID from the Reports page | Remove the report ID from the Reports page
| CoffeeScript | apache-2.0 | zooniverse/wellcome,zooniverse/wellcome |
4b3fe109afbb31987f28c07890abac6fcaa223e0 | client/ide/lib/views/statusbar/idechatheadwatchitemview.coffee | client/ide/lib/views/statusbar/idechatheadwatchitemview.coffee | kd = require 'kd'
KDCustomHTMLView = kd.CustomHTMLView
KodingSwitch = require 'app/commonviews/kodingswitch'
CustomLinkView = require 'app/customlinkview'
module.exports = class IDEChatHeadWatchItemView extends KDCustomHTMLView
constructor: (options = {}, data) ->
options.partial = 'Watch'
super options, d... | kd = require 'kd'
KDCustomHTMLView = kd.CustomHTMLView
KodingSwitch = require 'app/commonviews/kodingswitch'
CustomLinkView = require 'app/customlinkview'
module.exports = class IDEChatHeadWatchItemView extends KDCustomHTMLView
constructor: (options = {}, data) ->
options.partial ?= 'Watch'
super options, ... | Set partial option as default value | Set partial option as default value
| CoffeeScript | agpl-3.0 | rjeczalik/koding,jack89129/koding,drewsetski/koding,cihangir/koding,sinan/koding,kwagdy/koding-1,jack89129/koding,jack89129/koding,alex-ionochkin/koding,mertaytore/koding,drewsetski/koding,jack89129/koding,gokmen/koding,gokmen/koding,andrewjcasal/koding,cihangir/koding,kwagdy/koding-1,koding/koding,kwagdy/koding-1,drew... |
699346cfee95540095fa8c420de540bcde4f168f | src/transactions.coffee | src/transactions.coffee | {DOMParser} = require 'xmldom'
xpath = require 'xpath'
request = require 'request'
module.exports =
getTransactions: (cik, type, callback) ->
baseUrl = process.env.SEC_EDGAR_URL ? 'http://www.sec.gov/cgi-bin/browse-edgar'
url = "#{baseUrl}?action=getcompany&output=atom&start=0&count=1000&CIK=#{cik}&type=#{ty... | {DOMParser} = require 'xmldom'
xpath = require 'xpath'
request = require 'request'
module.exports =
getTransactions: (cik, type, callback) ->
baseUrl = process.env.SEC_EDGAR_URL ? 'http://www.sec.gov/cgi-bin/browse-edgar'
url = "#{baseUrl}?action=getcompany&output=atom&start=0&count=1000&CIK=#{cik}&type=#{ty... | Set owner=only on form 4 requests | Set owner=only on form 4 requests
| CoffeeScript | mit | krisalexander/filings,kevinsawicki/filings,parrondo/filings |
2c0230175359606b4e1a77ac885802dc2e1eee1b | src/components/Output.coffee | src/components/Output.coffee | noflo = require "noflo"
class Output extends noflo.Component
description: "This component receives input on a single inport, and sends the data items directly to console.log"
constructor: ->
@inPorts =
in: new noflo.ArrayPort()
@outPorts = {}
@inPorts.in.on "data", (data... | noflo = require "noflo"
util = require "util"
class Output extends noflo.Component
description: "This component receives input on a single inport, and sends the data items directly to console.log"
constructor: ->
@options =
showHidden: false
depth: 2
colors: false
... | Add ability to set output display options. | Add ability to set output display options.
| CoffeeScript | mit | jonnor/noflo,trustmaster/noflo,saurabhsood91/noflo,trustmaster/noflo,npmcomponent/noflo-noflo,saurabhsood91/noflo,lxfschr/noflo,noflo/noflo,jonnor/noflo,lxfschr/noflo |
36119c8bc1bf1ed60aec487dc97263068daeebf3 | menus/merge-conflicts.cson | menus/merge-conflicts.cson | # 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... | # See https://atom.io/docs/latest/creating-a-package#menus for more details
'context-menu':
'atom-text-editor': [{
label: 'Resolve Conflict',
submenu: [
{ label: 'Current', command: 'merge-conflicts:accept-current' }
{ label: 'Ours', command: 'merge-conflicts:accept-ours' }
{ label: 'Theirs'... | Rework the context menu entries. | Rework the context menu entries.
| CoffeeScript | mit | smashwilson/merge-conflicts,smashwilson/merge-conflicts,antcodd/merge-conflicts |
dae680a55af3eb31ec18959e2e102001f46fbdd0 | client/src/scripts/frame-list-view.coffee | client/src/scripts/frame-list-view.coffee | Steam.FrameListView = (_) ->
_items = do nodes$
activate = (item) ->
for other in _items()
if other is item
other.isActive yes
else
other.isActive no
_.displayFrame item.data
return
createItem = (frame) ->
#TODO replace with type checking
console.assert isArray ... | Steam.FrameListView = (_) ->
_predicate = node$ type: 'all'
_items = do nodes$
_hasItems = lift$ _items, (items) -> items.length > 0
_canClearPredicate = lift$ _predicate, (predicate) -> predicate.type isnt 'all'
_predicateCaption = lift$ _predicate, (predicate) ->
switch predicate.type
when 'all'
... | Add filter widget to frames list. PP-8 | Add filter widget to frames list.
PP-8
| CoffeeScript | apache-2.0 | eg-zhang/h2o-2,calvingit21/h2o-2,elkingtonmcb/h2o-2,rowhit/h2o-2,h2oai/h2o,vbelakov/h2o,111t8e/h2o-2,elkingtonmcb/h2o-2,h2oai/h2o,111t8e/h2o-2,100star/h2o,vbelakov/h2o,rowhit/h2o-2,eg-zhang/h2o-2,111t8e/h2o-2,100star/h2o,eg-zhang/h2o-2,eg-zhang/h2o-2,h2oai/h2o-2,100star/h2o,111t8e/h2o-2,vbelakov/h2o,elkingtonmcb/h2o-2,... |
62e4b8554623691ebf2fe6fb42cfbdb7a40e5c7d | imports/collections/promedPosts.coffee | imports/collections/promedPosts.coffee | if Meteor.isServer
CuratorSources = require './curatorSources.coffee'
PromedPosts = null
try
# spaDb = new MongoInternals.RemoteCollectionDriver(process.env.SPA_MONGO_URL)
# PromedPosts = new Meteor.Collection("posts", { _driver: spaDb })
PromedPosts = new Meteor.Collection("posts")
catch e
con... | if Meteor.isServer
CuratorSources = require './curatorSources.coffee'
PromedPosts = null
try
spaDb = new MongoInternals.RemoteCollectionDriver(process.env.SPA_MONGO_URL)
PromedPosts = new Meteor.Collection("posts", { _driver: spaDb })
catch e
console.warn 'Unable to connect to remote SPA mongodb.'
... | Use SPA_MONGO_URL env. variable for remote mongodb. | Use SPA_MONGO_URL env. variable for remote mongodb.
| CoffeeScript | apache-2.0 | ecohealthalliance/eidr-connect,ecohealthalliance/eidr-connect,ecohealthalliance/eidr-connect,ecohealthalliance/eidr-connect |
b9c61f08ec289693a9f9e94574652a438bd06979 | vendor/assets/javascripts/jquery.sticky_footer.js.coffee | vendor/assets/javascripts/jquery.sticky_footer.js.coffee | position_footer = ->
mFoo = $('#footer')
if $(document.body).height() + mFoo.outerHeight() < $(window).height() and mFoo.css('position') == 'fixed' or $(document.body).height() < $(window).height() and mFoo.css('position') != 'fixed'
mFoo.css
position: 'fixed'
bottom: '0'
else
mFoo.css positio... | position_footer = ->
mFoo = $('#footer')
if $(document.body).height() + mFoo.outerHeight() < $(window).height() and mFoo.css('position') == 'fixed' or $(document.body).height() < $(window).height() and mFoo.css('position') != 'fixed'
mFoo.css
position: 'fixed'
bottom: '0'
else
mFoo.css positio... | Revert changes made in sticky_footer as it's not working | Revert changes made in sticky_footer as it's not working
| CoffeeScript | mit | lr-agenceweb/rails-starter,lr-agenceweb/rails-starter,lr-agenceweb/rails-starter,lr-agenceweb/rails-starter |
6ff2f580809c4a75527c7fc7e0803d1169652839 | core/app/backbone/views/facts/fact_bottom_view.coffee | core/app/backbone/views/facts/fact_bottom_view.coffee | class window.FactBottomView extends Backbone.Marionette.ItemView
className: 'fact-bottom'
template: 'facts/fact_bottom'
events:
"click .js-add-to-channel": "showAddToChannel"
"click .js-start-conversation": "showStartConversation"
"click .js-open-proxy-link" : "openProxyLink"
"click .js-argument... | class window.FactBottomView extends Backbone.Marionette.ItemView
className: 'fact-bottom'
template: 'facts/fact_bottom'
events:
"click .js-add-to-channel": "showAddToChannel"
"click .js-start-conversation": "showStartConversation"
"click .js-open-proxy-link" : "openProxyLink"
"click .js-argument... | Handle function keys when clicking on a factrelation | Handle function keys when clicking on a factrelation
| CoffeeScript | mit | daukantas/factlink-core,daukantas/factlink-core,daukantas/factlink-core,Factlink/factlink-core,Factlink/factlink-core,Factlink/factlink-core,daukantas/factlink-core,Factlink/factlink-core |
f10d2b2e2611af9f0c4cf8469f6d70a062c3862a | app/assets/javascripts/views/overlays/new_ad_hoc_task_overlay_view.js.coffee | app/assets/javascripts/views/overlays/new_ad_hoc_task_overlay_view.js.coffee | ETahi.NewAdHocTaskOverlayView = ETahi.OverlayView.extend
templateName: 'overlays/new_adhoc_task_overlay'
layoutName: 'layouts/new_task_overlay_layout'
| ETahi.NewAdHocTaskOverlayView = ETahi.OverlayView.extend
templateName: 'overlays/new_ad_hoc_task_overlay'
layoutName: 'layouts/new_task_overlay_layout'
| Fix ad hoc template name | Fix ad hoc template name
| CoffeeScript | mit | johan--/tahi,johan--/tahi,johan--/tahi,johan--/tahi |
b1b80a8b76f6dcae60d5a799e03c5269e2771e1c | lib/file.coffee | lib/file.coffee | if Meteor.isServer
storeType = 'GridFS'
if Meteor.settings?.public?.avatarStore?.type?
storeType = Meteor.settings.public.avatarStore.type
RocketStore = RocketFile[storeType]
if not RocketStore?
throw new Error "Invalid RocketStore type [#{storeType}]"
transformWrite = undefined
if Meteor.settings?.public... | if Meteor.isServer
storeType = 'GridFS'
if Meteor.settings?.public?.avatarStore?.type?
storeType = Meteor.settings.public.avatarStore.type
RocketStore = RocketFile[storeType]
if not RocketStore?
throw new Error "Invalid RocketStore type [#{storeType}]"
console.log "Using #{storeType} for Avatar storage".gr... | Fix store reference and log which store is using | Fix store reference and log which store is using
| CoffeeScript | mit | warcode/Rocket.Chat,mccambridge/Rocket.Chat,ZBoxApp/Rocket.Chat,katopz/Rocket.Chat,qnib/Rocket.Chat,MiHuevos/Rocket.Chat,mhurwi/Rocket.Chat,wolfika/Rocket.Chat,mrsimpson/Rocket.Chat,liuliming2008/Rocket.Chat,Ninotna/Rocket.Chat,parkmap/Rocket.Chat,Gudii/Rocket.Chat,abhishekshukla0302/trico,Kiran-Rao/Rocket.Chat,klatys/... |
bce56f2899dcc3ca9a78218c3e8de9e257eea17c | lib/mycha.bin.coffee | lib/mycha.bin.coffee | OptimistParser = require './optimist_parser'
commands =
run: "Runs all tests found in /test"
watch: "Runs all tests in /test and watches for changes"
help: "Shows this help page"
usage_text = """
Usage: mycha <command> [options]
where <command> is one of:
#{(" ... | OptimistParser = require './optimist_parser'
commands =
run: "Runs all tests found in /test"
watch: "Runs all tests in /test and watches for changes"
help: "Shows this help page"
usage_text = """
Usage: mycha <command> [options]
where <command> is one of:
#{(" ... | Use OptimistParser to determine the command | Use OptimistParser to determine the command | CoffeeScript | mit | Originate/mycha |
93fddb25396c1343d99aefa9bac35c00d03db822 | client/Terminal/vmselectionview.coffee | client/Terminal/vmselectionview.coffee | # FIXME - Move this in a seperate file ~ GG
class VmListItem extends KDListItemView
click: ->
@getDelegate().emit 'VMSelected', @getData()
viewAppended: ->
JView::viewAppended.call this
pistachio: ->
"""
<div class="vm-info">
<cite></cite>
#{@getData()}
</div>
"""
... | # FIXME - Move this in a seperate file ~ GG
class VmListItem extends KDListItemView
click: ->
@getDelegate().emit 'VMSelected', @getData()
viewAppended: ->
JView::viewAppended.call this
pistachio: ->
"""
<div class="vm-info">
<cite></cite>
#{@getData()}
</div>
"""
... | Revert "terminal: fetch account's group associated VMs in "VM selection" modal" | Revert "terminal: fetch account's group associated VMs in "VM selection" modal"
This reverts commit e0d8381d3efe193093c86cf6f23ee399c2e109f2.
| CoffeeScript | agpl-3.0 | gokmen/koding,jack89129/koding,drewsetski/koding,alex-ionochkin/koding,rjeczalik/koding,acbodine/koding,acbodine/koding,cihangir/koding,sinan/koding,usirin/koding,usirin/koding,kwagdy/koding-1,alex-ionochkin/koding,mertaytore/koding,gokmen/koding,rjeczalik/koding,rjeczalik/koding,drewsetski/koding,drewsetski/koding,szk... |
9428c1a69e7460d35114cb2da6943a9884204e31 | app/assets/service/upload.coffee | app/assets/service/upload.coffee | 'use strict'
app.factory('uploadService', [
'routerService',
(router) ->
removedAsset: undefined
# callbacks for ng-flow:
fileSuccess: (file) ->
file.store.progress = 1
file.store.save()
return
fileError: (file, message, flow) ->
file.abort()
alert("There was an err... | 'use strict'
app.factory('uploadService', [
'routerService', 'messageService'
(router, messages) ->
removedAsset: undefined
# callbacks for ng-flow:
fileSuccess: (file) ->
file.store.progress = 1
file.store.save()
return
fileError: (file, message, flow) ->
file.abort()
... | Make error use the standard addError function. | Make error use the standard addError function.
| CoffeeScript | agpl-3.0 | databrary/databrary,databrary/databrary,databrary/databrary,databrary/databrary |
24861adad2d6acc96833120724820ea633972d35 | src/components/reference-book/teacher-content-toggle.cjsx | src/components/reference-book/teacher-content-toggle.cjsx | React = require 'react'
BS = require 'react-bootstrap'
TeacherContentToggle = React.createClass
getInitialState: ->
isShowing: false
propTypes:
onChange: React.PropTypes.func.isRequired
onClick: ->
isShowing = not @state.isShowing
@setState({isShowing})
@props.onChange(isShowing)
render... | React = require 'react'
BS = require 'react-bootstrap'
TeacherContentToggle = React.createClass
propTypes:
onChange: React.PropTypes.func.isRequired
isShowing: React.PropTypes.bool.isRequired
onClick: ->
@props.onChange(not @props.isShowing)
render: ->
teacherLinkText = if @props.isShowing
... | Use property vs state to determine toggled status | Use property vs state to determine toggled status
| CoffeeScript | agpl-3.0 | openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js |
d679a92ed70675f665d84839bdace72b6c79eb63 | frontend/view_index.coffee | frontend/view_index.coffee | d = ->
console.log arguments...
base = global.wolisconfig.test_url
casper.start base, ->
this.test.assertHttpStatus 200
casper.run ->
@test.done()
| d = ->
console.log arguments...
base = global.wolisconfig.test_url
casper.start base, ->
@test.assertHttpStatus 200
# check that the index page has expected text
@test.assertTextExists 'Your first forum'
casper.run ->
@test.done()
| Check that index page is legitimate | Check that index page is legitimate
| CoffeeScript | bsd-2-clause | p/wolis-phpbb,p/wolis-phpbb |
b917dea9ad85434497ad5d5e3d7d9b34b09b9bf3 | app/routes/application.coffee | app/routes/application.coffee | `import BaseRoute from './_base'`
Route = BaseRoute.extend
model: ->
# return the current user as the model if authenticated, otherwise a blank object
new Ember.RSVP.Promise (resolve, reject) =>
promise = $.ajax
url: '/api/me'
dataType: 'json'
promise.done (result) =>
user... | `import BaseRoute from './_base'`
`import ajax from 'ic-ajax'`
Route = BaseRoute.extend
model: ->
mePath = '/api/me'
# return the current user as the model if authenticated, otherwise a blank object
new Ember.RSVP.Promise (resolve, reject) =>
ajax
url: mePath
dataType: 'json'
... | Sort out ES6 import confusion; add POST to /api/me to record user visit | Sort out ES6 import confusion; add POST to /api/me to record user visit | CoffeeScript | mit | artzte/fightbook-app |
208e20bfdbf66d41893c5ec7da0e6a09cb86f021 | lib/app.coffee | lib/app.coffee | path = require 'path'
ROOT = process.env.APP_ROOT
express = require 'express'
handlebars = require 'express-handlebars'
bodyParser = require 'body-parser'
morgan = require 'morgan'
favicon = require 'serve-favicon'
mincer = require 'mincer'
## Set up the app
module.exports = app = express()
# Logging
app.use morgan... | path = require 'path'
ROOT = process.env.APP_ROOT
express = require 'express'
handlebars = require 'express-handlebars'
bodyParser = require 'body-parser'
morgan = require 'morgan'
favicon = require 'serve-favicon'
mincer = require 'mincer'
## Set up the app
module.exports = app = express()
# Logging
app.use morgan... | Fix xmlDate and add baseURL | Fix xmlDate and add baseURL
| CoffeeScript | mit | desert-planet/ayp |
c003a65037ed6b15cdaf8d5698b214b099cf0135 | 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... | Check whether there are currently any scrollbars | Check whether there are currently any scrollbars
| CoffeeScript | mit | Factlink/js-library,Factlink/js-library,Factlink/js-library |
3634129558a895fd20260a6e9ed409920b077423 | test/remote-channel.coffee | test/remote-channel.coffee | Transport = require "../src/redis-transport"
RemoteChannel = require "../src/remote-channel"
helpers = require "./helpers"
{testify,assert,events} = helpers
make = ->
transport = new Transport
host: "localhost"
port: 6379
transport.events.forward events
channel = new RemoteChannel
name: "greetin... | Transport = require "../src/redis-transport"
RemoteChannel = require "../src/remote-channel"
helpers = require "./helpers"
{testify,assert,events} = helpers
make = ->
transport = new Transport
host: "localhost"
port: 6379
transport.events.forward events
channel = new RemoteChannel
name: "greetin... | Update the test descriptions to match the tests | Update the test descriptions to match the tests | CoffeeScript | mit | pandastrike/mutual,GemHQ/mutual,GemHQ/mutual |
56c9a42234ef585c652f0148e7efce3201807443 | keymaps/atom-repl.cson | keymaps/atom-repl.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... | Create keymaps for other platforms. | Create keymaps for other platforms.
| CoffeeScript | mit | xanecs/hydrogen,rgbkrk/hydrogen,nteract/hydrogen,lgeiger/hydrogen,nteract/hydrogen,n-riesco/hydrogen |
3d99a6bc1d631bde1061abc0dd57bc9a975caeea | app/assets/javascripts/bikeways.js.coffee | app/assets/javascripts/bikeways.js.coffee | # This file uses the Garber-Irish method for allowing "per-page Javascript."
# I'm using the `gistyle` gem to handle the actual implementation of the pattern.
APP.init = ->
console.log "application"
APP.bikeway_segments =
init: ->
$ ->
console.log "bikeway_segments (controller)"
index: ->
$ ->
... | # This file uses the Garber-Irish method for allowing "per-page Javascript."
# I'm using the `gistyle` gem to handle the actual implementation of the pattern.
APP.init = ->
console.log "application"
APP.bikeway_segments =
init: ->
$ ->
console.log "bikeway_segments (controller)"
index: ->
$ ->
... | Set default zoom level to 16 | Set default zoom level to 16
| CoffeeScript | mit | jbinto/bikeways,jbinto/bikeways |
bc569c55b1f71995e8ff7094bfaf41fda38255e6 | Gruntfile.coffee | Gruntfile.coffee | shell = require 'shelljs'
'use strict'
module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
cucumberjs:
src: './features'
coffeelint:
lib: ['lib/**/*.coffee']
tests: ['specs/**/*.coffee']
#
grunt.registerTask 'default', ['build_parser', '... | shell = require 'shelljs'
'use strict'
module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
cucumberjs:
src: './features'
coffeelint:
lib: ['lib/**/*.coffee']
tests: ['specs/**/*.coffee']
#
grunt.registerTask 'default', ['build_parser', '... | Allow system, attribute and heading as grammar start rules. | Allow system, attribute and heading as grammar start rules.
| CoffeeScript | mit | llambeau/finitio.js,llambeau/finitio.js |
ab97283fd1d244283c1973793d09823a474ef3d4 | menus/bracket-matcher.cson | menus/bracket-matcher.cson | 'menu': [
{
'label': 'Packages'
'submenu': [
'label': 'Bracket Matcher'
'submenu': [
{ 'label': 'Go To Matching Bracket', 'command': 'bracket-matcher:go-to-matching-bracket' }
{ 'label': 'Select Inside Brackets', 'command': 'bracket-matcher:select-inside-brackets' }
]
]
... | 'menu': [
{
'label': 'Packages'
'submenu': [
'label': 'Bracket Matcher'
'submenu': [
{ 'label': 'Go To Matching Bracket', 'command': 'bracket-matcher:go-to-matching-bracket' }
{ 'label': 'Select Inside Brackets', 'command': 'bracket-matcher:select-inside-brackets' }
{ 'labe... | Add remove-brackets command to menu | Add remove-brackets command to menu
| CoffeeScript | mit | adamCoGithub/Bracket-Matcher-no-autoclose,bwinton/bracket-matcher,adamCoGithub/Bracket-Matcher-no-autoclose,jacekkopecky/bracket-matcher,adamCoGithub/Bracket-Matcher-no-smart-quotes,lpommers/bracket-matcher,bwinton/bracket-matcher,jacekkopecky/bracket-matcher,lpommers/bracket-matcher,adamCoGithub/Bracket-Matcher-no-sma... |
c3bcd35db39d0ed8443d441ded3d6ae48700f77d | accounts/server/provider_secrets.coffee | accounts/server/provider_secrets.coffee | Meteor.accounts.google.setSecret "LeeZILT05svXh5PvNi7PrkrJ"
Meteor.accounts.facebook.setSecret "b367d5310e20d877be768f000d61d7b9"
| Meteor.accounts.google.setSecret "E3qfhdn-_0oyetC1TGRV4DSv"
Meteor.accounts.facebook.setSecret "e12a0e452638d3d64bd251c64152e1b0" | Update Google client secret to fix login - all values set for meta.socrench.us | Update Google client secret to fix login - all values set for meta.socrench.us | CoffeeScript | mit | Socrenchus/Socrenchus,Socrenchus/Socrenchus |
c002c8a4c53aff0c00504d3d72ef7886b3e4f26b | lib/panel.coffee | lib/panel.coffee | class Panel
constructor: (@Linter)->
@Decorations = []
@Type = 'file'
registerView: (View)->
@View = View
@View.Model = this
removeDecorations: ->
@Decorations.forEach (decoration) ->
try decoration.destroy()
@Decorations = []
render: (Messages)->
@removeDecorations()
Messa... | class Panel
constructor: (@Linter)->
@Decorations = []
@Type = 'file'
removeDecorations: ->
return unless @Decorations.length
@Decorations.forEach (decoration) ->
try decoration.destroy()
@Decorations = []
render: (Messages)->
@removeDecorations()
Messages.forEach (Message) =>
... | Remove registerView from Panel Model | :fire: Remove registerView from Panel Model
| CoffeeScript | mit | UltCombo/linter,steelbrain/linter,simurai/linter-plus,mdgriffith/linter,atom-community/linter,Arcanemagus/linter,JohnMurga/linter,kaeluka/linter,iam4x/linter,elkeis/linter,levity/linter,AtomLinter/Linter,e-jigsaw/Linter,DanPurdy/linter,shawninder/linter,AsaAyers/linter,blakeembrey/linter,josa42/Linter |
805c9b5963ee16cd3bf390deabf29c860189eb73 | app/assets/javascripts/sprangular/directives/addressSelection.coffee | app/assets/javascripts/sprangular/directives/addressSelection.coffee | Sprangular.directive 'addressSelection', ->
restrict: 'E'
templateUrl: 'addresses/selection.html'
scope:
address: '='
addresses: '='
countries: '='
disabled: '=disabledFields'
submitted: '='
existingAddress: '='
controller: ($scope) ->
$scope.$watch 'addresses', (addresses) ->
... | Sprangular.directive 'addressSelection', ->
restrict: 'E'
templateUrl: 'addresses/selection.html'
scope:
address: '='
addresses: '='
countries: '='
disabled: '=disabledFields'
submitted: '='
existingAddress: '='
controller: ($scope) ->
$scope.$watch 'addresses', (addresses) ->
... | Fix spelling error & remove link function in address-selection | Fix spelling error & remove link function in address-selection
| CoffeeScript | mit | sprangular/sprangular,sprangular/sprangular,sprangular/sprangular |
41e5960fb8a7076643b1664eb49818cfc2a3121f | app/assets/javascripts/modules/dashboard/views/account.coffee | app/assets/javascripts/modules/dashboard/views/account.coffee | @CodequestManager.module 'Dashboard', (Dashboard, App, Backbone, Marionette, $, _) ->
Dashboard.Account = Marionette.ItemView.extend
template: 'dashboard/account'
className: ->
"user-box #{@amountClass()}"
templateHelpers: ->
formattedNumber: @formattedNumber()
formattedBalance: @format... | @CodequestManager.module 'Dashboard', (Dashboard, App, Backbone, Marionette, $, _) ->
Dashboard.Account = Marionette.ItemView.extend
template: 'dashboard/account'
className: ->
"user-box #{@amountClass()}"
templateHelpers: ->
formattedNumber: @formattedNumber()
formattedBalance: @format... | Fix CSS class for N/As on Accounts Page | Fix CSS class for N/As on Accounts Page
| CoffeeScript | mit | lunchiatto/web,lunchiatto/web,lunchiatto/web,lunchiatto/web |
08ec212b6903bd8ba28206dd44525aef37756976 | app/system/trigger/impl/push.coffee | app/system/trigger/impl/push.coffee | # Trigger implementation for being told when to poll
Bacon = require 'baconjs'
router = require '../../../router'
module.exports = (config) ->
bus = new Bacon.Bus
url = if config.url? then "/repo/poll/#{url}" else '/repo/poll'
router.api.post url, (req, res) -> bus.push reason: "request from #{req.ip}"
bus.toEv... | # Trigger implementation for being told when to poll
Bacon = require 'baconjs'
router = require '../../../router'
module.exports = (config) ->
bus = new Bacon.Bus
url = if config.url? then "/repo/poll/#{url}" else '/repo/poll'
router.api.post url, (req, res) ->
bus.push reason: "request from #{req.ip}"
res.se... | Make sure `/repo/poll` endpoint sends a response | Make sure `/repo/poll` endpoint sends a response
| CoffeeScript | mit | baffles/awesome-build |
0a49eef4633bd3d7886fe2429d33f82d6476a38b | src/build-cache.coffee | src/build-cache.coffee | fs = require 'fs'
path = require 'path'
initialized = false
initSignalHandlers = ->
if initialized then return
initialized = true
process.on 'exit', ->
for own cachePath, cache of caches
fs.writeFileSync cachePath, JSON.stringify cache
process.on 'SIGINT', process.exit
process.on 'SIGTERM', proce... | fs = require 'fs'
path = require 'path'
initialized = false
initSignalHandlers = ->
if initialized then return
initialized = true
process.on 'exit', ->
for own cachePath, cache of caches
fs.writeFileSync cachePath, JSON.stringify cache
process.on 'SIGINT', process.exit
process.on 'SIGTERM', proce... | Disable sharing of the same cache for | Disable sharing of the same cache for
configurations with different values of the 'node' option
| CoffeeScript | bsd-3-clause | tarruda/powerbuild |
f81322e6b534cef675fd2250d4009092c9388b27 | src/events.init.coffee | src/events.init.coffee | # Eventful code comes here
# Program state should not be manipulated outside events files
# Initialize the canvas element (size, aspect ratio etc)
canvasInit = () ->
windowResize()
# Initialize nodes in the scene graph
sceneInit = () ->
shaderDef =
type: 'shader',
id: 'main-shader',
shaders: [
s... | # Eventful code comes here
# Program state should not be manipulated outside events files
# Initialize the canvas element (size, aspect ratio etc)
canvasInit = () ->
windowResize()
# Initialize nodes in the scene graph
sceneInit = () ->
compileCSM ($ '#source-code').val(),
(result) ->
shaderDef =
... | Initialize the model with the default code in the source editor | Initialize the model with the default code in the source editor
| CoffeeScript | mit | circuithub/morpheus,circuithub/morpheus |
b62a0177c8e3c89a0b1f86e600e20461796f7a81 | app/assets/javascripts/shipit.js.coffee | app/assets/javascripts/shipit.js.coffee | # This is a manifest file that'll be compiled into application.js, which will include all the files
# listed below.
#
# Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
# or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
#
... | # This is a manifest file that'll be compiled into application.js, which will include all the files
# listed below.
#
# Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
# or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
#
... | Revert "Add jQuery notify back in" | Revert "Add jQuery notify back in"
This reverts commit 89bdb2cd13608ec82846d0e7b10f12e2ed176c18.
Conflicts:
app/assets/javascripts/shipit.js.coffee
Not sure why, but this was breaking a blank app.
We should add it back, once we fix/figure out the problem.
| CoffeeScript | mit | Shopify/shipit-engine,perobertson/shipit-engine,ershad/shipit-engine,Shopify/shipit-engine,Shopify/shipit-engine,perobertson/shipit-engine,ershad/shipit-engine,perobertson/shipit-engine,Shopify/shipit-engine,Shopify/shipit-engine,ershad/shipit-engine,ershad/shipit-engine,perobertson/shipit-engine,perobertson/shipit-eng... |
687828942226ad9c9b2a02c94b1ee0d13c28e550 | lib/utils.coffee | lib/utils.coffee |
fs = require 'fs-extra'
path = require 'path-extra'
stringify = (str) ->
return str if typeof str == 'string'
if str.toString() == '[object Object]'
str = JSON.stringify str
else
str = str.toString()
return str
module.exports =
remoteStringify: JSON.stringify
log: (str) ->
str = stringify str... |
fs = require 'fs-extra'
path = require 'path-extra'
stringify = (str) ->
return str if typeof str == 'string'
if str.toString() == '[object Object]'
str = JSON.stringify str
else
str = str.toString()
return str
module.exports =
remoteStringify: JSON.stringify
log: (str) ->
str = stringify str... | Remove use of colors for now | Remove use of colors for now | CoffeeScript | mit | dkwingsmt/poi,KagamiChan/poi,dkwingsmt/poi,dushi792/poi,syncsyncsynchalt/poi,nagatoyk/poi,syncsyncsynchalt/poi,yudachi/poi,yyydao/poi,yudachi/poi,dushi792/poi,KagamiChan/poi,gnattu/poi,poooi/poi,syncsyncsynchalt/poi,yyydao/poi,nagatoyk/poi,PHELiOX/poi,poooi/poi,poooi/poi,poooi/poi,dushi792/poi,gnattu/poi,yudachi/poi,sy... |
7952dfc196347b2782d56988c92f06d0374326f6 | src/stdlib/task.coffee | src/stdlib/task.coffee | module.exports =
class Task
aborted: false
constructor: (@path) ->
start: ->
throw new Error("Task already started") if @worker?
@worker = new Worker(require.getPath('task-shell'))
@worker.onmessage = ({data}) =>
if @aborted
@done()
return
if data.method and this[data.m... | module.exports =
class Task
aborted: false
constructor: (@path) ->
start: ->
throw new Error("Task already started") if @worker?
@worker = new Worker(require.getPath('task-shell'))
@worker.onmessage = ({data}) =>
if @aborted
@done()
return
if data.method and this[data.m... | Add command after first argument | Add command after first argument
This forces the object to be interpreted as the
second argument to the callWorkerMethod function
instead of as the first argument to function returned
from callWorkerMethod.
Closes #338
| CoffeeScript | mit | gisenberg/atom,Neron-X5/atom,yamhon/atom,isghe/atom,ReddTea/atom,gzzhanghao/atom,Huaraz2/atom,hpham04/atom,deepfox/atom,dsandstrom/atom,Ju2ender/atom,cyzn/atom,basarat/atom,rjattrill/atom,deepfox/atom,qskycolor/atom,0x73/atom,kandros/atom,tanin47/atom,qskycolor/atom,vhutheesing/atom,ali/atom,kevinrenaers/atom,andrewlev... |
e4b94d53ea682a7b293194ebec7274f4bfcdd036 | src/toilet-list.coffee | src/toilet-list.coffee | riot = require('riot')
React = require('react')
LocationInput = React.createClass
render: -> `(
<form>
<input type="text"></input>
<input type="submit"></input>
</form>
)`
ToiletItem = React.createClass
render: -> `(
<li><h3>{this.props.name}</h3>{this.props.address}</li>
)`
ToiletLis... | riot = require('riot')
React = require('react')
NCN = require('./ncn')
LocationInput = React.createClass
render: -> `(
<form>
<input type="text"></input>
<input type="submit"></input>
</form>
)`
ToiletItem = React.createClass
render: -> `(
<li><h3>{this.props.name}</h3>{this.props.addres... | Remove div around toilet list | Remove div around toilet list
| CoffeeScript | bsd-3-clause | ck101000xx/ncn-web |
cc4d1a24d3818aa96ea70f559a31cb89ea5a8a20 | server/lib/tasks/backupIndicatorData.coffee | server/lib/tasks/backupIndicatorData.coffee | mongoose = require('mongoose')
mongoose.connect("mongodb://localhost/nrt_development")
IndicatorData = require('../../models/indicator_data').model
fs = require('fs')
console.log "Yo"
IndicatorData.dataToSeedJSON().then((json)->
fs.writeFile("./lib/indicator_data.json", json, (err) ->
if err
console.error ... | mongoose = require('mongoose')
mongoose.connect("mongodb://localhost/nrt_development")
IndicatorData = require('../../models/indicator_data').model
fs = require('fs')
console.log "Backing up Indicator Data"
IndicatorData.dataToSeedJSON().then((json)->
fs.writeFile("./lib/indicator_data.json", json, (err) ->
if e... | Make backup task exit when finishd | Make backup task exit when finishd
| CoffeeScript | bsd-3-clause | unepwcmc/NRT,unepwcmc/NRT |
5fac8942e80d7e89a434c32b17f7783801c3fb4a | src/plugins/jsonparser.coffee | src/plugins/jsonparser.coffee | module.exports =
processResponse: (res) ->
# Check to see if the contentype is "something/json" or
# "something/somethingelse+json"
if res.contentType and (/^.*\/(?:.*\+)?json$/i).test res.contentType
# If the body hasn't been parsed yet, parse it.
raw = if typeof res.body is 'string' then res... | module.exports =
processResponse: (res) ->
# Check to see if the contentype is "something/json" or
# "something/somethingelse+json"
if res.contentType and (/^.*\/(?:.*\+)?json(;|\z)/i).test res.contentType
# If the body hasn't been parsed yet, parse it.
raw = if typeof res.body is 'string' the... | Allow more complex contentType fields | Allow more complex contentType fields | CoffeeScript | mit | matthewwithanm/httpplease.js,matthewwithanm/httpplease.js |
04513f53e65bed176b8572b2ecd5a66082adeb2f | test/dependency.coffee | test/dependency.coffee | should = require 'should'
{join} = require 'path'
# lib stuff
{load, process, applyPolicy, print, create, print} = require '../lib/main'
# sample stuff
jargon = require '../sample/app/domain/auth/jargon'
serviceLocation = join __dirname, '../sample/app/domain/auth/services'
policy = require '../sample/app/domain/auth... | should = require 'should'
{join} = require 'path'
# lib stuff
{load, process, applyPolicy, print, create, print} = require '../lib/main'
# sample stuff
jargon = require '../sample/app/domain/auth/jargon'
serviceLocation = join __dirname, '../sample/app/domain/auth/services'
policy = require '../sample/app/domain/auth... | Check result of dependent service | Check result of dependent service
| CoffeeScript | mit | TorchlightSoftware/law |
00558774ce316f1fe817b1497502bd1fae0dc30d | test/html-parse.coffee | test/html-parse.coffee | assert = require 'assert'
htmlParse = require '../lib/html-parse'
describe 'HTML Parser', ->
it 'Extracts HTML classes', ->
html = """
<!DOCTYPE html>
<html class="htmlclass">
<head>
</head>
<body class="bodyclass">
<div class="class1 cla... | assert = require 'assert'
htmlParse = require '../lib/html-parse'
describe 'HTML Parser', ->
it 'Extracts HTML classes', ->
html = """
<!DOCTYPE html>
<html class="htmlclass">
<head>
</head>
<body class="bodyclass">
<div class="class1 cla... | Add placeholder test for ng-class. | Add placeholder test for ng-class.
| CoffeeScript | mit | rubenv/grunt-unknown-css |
2d5c5c6e6ce5be6660459f5a3e13e701ea64a24f | src/coffee/cilantro/models/query.coffee | src/coffee/cilantro/models/query.coffee | define [
'../core'
'./base'
], (c, base) ->
class QueryModel extends base.Model
class QueryCollection extends base.Collection
model: QueryModel
url: ->
c.session.url('queries')
initialize: ->
super
c.subscribe c.SESSION_OPENED, => @fetch(r... | define [
'../core'
'./base'
], (c, base) ->
class QueryModel extends base.Model
url: ->
c.session.url('queries')
class QueryCollection extends base.Collection
model: QueryModel
url: ->
c.session.url('queries')
initialize: ->
super
... | Set the url on the QueryModel | Set the url on the QueryModel
| CoffeeScript | bsd-2-clause | chop-dbhi/cilantro,chop-dbhi/cilantro,chop-dbhi/cilantro |
af0417184dbea27d4a22d2ea50b19a607a0019c3 | index.coffee | index.coffee | module.exports = (Impromptu, register, system) ->
register 'pwd',
update: ->
process.env.PWD
register 'prettyPwd',
update: ->
cwd = process.env.PWD
if cwd.indexOf(process.env.HOME) == 0
cwd = '~' + cwd.slice process.env.HOME.length
cwd
register 'user',
update: (done) ... | module.exports = (Impromptu, register, system) ->
register 'pwd',
update: ->
process.env.PWD
register 'prettyPwd',
update: ->
cwd = process.env.PWD
if cwd.indexOf(process.env.HOME) == 0
cwd = '~' + cwd.slice process.env.HOME.length
cwd
register 'user',
update: ->
... | Use the `USER` env var instead of `whoami` | Use the `USER` env var instead of `whoami`
Calling `whoami` will always return the user with which the server was
started, which might or might not be the current user.
For example if we change the user in the middle of a session the prompt
will continue showing the original username.
| CoffeeScript | mit | impromptu/impromptu-system |
29829dca381a7710f559f3262ef6c2f2f1fc9389 | app/assets/javascripts/organization.coffee | app/assets/javascripts/organization.coffee | window.addAddressRow = (count) ->
newRow = $ """
<div class="form-group">
<label for="organization_addresses_attributes_""" + count + """_address">Mailing Address</label>
<div>
<input class="form-control" data-guard="different" type="text" value="" name="organization[addresses_attributes][""" + count... | window.addAddressRow = (count) ->
newRow = $ """
<div class="form-group">
<label for="organization_addresses_attributes_#{count}_address">Mailing Address</label>
<div>
<input class="form-control" data-guard="different" type="text" value="" name="organization[addresses_attributes][#{count}][address]" ... | Change org coffee to string interpolation | Change org coffee to string interpolation
| CoffeeScript | mit | on-site/StockAid,on-site/StockAid,on-site/StockAid |
fcf82246e7495f3d3dd8bb1314ef3fda112d1497 | apps/settings/routes.coffee | apps/settings/routes.coffee | @index = (req, res, next) ->
user = req.user
{ customer, policy } = user.related()
policy.authenticate(user.get('access_token'))
customer.authenticate(user.get('access_token'))
Promise.all [
user.fetch()
policy.fetch()
customer.fetch()
.catch -> #
]
.then ->
res.locals.sd.USER =... | @index = (req, res, next) ->
user = req.user
{ customer, policy } = user.related()
policy.authenticate(user.get('access_token'))
customer.authenticate(user.get('access_token'))
headers = {
'X-AUTH-TOKEN': user.get('access_token'),
}
Promise.all [
user.fetch({ headers })
policy.fetch()
... | Add headers to settings app | Add headers to settings app
| CoffeeScript | mit | aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell |
8977e0e24e6b396c2379e8f714f232c180c0cedb | app/assets/javascripts/mixins/views/redirects_on_editable.js.coffee | app/assets/javascripts/mixins/views/redirects_on_editable.js.coffee | ETahi.RedirectsIfEditable = Em.Mixin.create
toggleEditable: ->
@get('controller').send('editableDidChange')
setupEditableToggle: (->
@addObserver('controller.model.editable', @, @toggleEditable)
).on('didInsertElement')
teardownEditableToggle: (->
@removeObserver('controller.model.editable', @, @t... | ETahi.RedirectsIfEditable = Em.Mixin.create
editable: Ember.computed.alias('controller.model.editable')
toggleEditable: ->
if @get('editable') != @get('lastEditable')
@set('lastEditable', @get('editable'))
@get('controller').send('editableDidChange')
setupEditableToggle: (->
@set('lastEditab... | Fix transitions when editable isn’t actually changing | Fix transitions when editable isn’t actually changing | CoffeeScript | mit | johan--/tahi,johan--/tahi,johan--/tahi,johan--/tahi |
fe6eac6c7ddf24f0c0575000e621c8057955ee2f | spec/api-app-spec.coffee | spec/api-app-spec.coffee | assert = require 'assert'
app = require('remote').require 'app'
describe 'app module', ->
describe 'app.getVersion()', ->
it 'returns the version field of package.json', ->
assert.equal app.getVersion(), '0.1.0'
describe 'app.setVersion(version)', ->
it 'overrides the version', ->
assert.equal... | assert = require 'assert'
app = require('remote').require 'app'
describe 'app module', ->
describe 'app.getVersion()', ->
it 'returns the version field of package.json', ->
assert.equal app.getVersion(), '0.1.0'
describe 'app.setVersion(version)', ->
it 'overrides the version', ->
assert.equal... | Fix refreshing the spec window. | Fix refreshing the spec window.
| CoffeeScript | mit | ankitaggarwal011/electron,lzpfmh/electron,tinydew4/electron,mjaniszew/electron,fritx/electron,jaanus/electron,farmisen/electron,renaesop/electron,gerhardberger/electron,nagyistoce/electron-atom-shell,tinydew4/electron,seanchas116/electron,webmechanicx/electron,JussMee15/electron,bbondy/electron,leftstick/electron,fabie... |
72cb9b2cdec30adc502a1e5aaa7f97539cff99ce | scripts/util/http-promise.coffee | scripts/util/http-promise.coffee | Promise = require 'promise'
Log = require 'log'
logger = new Log(process.env.HUBOT_LOG_LEVEL or 'info')
getHttpJson = (robot, url) ->
logger.debug "Loading", url
new Promise (resolve, reject) ->
robot.http(url)
.header('Accept', 'application/json')
.get() (err, res, body) ->
if err
... | Q = require 'q'
Log = require 'log'
logger = new Log(process.env.HUBOT_LOG_LEVEL or 'info')
getHttpJson = (robot, url) ->
logger.debug "Loading", url
new Q.Promise (resolve, reject) ->
robot.http(url)
.header('Accept', 'application/json')
.get() (err, res, body) ->
if err
... | Convert http to Q instead of old promise library. | Convert http to Q instead of old promise library. | CoffeeScript | mit | claytondukes/myfflbot,claytondukes/myfflbot |
2d81fa9cd7d05d3373fafd4f4c9a4bf4e8bd301b | lib/table-edit.coffee | lib/table-edit.coffee |
module.exports =
activate: (state) ->
atom.workspaceView.command 'table-edit:demo', ->
Table = require './table'
TableView = require './table-view'
table = new Table
table.addColumn 'key'
table.addColumn 'value'
table.addColumn 'foo'
for i in [0...100]
table.a... |
module.exports =
activate: (state) ->
atom.workspaceView.command 'table-edit:demo', ->
Table = require './table'
TableView = require './table-view'
table = new Table
table.addColumn 'key'
table.addColumn 'value'
table.addColumn 'foo'
for i in [0...100]
table.a... | Destroy the demo view on core:cancel | Destroy the demo view on core:cancel
| CoffeeScript | mit | abe33/atom-tablr |
5a97521b0471f81a10f456af00ca9cd47457c076 | services/web/app/coffee/Features/SudoMode/SudoModeHandler.coffee | services/web/app/coffee/Features/SudoMode/SudoModeHandler.coffee | RedisWrapper = require('../../infrastructure/RedisWrapper')
rclient = RedisWrapper.client('sudomode')
logger = require('logger-sharelatex')
TIMEOUT_IN_SECONDS = 60 * 60
module.exports = SudoModeHandler =
_buildKey: (userId) ->
"SudoMode:{#{userId}}"
activateSudoMode: (userId, callback=(err)->) ->
if !userId... | RedisWrapper = require('../../infrastructure/RedisWrapper')
rclient = RedisWrapper.client('sudomode')
logger = require('logger-sharelatex')
TIMEOUT_IN_SECONDS = 60 * 60
module.exports = SudoModeHandler =
_buildKey: (userId) ->
"SudoMode:{#{userId}}"
activateSudoMode: (userId, callback=(err)->) ->
if !userId... | Fix typo in log message | Fix typo in log message
| CoffeeScript | agpl-3.0 | sharelatex/sharelatex |
25c047bd2d4e7a3ddabcf63a500aa94a415e67d9 | src/trix/input.coffee | src/trix/input.coffee | class Trix.Input
@events: "keydown keypress drop cut copy paste input".split(" ")
@keys:
0x08: "backspace"
0x0D: "return"
constructor: (@element, @responder) ->
for event in @constructor.events
@element.addEventListener(event, @[event], true)
keydown: (event) =>
if keyName = @constructor... | class Trix.Input
@events: "keydown keypress drop cut paste input".split(" ")
@keys:
0x08: "backspace"
0x0D: "return"
constructor: (@element, @responder) ->
for event in @constructor.events
@element.addEventListener(event, @[event], true)
keydown: (event) =>
if keyName = @constructor.keys... | Support copy, cut, and plain text pastes | Support copy, cut, and plain text pastes
| CoffeeScript | mit | ChenMichael/trix,basecamp/trix,GabiGrin/trix,basecamp/trix,ChenMichael/trix,urossmolnik/trix,basecamp/trix,GabiGrin/trix,urossmolnik/trix,urossmolnik/trix,basecamp/trix,GabiGrin/trix,ChenMichael/trix |
b06dc735da57998c349ba24419a5262c4995784a | www/client/user/controllers/login.coffee | www/client/user/controllers/login.coffee | angular.module 'keranbeandco.user'
.controller 'login', ($scope, $state, ImprovedUser) ->
$scope.login = ->
ImprovedUser.login
email: $scope.loginEmail
password: $scope.loginPassword
.$promise
.then () ->
$state.go 'home'
$scope.createUser = ->
ImprovedUser.create
firstName... | angular.module 'keranbeandco.user'
.controller 'login', ($scope, $state, ImprovedUser, $mdToast) ->
$scope.login = ->
ImprovedUser.login
email: $scope.loginEmail
password: $scope.loginPassword
.$promise
.then () ->
$state.go 'home'
$scope.createUser = ->
ImprovedUser.create
... | Add message when user created | Add message when user created
| CoffeeScript | mit | paulmolin42/keranbeandco,paulmolin42/keranbeandco,paulmolin42/keranbeandco |
a8be97844f96e589a875018a21ec25b3f4b41576 | src/scripts/helpers/handlers/analytics.coffee | src/scripts/helpers/handlers/analytics.coffee | define (require) ->
Backbone = require('backbone')
settings = require('settings')
# Class to handle loading analytics scripts and wrapping
# handlers around them so that modules don't have to
# interact with global variables directly
return new class AnalyticsHandler
constructor: () ->
# Setup te... | define (require) ->
Backbone = require('backbone')
settings = require('settings')
# Class to handle loading analytics scripts and wrapping
# handlers around them so that modules don't have to
# interact with global variables directly
return new class AnalyticsHandler
constructor: () ->
# Setup te... | Allow fragment to track to be specified | Allow fragment to track to be specified
| CoffeeScript | agpl-3.0 | Connexions/webview,dak/webview,dak/webview,dak/webview,katalysteducation/webview,Connexions/webview,Connexions/webview,katalysteducation/webview,carolinelane10/webview,Connexions/webview,katalysteducation/webview,katalysteducation/webview |
fe9422d1dbe0b48f4a7b231817231e0a36142a94 | models/mixins/relations/user.coffee | models/mixins/relations/user.coffee | _ = require 'underscore'
Backbone = require 'backbone'
{ API_URL } = require('sharify').data
module.exports =
related: ->
return @__related__ if @__related__?
CollectorProfile = require '../../collector_profile.coffee'
Location = require '../../location.coffee'
collectorProfile = new CollectorProfi... | _ = require 'underscore'
Backbone = require 'backbone'
{ API_URL } = require('sharify').data
module.exports =
related: ->
return @__related__ if @__related__?
CollectorProfile = require '../../collector_profile.coffee'
Location = require '../../location.coffee'
collectorProfile = new CollectorProfi... | Set up a `creditCards` relation on the User | Set up a `creditCards` relation on the User
| CoffeeScript | mit | mzikherman/force,xtina-starr/force,anandaroop/force,izakp/force,damassi/force,xtina-starr/force,kanaabe/force,xtina-starr/force,oxaudo/force,mzikherman/force,mzikherman/force,artsy/force-public,kanaabe/force,joeyAghion/force,dblock/force,artsy/force-public,erikdstock/force,anandaroop/force,cavvia/force-1,artsy/force,db... |
b8f60b0cb80857dea39169acca9bce98e35c52eb | app/assets/javascripts/bounties.js.coffee | app/assets/javascripts/bounties.js.coffee | # Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
$('body.bounties.index').ready ->
# Added a parser for the my-bounty input fields
$.fn.dataTable.ex... | # Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
$('body.bounties.index').ready ->
# Added a parser for the my-bounty input fields
$.fn.dataTable.ex... | Remove clutter from bounties page | Remove clutter from bounties page
| CoffeeScript | mit | ZeusWPI/gamification,ZeusWPI/gamification,ZeusWPI/gamification,ZeusWPI/gamification |
6ceb3fd6ea62d29abc44eb65861b34a8af14e70a | app/assets/javascripts/editable.js.coffee | app/assets/javascripts/editable.js.coffee | $ ->
$('span.editable').editable (value, settings) ->
$span = $(this)
url = $span.data('url')
data = {_method: 'PUT'}
data[$span.data('attribute')] = value
$.post(url, data)
value
, tooltip: 'Click to edit', indicator: 'Saving...', submitdata: {}
#$ ->
# $('body').on 'click', 'span.editab... | $ ->
$('span.editable').editable (value, settings) ->
$span = $(this)
data = {_method: 'PUT'}
data[$span.data('attribute')] = value
# TODO: We should handle failures and timeouts in POSTing, and make our own "Saving..." indicator.
$.post($span.data('url'), data)
value
, tooltip: 'Click to ed... | Clean up JS for editable. | Clean up JS for editable.
| CoffeeScript | mit | boochtek/DynamicDB,boochtek/DynamicDB,boochtek/DynamicDB |
285547bcfab12d441f52868b5e8ab1d6e6269934 | app/coffee/translations.coffee | app/coffee/translations.coffee | i18n = require("i18next")
_ = require("underscore")
path = require("path")
module.exports =
setup: (options) ->
subdomainLang = options?.subdomainLang || {}
availableLngs = _.pluck(_.values(subdomainLang), "lngCode")
i18n.init
resGetPath: path.resolve(__dirname,"../../", "locales/__lng__.json")
saveMiss... | i18n = require("i18next")
_ = require("underscore")
path = require("path")
module.exports =
setup: (options) ->
subdomainLang = options?.subdomainLang || {}
availableLngs = _.pluck(_.values(subdomainLang), "lngCode")
i18n.init
resGetPath: path.resolve(__dirname,"../../", "locales/__lng__.json")
saveMiss... | Split language out of domain by - or . | Split language out of domain by - or .
| CoffeeScript | mit | sharelatex/translations-sharelatex |
ddb2bf8a27691289acf77cedcd6895af712f3a98 | src/trix/core/logger.coffee | src/trix/core/logger.coffee | {forwardMethods} = Trix.Helpers
class Trix.Logger
loggers = {}
@get: (name) ->
loggers[name] ?= new Trix.Logger(console)
forwardMethods ofObject: console, onConstructor: this, toProperty: "console"
constructor: (@console, enabled) ->
@disable() unless enabled
enable: ->
if @disabledConsole? a... | {forwardMethods} = Trix.Helpers
class Trix.Logger
loggers = {}
@get: (name) ->
loggers[name] ?= new Trix.Logger(console)
forwardMethods ofObject: console, onConstructor: this, toProperty: "console"
constructor: (@console, enabled) ->
@disable() unless enabled
enable: ->
if @disabledConsole? a... | Patch IE's missing logging methods | Patch IE's missing logging methods
| CoffeeScript | mit | urossmolnik/trix,GabiGrin/trix,basecamp/trix,basecamp/trix,GabiGrin/trix,ChenMichael/trix,GabiGrin/trix,urossmolnik/trix,ChenMichael/trix,ChenMichael/trix,basecamp/trix,urossmolnik/trix,basecamp/trix |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.