Skip to content

Instantly share code, notes, and snippets.

View julien51's full-sized avatar

Julien Genestoux julien51

View GitHub Profile
<script>window.subtome = {suggestedUrl: 'http://www.newsblur.com/?url={url}', suggestedName: 'NewsBlur'}; </script>
$ curl "http://subtome.com" --verbose
* About to connect() to subtome.com port 80 (#0)
* Trying 217.70.184.38...
* connected
* Connected to subtome.com (217.70.184.38) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8r zlib/1.2.5
> Host: subtome.com
> Accept: */*
>
@julien51
julien51 / push.js
Last active December 18, 2015 04:19
var request = require('request');
// app below needs to be a Connect/Express app.
// Subscribing: use https://push.superfeedr.com/ to use Superfeedr (works with any feed!)
function subscribe(url, conf, cb) {
var hub = conf.hub;
var params = {
method: 'POST',
uri: hub,
#!/bin/bash
HOSTNAME="${COLLECTD_HOSTNAME:-`hostname -f`}"
INTERVAL="${COLLECTD_INTERVAL:-10}"
while sleep "$INTERVAL"
do
info=$(curl http://myriak/stats -H "accept: text/plain")
@julien51
julien51 / gist:5607627
Created May 19, 2013 13:29
Using #SubToMe with #Fever:
Open the following url in a browser tab:
https://www.subtome.com/register.html?name=Fever&url=<urlencoded handler>
where the handler is like "http://__fever-domain__/?feedlet&url={url}"
You should see Fever in the list of options on https://www.subtome.com/settings.html
<input type="button" onclick="(function(){var z=document.createElement('script');z.src='https://www.subtome.com/load.js';document.body.appendChild(z);})()" value="Subscribe To Blorpy!" style="position: fixed;top: 3px;z-index: 10000;color: #fff; border: 1px solid rgba(0,0,0,0.18); background: #3e3e3e; background: rgba(0,0,0,0.38); text-shadow: 1px 1px 0 rgba(0,0,0,0.08);border-radius: 2px; white-space: nowrap; outline: 0; text-decoration: none; cursor: pointer; overflow: hidden; text-overflow: ellipsis; font: 600 12px/18px &quot;Helvetica Neue&quot;,&quot;HelveticaNeue&quot;,Helvetica,Arial,sans-serif; height: 20px; padding: 0 5px; -webkit-font-smoothing: antialiased; -webkit-user-select: none;right: 162px;">
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" />
<xsl:variable name="title" select="/rss/channel/title"/>
<xsl:template match="/">
<html>
<head>
<title><xsl:value-of select="$title"/> (full-text feed)</title>
<script type="text/javascript" src="subscribe.js"></script>
@julien51
julien51 / load.js
Last active December 13, 2015 17:19
(function() {
var feeds = [];
var links = document.getElementsByTagName('link');
for(var i = 0; i < links.length; i++) {
if(links[i].rel) {
if(links[i].rel.split(' ').indexOf('alternate') >= 0) {
if(links[i].href && links[i].href.length > 0) {
feeds.push(encodeURIComponent(links[i].href));
}
}
<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://push-pub.appspot.com/feed/670002</id>
<published>2013-02-09T22:17:53Z</published>
<updated>2013-02-09T22:17:53Z</updated>
<title>Superfeedr's track feature</title>
<content>is nice when it quotes the source :)</content>
<link title="Superfeedr's track feature" rel="alternate" href="http://push-pub.appspot.com/entry/670002" type="text/html" />
<source>
<id>http://push-pub.appspot.com/feed</id>
<title>Publisher example</title>
<message from="firehoser.superfeedr.com" to="[email protected]" >
<event xmlns="http://jabber.org/protocol/pubsub#event">
<status xmlns="http://superfeedr.com/xmpp-pubsub-ext" feed="http://superfeedr.com/track?include=superfeedr" >
<http code="200" >Track feed</http>
<next_fetch>2009-03-31T02:25:05Z</next_fetch>
<entries_count_since_last_maintenance>0</entries_count_since_last_maintenance>
<period>900</period>
<last_fetch>2009-03-31T02:25:05Z</last_fetch>
<last_parse>2009-03-31T02:25:05Z</last_parse>
<last_maintenance_at>2009-03-31T02:25:05Z</last_maintenance_at>