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
// Singleton hash | |
var ScrollLock = { | |
elem: $('.admin-message .scroll-lock'), | |
isLocked: function() { | |
return this.elem.text() === "scroll on"; | |
}, | |
toggle: function() { | |
if (this.isLocked()) { | |
this.elem.text("scroll off"); | |
} else { |
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
# Rake task to run the server | |
desc "Start the server." | |
task "server", [:port, :use_local_ip_address] do |t, args| | |
default_port = "9000" | |
host = "localhost" | |
if args.use_local_ip_address | |
require 'socket' | |
host = UDPSocket.open {|s| s.connect("64.233.187.99", 1); s.addr.last} | |
end |
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
19538:debug: [82292] onHandshake: eAKK51mnZ-IPVgIHAABE | |
19539:info: handshake authorized eAKK51mnZ-IPVgIHAABE | |
19649:debug: setting request GET /socket.io/1/xhr-polling/eAKK51mnZ-IPVgIHAABE?t=1356088765614 | |
19652:debug: [82292] ## setHandlers: subscribe dispatch: eAKK51mnZ-IPVgIHAABE | |
19654:debug: [82292] onOpen: eAKK51mnZ-IPVgIHAABE | |
19655:debug: [82292] onOpen: eAKK51mnZ-IPVgIHAABE added to knownSockets | |
19659:debug: [82292] onConnect: eAKK51mnZ-IPVgIHAABE | |
19660:debug: [82292] onHandshake: eAKK51mnZ-IPVgIHAABE | |
19662:debug: [82292] onHandshake: eAKK51mnZ-IPVgIHAABE | |
19663:debug: [82292] onJoin: eAKK51mnZ-IPVgIHAABE, name = |
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
debug: [10354] client authorized | |
debug: [10354] onHandshake: CV-HEdiWGPBMacUbAAAA | |
info: handshake authorized CV-HEdiWGPBMacUbAAAA | |
debug: [10353] onHandshake: CV-HEdiWGPBMacUbAAAA | |
debug: [10351] onHandshake: CV-HEdiWGPBMacUbAAAA | |
debug: setting request GET /socket.io/1/xhr-polling/CV-HEdiWGPBMacUbAAAA?t=1356100348265 | |
debug: [10353] ## setHandlers: subscribe dispatch: CV-HEdiWGPBMacUbAAAA, closed: undefined | |
debug: setting poll timeout | |
debug: [10353] onOpen: CV-HEdiWGPBMacUbAAAA | |
debug: [10353] onOpen: CV-HEdiWGPBMacUbAAAA added to knownSockets |
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
debug: [10352] onDisconnect: Q9ol7xzr6m1GC9t9AAAA, local = undefined | |
debug: [10352] ## onDisconnect: unsubscribe dispatch: Q9ol7xzr6m1GC9t9AAAA | |
debug: [10352] client authorized | |
debug: [10352] onHandshake: Ql6sZXeBsdMvINU2AAAA | |
info: handshake authorized Ql6sZXeBsdMvINU2AAAA | |
debug: [10354] onHandshake: Ql6sZXeBsdMvINU2AAAA | |
debug: [10351] onHandshake: Ql6sZXeBsdMvINU2AAAA | |
debug: [10353] onHandshake: Ql6sZXeBsdMvINU2AAAA | |
debug: setting request GET /socket.io/1/xhr-polling/Ql6sZXeBsdMvINU2AAAA?t=1356100402819 | |
debug: [10351] ## setHandlers: subscribe dispatch: Ql6sZXeBsdMvINU2AAAA, closed: undefined |
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
require "time" | |
# Get the week range for the given year. | |
# Note, week starts from Monday, as per "%W" of http://ruby-doc.org/stdlib-1.9.3/libdoc/date/rdoc/Date.html#method-i-strftime | |
def week_range(year) | |
start_week = 1 | |
last_day_of_year = Time.parse("#{year}-12-31") | |
end_week = (last_day_of_year.strftime("%V") == "53") ? 53 : 52 |
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
class XClass | |
def initialize(val = nil) | |
@x = val | |
end | |
def x | |
@x | |
end | |
def x=(val) |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>comment</key> | |
<string>JavaScript Syntax: version 2.0</string> | |
<key>fileTypes</key> | |
<array> | |
<string>js</string> | |
<string>htc</string> |
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
/*global module:false*/ | |
module.exports = function (grunt) { | |
'use strict'; | |
// For livereload | |
var path = require('path'); | |
var lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet; | |
var folderMount = function folderMount(connect, point) { | |
return connect.static(path.resolve(point)); |
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
/*global $:false, window:false */ | |
/** | |
* Load google maps asynchonously and return a function | |
* to wrap around a callback function for when google | |
* maps finishes loading. | |
* | |
* Note: need to load jQuery 1.5+ before this module | |
* is loaded. | |
* |