Skip to content

Instantly share code, notes, and snippets.

@russellbeattie
russellbeattie / twitterfeed.php
Created October 16, 2012 10:08
Twitter stream as a feed in Atom format (using oauth)
<?
/**
* twitterfeed.php
*
* A single file script which serves an authenticated personal Twitter timeline as an Atom feed.
*
* To use:
* 1) Go to https://dev.twitter.com/apps and create a new App
* 2) Use the Authentication button to create the tokens/secrets needed
* 3) Copy the results into the appropriate spots below
@russellbeattie
russellbeattie / io-domains.txt
Last active December 12, 2015 10:39
List of interesting (non-blog or useless) .io domains
http://action.io
http://add.io
http://adstage.io
http://airbrake.io
http://animation.io
http://ansr.io
http://apc.io
http://apiary.io
http://apis.io
http://appetite.io
@russellbeattie
russellbeattie / check_free_io.py
Last active December 13, 2015 22:08
script to check free real word .io domains
# works on my machine... OS X 10.8.2, Python v2.7.3
import sys
import subprocess
wordlist = 'words.txt'
if len(sys.argv) > 1:
wordlist = sys.argv[1]
@russellbeattie
russellbeattie / check_active_io.py
Created February 20, 2013 07:22
Script to check .io domains to see if they're being used for anything... Works through a word list, checks to see if it's just being redirected or not, then if not, prints out the domain and title of the page (which could give a clue to what it's used for).
# works on my machine... OS X 10.8.2, Python v2.7.3
# use the wordlist here: https://gist.github.com/russellbeattie/4982393#file-words-txt
import sys
import subprocess
import re
import urllib2
wordlist = 'words.txt'
@russellbeattie
russellbeattie / colorOutput.js
Created March 18, 2013 02:54
Function to color the output in Node.js console.log() . I didn't realize until after I wrote this that utils.inspect sorta does the same thing.
function colorOutput(text, color){
color = color.toLowerCase();
var colors = {
'black':'0;30',
'dgray':'1;30',
'lgray':'0;37',
'blue':'0;34',
'lblue':'1;34',
package main
import (
_ "github.com/bmizerany/pq"
"database/sql"
"net/http"
"log"
"net"
"time"
"strconv"
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();
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/
@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/
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