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
javascript: (function () { | |
var el = document.createElement('pre'), | |
b = document.getElementsByTagName('body')[0], | |
otherjQuery = false, | |
msg = '', | |
libs = [ | |
function loadjQuery() { | |
if (typeof jQuery != 'undefined') { | |
showMsg('This page already using jQuery v' + jQuery.fn.jquery); | |
} 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
# Tell the order of outputs into the console. | |
# window.pingAJAX() is asyncronous function that takes ~10 sec to execute | |
draw = (cb) -> | |
b = 10 | |
console.log 'A' | |
a = b + 15 | |
window.pingAJAX -> | |
c = 531 |
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
####################################################### | |
# Error 0 - medium often - !!! Critical !!! - screws each client's data | |
####################################################### | |
ERROR: CORRUPT DATA DETECTED in document games.3d2a3281-e764-4c0a-b449-d2c56477cff6 | |
If you're using redis, delete data for document. Please file an issue if you can recreate this state reliably. | |
Trace: Internal data corruption - cannot submit | |
at /home/ubuntu/www/idg_v2/production/releases/20140915171800/node_modules/share/lib/server/session.js:665:19 | |
at /home/ubuntu/www/idg_v2/production/releases/20140915171800/node_modules/share/lib/server/useragent.js:409:23 | |
at /home/ubuntu/www/idg_v2/production/releases/20140915171800/node_modules/livedb/lib/index.js:261:18 |
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
page.model.socket?.onerror = (message, errCode) -> | |
if message not in ['Unknown session ID', 'Request failed'] | |
app.postError new Error message, {source: 'model-socket-error'} | |
page.model.shareConnection?.on 'error', (e) -> | |
app.postError e, {source: 'model-share-error'} | |
page.model.on 'error', (e) -> | |
app.postError e, {source: 'model-error'} | |
if e.message && e.message.indexOf('403') != -1 |
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
#modal-login | |
._header | |
._main | |
.cool-form | |
form | |
._email | |
._password | |
._join | |
br | |
._or |
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
{ | |
"name": "derby-auth-example", | |
"description": "", | |
"version": "0.0.0", | |
"main": "./server.js", | |
"dependencies": { | |
"derby": "0.5.12", | |
"derby-ui-boot": "*", | |
"livedb-mongo": "~0.3.0", | |
"racer-browserchannel": "~0.1.1", |
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
ALLOWED_COLLECTIONS = [ | |
'auths' # Private user data | |
] | |
store.allow 'create', 'auths', (docId, newDoc, session) -> | |
console.log '[Auths] CREATE' | |
undefined | |
store.allow 'all', 'auths.*', (docId, relPath, opData, docBeingUpdated, session) -> | |
console.log '[Auths] CHANGE' |
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
// Somewhere in the /lib/app | |
derby = require('derby'); | |
app = require('./index.js'); | |
if(derby.util.isServer) { | |
fnEval = "(function(){" | |
+ "return function() {" | |
+ "window.NODE_ENV = \'" + (process.env.NODE_ENV || 'development') + "\';" | |
+ "window.APP = \'" + (process.env.APP || 'myapp') + "\';" |
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
// ------------------------------------- | |
// Main Component | |
// ------------------------------------- | |
.tabs | |
+pie-clearfix | |
> li, > ._tab | |
float: left |