Skip to content

Instantly share code, notes, and snippets.

View julien51's full-sized avatar

Julien Genestoux julien51

View GitHub Profile
$.superfeedr.options.login = 'superfeedr';
$.superfeedr.options.key = '1a8c661804873703802212503e75d3c2';
var feed = new $.superfeedr.Feed('http://blog.superfeedr.com/atom.xml');
feed.load({count: 5}, function(result) {
if (!result.error) {
var container = document.getElementById("feed");
for (var i = 0; result.feed.items.length > i ; i++) {
var entry = result.feed.items[i];
@julien51
julien51 / gist:8003219
Created December 17, 2013 11:01
prosody.log
Dec 17 05:56:18 c2sbf4210 debug Client sent opening <stream:stream> to superfeedr.com
Dec 17 05:56:18 c2sbf4210 debug Sent reply <stream:stream> to client
Dec 17 05:56:18 c2sbf4210 debug Received[c2s_unauthed]: <auth mechanism='DIGEST-MD5' xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
Dec 17 05:56:18 modulemanager debug Passing stanza to mod_saslauth
Dec 17 05:56:18 superfeedr.com:saslauth debug sasl reply: <challenge xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>cmVhbG09InN1cGVyZmVlZHIuY29tIixub25jZT0iNTdmYjRiNjMtOWEzZi00OWRjLWI1ODAtMzBmMjQ0YjQ4NzdlIixxb3A9ImF1dGgiLGNoYXJzZXQ9dXRmLTgsYWxnb3JpdGhtPW1kNS1zZXNz</challenge>
Dec 17 05:56:18 c2sbf4210 debug Received[c2s_unauthed]: <response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
Dec 17 05:56:18 modulemanager debug Passing stanza to mod_saslauth
Dec 17 05:56:18 datamanager debug Failed to load accounts storage ('cannot open /var/lib/prosody/superfeedr%2ecom/accounts/demo.dat: No such file or directory') for user: demo@super
curl -D- https://push.superfeedr.com/ \
-X GET \
-u demo:demo \
-d'hub.mode=list' \
-d'hub.callback=https://mydomain.tld/push/tech/%' \
-d'page=2'
window.addEventListener("message", function(event) {
if (event.origin !== "https://www.subtome.com")
return;
// do something with event.data.subscription
});
$ curl -D- https://push.superfeedr.com/ \
-X POST \
-u demo:demo \
-d'hub.mode=subscribe' \
-d'hub.topic=http://push-pub.appspot.com/feed' \
-d'hub.callback=http://mycallback.tld/ok' \
-d'retrieve=true'
HTTP/1.1 200 OK
X-Powered-By: Express
julien$ curl -X POST http://push.superfeedr.com -udemo:demo -d'hub.mode=subscribe' -d'hub.topic=http://push-pub.appspot.com/feed' -d'hub.callback=http://chef.superfeedr.com:8089/ok' -d'retrieve=true' -D-
HTTP/1.1 200 OK
X-Powered-By: Express
Content-Type: application/atom+xml
PubSubHubbub-Version: 0.3
Content-Length: 5228
Date: Wed, 13 Nov 2013 21:32:21 GMT
Connection: close
<?xml version="1.0" encoding="UTF-8"?><feed xmlns="http://www.w3.org/2005/Atom"><status feed="http://push-pub.appspot.com/feed" xmlns="http://superfeedr.com/xmpp-pubsub-ext"><http code="200">Fetched (ping) 200 43200 and parsed 1/20 entries</http><next_fetch>2013-11-14T09:24:50Z</next_fetch><period>43200</period><last_fetch>2013-11-13T21:24:50Z</last_fetch><last_parse>2013-11-13T21:24:50Z</last_parse><last_maintenance_at>2013-11-13T20:13:53Z</last_maintenance_at></status><title>Publisher example</title><entry xmlns="http://www.w3.org/2005/Atom" xmlns:geo="http://www.georss.org/georss" xmlns:as="http://activitystrea.ms/spec/1.0/" xmlns:sf=
@julien51
julien51 / gist:7103349
Last active December 26, 2015 05:49
I asked Paypal to delete my account. These are the emails I get.
Dear ,
Thank you for contacting us. This email is an automatic message. Based on the options you selected, we believe that the information below may be helpful:
A. How do I add, change, or remove a phone number?
B. How do I add, change, or remove a street address?
C. How do I add, change, or make an email address primary?
If you didn't receive a satisfactory answer to your question, please reply to this email and one of our Customer Service representatives will contact you directly as soon as possible.
// If your goal is to replace the 'SUBSCRIBE TO UPDATES' links, with the button, just find instances of:
<a href="http://matthewbogart.net/subscribe">SUBSCRIBE TO UPDATES</a>
// and replace with
<input type="button" onclick="(function(){var z=document.createElement('script');z.src='https://www.subtome.com/load.js';document.body.appendChild(z);})()" value="Follow for Updates">
// Feel fre to let me know about issues in the comments.

I'd argue it does removes steps and make things easier/clearer

Compare following your feed to following you on Twitter. Since you do not expose the feed itself (which is good!), if someone wants to follow your feed, they have to guess that they need to copy your main url, open their feed reader of choice and paste the url in the right spot. They also have to hope that their feed reader of choice is smart enough to find the feed url (not always the case).

With SubToMe, they just have to click buttons and the intent is clear!

@julien51
julien51 / gist:6094443
Last active December 20, 2015 07:39
Moving RSS Forward. Ipost here, because I don't want to post it under Superfeedr's blog. These are *my* ideas :)

Improving RSS feeds. Her's my response to Dave Winer's post about moving RSS forward.

Generally, I think we should simplify to the maximum and allow for easier, more common use cases.

  1. JSON feeds. Many many web devs are scared (rightfully or not!) by XML tags. Let's make sure JSON is also a way to go.
  2. Only a permalink per item. It may sound counter intuitive, but many readers already only care about the permalink and will fetch the related page to extrat title, content, images, authors... etc, using microformats or the HTML itself. Why not then reduce a feed to just a 'list' of links?
  3. Easing subscriptions for end users. Of coure we came up with SubToMe, but there are obviously more ways, as long as it's as easy to follow a feed on the web than it is to follow someon Twitter or G+!