Skip to content

Instantly share code, notes, and snippets.

git push heroku master
Counting objects: 434, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (382/382), done.
Writing objects: 100% (434/434), 296.06 KiB | 128 KiB/s, done.
Total 434 (delta 44), reused 0 (delta 0)
-----> Heroku receiving push
-----> Node.js app detected
-----> Fetching Node.js binaries
var Superfeedr = require('superfeedr').Superfeedr;
client = new Superfeedr("login", "password");
client.on('connected', function() {
client.subscribe("http://blog.superfeedr.com/atom.xml", function(err, feed) {
// console.log(feed);
// { url: 'http://blog.superfeedr.com/atom.xml',
// title: 'Superfeedr Blog : Real-time cloudy thoughts from a super-hero',
// httpCode: 200,
// httpStatus: '37345B in 0.602513587s, 0/10 new entries',
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<script>
var indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
var IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction; // No prefix in moz
var dbRequest = indexedDB.open("test", "");
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<script>
var indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
var IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction; // No prefix in moz
var dbRequest = indexedDB.open("test", "");
var xmpp = require('../lib/node-xmpp');
var sys = require("sys");
var redis = require("redis-node");
var redispub = redis.createClient();
var redissub = redis.createClient();
var port = parseInt(process.argv[process.argv.length - 1]);
if(isNaN(port)) {
console.log("You need to supply a port!")
@superfeedr
superfeedr / notifier.js
Created August 18, 2011 21:50
Chrome Application Airbrake Notifier
/**
CONFIGURATION:
// Set your Airbrake API key here [REQ]
AirbrakeNotifier.setKey("XXXX");
// Set the environment. [OPT]
AirbrakeNotifier.setEnvironment("development");
// Set the app version [OPT]
AirbrakeNotifier.setAppVersion("1.3.3.7");
#encoding: UTF-8
require 'nokogiri'
class MyParser < Nokogiri::XML::SAX::Document
def initialize(&callback)
@callback = callback
@buffer = ""
@parser = Nokogiri::XML::SAX::PushParser.new(self, "UTF-8")
@superfeedr
superfeedr / gist:943261
Created April 26, 2011 21:48
sample.xml
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:geo="http://www.georss.org/georss" xmlns:as="http://activitystrea.ms/spec/1.0/">
<status xmlns="http://superfeedr.com/xmpp-pubsub-ext" feed="http://gdata.youtube.com/feeds/api/users/sf4answers/favorites?v=2" digest="false">
<http code="200">36927B in 0.266437374s, 6/6 new entries</http>
<next_fetch>2011-04-27T09:47:55Z</next_fetch>
<title>Favorites of sf4answers</title>
<entries_count_since_last_maintenance>6</entries_count_since_last_maintenance>
<period>43200</period>
<last_fetch>2011-04-26T21:47:55Z</last_fetch>
<last_parse>2011-04-26T21:47:55Z</last_parse>
=CRASH REPORT==== 23-Apr-2011::09:31:51 ===
crasher:
initial call: application_master:init/4
pid: <0.35.0>
registered_name: []
exception exit: {bad_return,
{{ejabberd_app,start,[normal,[]]},
{'EXIT',
{noproc,
{gen_server,call,
=INFO REPORT==== 2011-04-23 09:31:51 ===
application: ejabberd
exited: {bad_return,
{{ejabberd_app,start,[normal,[]]},
{'EXIT',
{noproc,
{gen_server,call,
[ejabberd_sup,
{start_child,
{'ejabberd_odbc_sup_xxxxx.tld',