Skip to content

Instantly share code, notes, and snippets.

@russellbeattie
russellbeattie / A-Pen-by-Russell-Beattie.markdown
Created September 29, 2013 17:38
A Pen by Russell Beattie.
package feeds
var Ns = map[string]string{
// via http://feed2.w3.org/docs/howto/declare_namespaces.html
"http://a9.com/-/spec/opensearch/1.1/": "opensearch",
"http://a9.com/-/spec/opensearchrss/1.0/": "opensearch10",
"http://backend.userland.com/blogChannelModule": "blogChannel",
"http://backend.userland.com/creativeCommonsRSSModule": "creativecommons",
"http://backend.userland.com/creativeCommonsRssModule": "creativeCommons",
@russellbeattie
russellbeattie / check_free_io.py
Created May 10, 2013 09:23
Cranks up the number of simultaneous requests, but nic.io just barfs at you after a short while.
# works on my machine... OS X 10.8.2, Python v2.7.3
import sys
import subprocess
import multiprocessing
def checkName(q):
proc_name = multiprocessing.current_process().name
@russellbeattie
russellbeattie / google_reader_bundle_subs.opml
Created May 9, 2013 05:06
Added all 449 "Bundles" that Google Reader provides, plus their 27 "featured bundles" from famous people, and then added some top feeds that were the result of searches for a few keywords.
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Google Reader Bundles</title>
</head>
<body>
<outline title="Media Center" text="Media Center">
<outline text="Charlie Owen" title="Charlie Owen" type="rss"
xmlUrl="http://blog.retrosight.com/SyndicationService.asmx/GetRss" htmlUrl="http://blog.retrosight.com/"/>
<outline text="Chris Lanier" title="Chris Lanier" type="rss"
@russellbeattie
russellbeattie / update_git_dirs.sh
Created April 28, 2013 23:18
I have a directory where I clone interesting github repos - here's quick script to update them all at once.
p=`pwd`
for dirname in `find . -type d -maxdepth 1 -mindepth 1`
do
if [ -d $dirname/.git ]
then
cd $dirname
echo `pwd`
git pull origin master
fi
cd $p
108.168.196.50 - - [21/Apr/2013:08:37:05 -0700] "GET /robots.txt HTTP/1.1" 200 558 "-" "Mozilla/5.0 (compatible; Wazzup1.0.7287; http://50.22.201.16/Wazzup)"
108.168.196.50 - - [21/Apr/2013:08:37:05 -0700] "GET /blog/ HTTP/1.1" 200 21409 "-" "Mozilla/5.0 (compatible; Wazzup1.0.9791; http://50.22.201.16/Wazzup)"
108.168.196.50 - - [21/Apr/2013:10:59:17 -0700] "GET /robots.txt HTTP/1.1" 200 558 "-" "Mozilla/5.0 (compatible; Wazzup1.0.9669; http://50.22.201.16/Wazzup)"
108.168.196.50 - - [21/Apr/2013:10:59:17 -0700] "GET /blog/ HTTP/1.1" 200 21409 "-" "Mozilla/5.0 (compatible; Wazzup1.0.5058; http://50.22.201.16/Wazzup)"
108.168.196.50 - - [21/Apr/2013:10:59:17 -0700] "GET /blog/js/libs/jquery-1.6.2.js HTTP/1.1" 200 236202 "-" "Mozilla/5.0 (compatible; Wazzup1.0.4495; http://50.22.201.16/Wazzup)"
108.168.196.50 - - [21/Apr/2013:10:59:18 -0700] "GET /blog/js/libs/highlight.pack.js HTTP/1.1" 200 27566 "-" "Mozilla/5.0 (compatible; Wazzup1.0.3834; http://50.22.201.16/Wazzup)"
108.168.196.50 - - [21/Apr/2013:10:59:1
@russellbeattie
russellbeattie / pubsubhubbub.txt
Last active April 8, 2016 19:32
Pubsubhubbub urls from of 50k feeds
Wordpress hubs are formatted like this: http://www.example.com/?pushpress=hub
17605 http://pubsubhubbub.appspot.com/
1493 http://hubbub.api.typepad.com/
797 http://tumblr.superfeedr.com/
185 http://superfeedr.com/hubbub
144 http://pubsubhubbub.appspot.com
103 http://posterous.superfeedr.com
103 http://www.pheedo.com/api/hub/
Namespaces:
http://backend.userland.com/rss2
http://drupal.org/project/og
http://meo.pt/feed
http://my.netscape.com/rdf/simple/0.9/
http://pipes.yahoo.com
http://purl.org/atom-blog/ns#
http://purl.org/atom/ns#
http://purl.org/rss/1.0/
var utils = require('../utils.js'),
pg = require('pg').native,
http = require('http'),
httpreq = require('./httpreq.js'),
async = require('async'),
events = require('events'),
lodash = require('lodash');
var app = new events.EventEmitter();
package main
import (
_ "github.com/bmizerany/pq"
"database/sql"
"net/http"
"log"
"net"
"time"
"strconv"