This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define(function () { | |
var UA = { | |
reset: function(navigator) { | |
return this._parse(navigator); | |
}, | |
is: {}, | |
set: function(browser, version, os) { | |
os = os || ''; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<style type="text/css"> | |
@-webkit-keyframes spin{ | |
from{ | |
-webkit-transform:rotate(0deg); | |
} | |
to{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<style type="text/css"> | |
@-webkit-keyframes spin{ | |
from{ | |
-webkit-transform:rotate(0deg); | |
} | |
to{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define [ | |
'underscore' | |
], (_) -> | |
# Adapted from ... | |
# http://carrierwave.rubyforge.org/rdoc/classes/CarrierWave/RMagick.html | |
class CrackRock | |
constructor: ({@url, @width, @height}) -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define -> | |
isPromise = (x) -> | |
(typeof x in ['object', 'function']) and x isnt null and typeof x.then is 'function' | |
# From Backbone@1.1.0 | |
eventSplitter = /\s+/ | |
eventsApi = (obj, action, name, rest) -> | |
if not name then return true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define -> | |
BUFFER: | |
ELEMENT: 'element' | |
PADDING: 'padding' | |
CHAT_TEXT: | |
NO_AGENTS: 'No agents are currently available' | |
NO_CHATID: 'This ChatID does not exist' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http/proxy.coffee ... | |
#!/usr/bin/env coffee | |
httpProxy = require 'http-proxy' | |
options = | |
router: | |
'localhost/static/assets(.*)': 'localhost:8888' | |
'localhost(?!\/static\/assets(.*))': 'localhost:5000' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define(function () { | |
var UA = { | |
reset: function() { | |
return this._parse(); | |
}, | |
is: {}, | |
set: function(browser, version, os) { | |
os = os || ''; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define [ | |
'underscore' | |
'utility/winman' | |
'models/model' | |
], (_, Winman, Model) -> | |
class Context extends Model | |
create: (attrs, options={}) -> | |
options.winman ?= @winman |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define [ | |
'json2' | |
'useragent' | |
'underscore' | |
'cookie' | |
'store' | |
], (JSON, UA, _, Cookie, store) -> | |
domain = window.location.hostname.replace('www.', '') | |
expires = 60 * 60 * 24 * 30 |