This file contains hidden or 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
| var express = require('express'); | |
| var everyauth = require('everyauth'); | |
| var config = require('./config.js'); | |
| var jqtpl = require('jqtpl'); | |
| everyauth.debug = true; | |
| var usersById = {}; | |
| everyauth |
This file contains hidden or 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
| everyauth | |
| .myHostname('http://local.host:3000') | |
| .appId(conf.fb.appId) | |
| .appSecret(conf.fb.appSecret) | |
| .findOrCreateUser( function (session, accessToken, accessTokenExtra, fbUserMetadata) { | |
| return usersByFbId[fbUserMetadata.id] || | |
| (usersByFbId[fbUserMetadata.id] = fbUserMetadata); |
This file contains hidden or 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
| everyauth | |
| .myHostname('http://local.host:3000') | |
| .appId(conf.fb.appId) | |
| .appSecret(conf.fb.appSecret) | |
| .findOrCreateUser( function (session, accessToken, accessTokenExtra, fbUserMetadata) { | |
| return usersByFbId[fbUserMetadata.id] || | |
| (usersByFbId[fbUserMetadata.id] = fbUserMetadata); |
This file contains hidden or 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
| everyauth | |
| .myHostname('http://'+config.host+':'+config.port) | |
| .appId("180068492046726") | |
| .appSecret("d0100e9902dfbed25eb3e92a2671ad0b") | |
| .findByUser(function(userId, callback) { | |
| callback(null, usersByFbId[userId].username); | |
| }) | |
| .findOrCreateUser( function (session, accessToken, accessTokenExtra, fbUserMetadata) { |
This file contains hidden or 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
| var jGrid = { | |
| color:'red', | |
| }; | |
| $('body').dblclick(function(e) { | |
| if(e.shiftKey) | |
| $('<span>|</span>').appendTo('body').css({'height':'1px', 'background-color':'red','position':'absolute', 'width':'100%', 'top':e.pageY+'px'}); | |
| else | |
| $('<span>|</span>').appendTo('body').css({'height':'100%', 'background-color':'red','position':'absolute', 'width':'1px', 'left':e.pageX+'px', 'top':'0'}); |
This file contains hidden or 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
| rm -Rf instance | |
| mkdir instance | |
| cd instance | |
| twinstance tiddlydocs_deploy |
This file contains hidden or 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
| twanager recipe tiddlydocs4<<EOF | |
| /bags/system/tiddlers | |
| /bags/tdocs/tiddlers | |
| /bags/documents/tiddlers | |
| EOF |
This file contains hidden or 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
| twanager recipe tiddlydocs3 <<EOF | |
| desc: | |
| policy: { "read": [], "create": [], "manage": [], "write": [], "owner": null, "delete": [] } | |
| /bags/system/tiddlers | |
| /bags/tdocs/tiddlers | |
| /bags/documents/tiddlers | |
| EOF |
NewerOlder