Skip to content

Instantly share code, notes, and snippets.

View simonmcmanus's full-sized avatar

Simon McManus simonmcmanus

View GitHub Profile
twanager recipe tiddlydocs3 <<EOF
desc:
policy: { "read": [], "create": [], "manage": [], "write": [], "owner": null, "delete": [] }
/bags/system/tiddlers
/bags/tdocs/tiddlers
/bags/documents/tiddlers
EOF
twanager recipe tiddlydocs4<<EOF
/bags/system/tiddlers
/bags/tdocs/tiddlers
/bags/documents/tiddlers
EOF
rm -Rf instance
mkdir instance
cd instance
twinstance tiddlydocs_deploy
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'});
everyauth
.facebook
.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) {
everyauth
.facebook
.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);
everyauth
.facebook
.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);
var express = require('express');
var everyauth = require('everyauth');
var config = require('./config.js');
var jqtpl = require('jqtpl');
everyauth.debug = true;
var usersById = {};
everyauth
/*
Dear Twitter,
According to your docs (https://dev.twitter.com/docs/rate-limiting) users authenticated with oAuth should see a rate limit of 350 requests per hours against the REST API.
Unfortunately despite trying numerous libraries (as suggested in your docs) I have been unable to acieheve this limit.
I only ever see 150. I have read many of the discussions on the forum which suggest that my oAuth authorisation has not been sucessful. I can however see that the rate limit is not shared accross other users on my IP, each user that logs in gets 150 request per hour. The x-warning field is also never present in the returned data. This suggests to me that my users have sucessfully logged in.
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title>RSS Example</title>
<description>This is an example of an RSS feed</description>
<link>http://www.domain.com/link.htm</link>
<lastBuildDate>Mon, 28 Aug 2006 11:12:55 -0400 </lastBuildDate>
<pubDate>Tue, 29 Aug 2006 09:00:00 -0400</pubDate>