Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" >
$('img.avatar').css('-webkit-transform','matrix(1, 0, 0, -1, 0, 0)');
@superfeedr
superfeedr / curl.log
Created October 9, 2012 08:24
How can I get a 304 from Github?
$ curl 'https://github.com/julien51.atom' -I
HTTP/1.1 200 OK
Server: nginx
Date: Tue, 09 Oct 2012 08:23:19 GMT
Content-Type: application/atom+xml; charset=utf-8
Connection: keep-alive
Status: 200 OK
Cache-Control: private, max-age=0, must-revalidate
X-Runtime: 35
X-Frame-Options: deny
// Ideal OAuth 2 (may be insane, impractical), also, lots of default behavior, all customizable, of course by some mechanism of your choice
app.get('/my-protected-resource', passport.authenticate('mechanism'), function(req, res, end) {
// Do stuff that requires to be logged in
});
// Now the middleware does all the hard work: redirect to the oauth provider of choice (or to a 'dummy' page where the user can choice theirs and then to it, handle the dance, add all the required information to the session, and finally redirect the user to /my-protected-resource when the user was eventually logged in! How does that sound?
If your Paypal form stopped working, just use https://securepayments.paypal.com/cgi-bin/acquiringweb rather than https://www.paypal.com/cgi-bin/acquiringweb
<script>
function subscribe() {
var intent = new WebKitIntent("http://webintents.org/subscribe", "application/atom+xml", "http://blog.superfeedr.com/atom.xml");
window.navigator.webkitStartActivity(intent, onSuccess, onError);
}
</script>
<button onclick="subscribe();">Follow me in your favorite Subscription app!</button>
<entry>
<summary>soundtracking "Until We Bleed" by Andreas Kleerup (@ Oola Restaurant & Bar)
</summary>
<as:actor>
<name>Jean Sini</name>
<uri>http://www.facebook.com/jeansini</uri>
<as:object-type>person</as:object-type>
<link type="image/jpg" href="http://profile.ak.fbcdn.net/hprofile-ak-snc4/372771_500970301_1103593527_q.jpg" rel="avatar"/>
</as:actor>
<as:verb>listen</as:verb>
"intents": {
"http://webintents.org/subscribe": [{
"title": "Subscribe with Msgboy",
"type": ["application/atom+xml", "application/rss+xml"],
"href": "/views/html/subscribe.html",
"disposition": "window"
}]
}
<button onclick="share();">Share</button>
<script>
function share() {
var intent = new WebKitIntent("http://webintents.org/share", "text/uri-list", this.urlToShare);
var onSuccess = function(data) {
// Successful sharing
};
var onError = function(data) {
// User canceled sharing
};
<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="http://superfeedr.com/xmpp-pubsub-ext">
<id>http://itunes.apple.com/us/album/up-all-night-deluxe-edition/id515161102?uo=2</id>
<published>2012-05-25T13:56:11+00:00</published>
<updated>2012-05-25T13:56:11+00:00</updated>
<title>Up All Night (Deluxe Edition) - Kip Moore</title>
<summary type="text"/>
<content type="html">&lt;table border="0" width="100%"&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;table border="0" width="100%" cellspacing="0" cellpadding="0"&gt;