Skip to content

Instantly share code, notes, and snippets.

--- available ---
UNDERWORLD (7day: 3, 3month: 48, 6month: 50, 12month: 50)
http://www.stargreen.com/tour?tour=27372
Thursday, 16 September 2010 at HMV FORUM (£28.00)
GONZALES (7day: 11, 3month: 12, 6month: 50, 12month: 50)
http://www.stargreen.com/tour?tour=27808
Tuesday, 23 November 2010 at SCALA (£17.60)
LCD SOUNDSYSTEM (7day: 0, 3month: 12, 6month: 42, 12month: 49)
# ruby buzzwords.rb rjp 'lemons|walken|flange'
require 'UAClient'
class WordBot < UAClient
def announce_message_add(x)
if x['fromname'] == $who then
if x['subject'] =~ $regex then
puts $who.capitalize + " mentioned our buzzwords"
else # maybe in the body
request("message_list", { 'messageid' => x['messageid'] })
require 'UAClient'
class LaraBot < UAClient
def announce_user_page(x)
who = x['fromname']
what = x['text']
puts "#{who} has paged me, returning their call"
puts "[#{what}]"
self.page(who, "Thank you for paging bot - #{what}")
self.disconnect if what =~ /quit/
// ==UserScript==
// @name twitter timestamps
// @namespace rjp
// @include http://*twitter.com/*
// ==/UserScript==
var allTimestamps, thisTimestamp;
allTimestamps = document.evaluate("//span[contains(@class,'timestamp')]",
document,
null,
function changeRGT(x) {
var pos = 0;
while (pos < x.length) {
var lookin = x.substr(pos);
var newpos = lookin.search(/"(.*?)"/);
if (newpos == -1) { break; } // run out of things to find
var newsearch = lookin.substr(newpos+1);
var endpos = newsearch.indexOf('"');
var oldstring = newsearch.substr(0, endpos);
var newstring = oldstring.replace(/>/g, '&gt;');
use IO::Scalar;
my $scalar = <<HEAD;
This is a test of the code
Will it work?
That was a blank line, this should be part 2.
Is this part two?
HEAD
year | urls | days | upd
------+-------+--------------------------+------------------
2002 | 1547 | 147 days 19:20:34 | 10.466425808238
2003 | 9450 | 363 days 21:15:40 | 25.9696804108431
2004 | 9462 | 365 days 08:19:32.891125 | 25.8986726884585
2005 | 11451 | 364 days 08:23:55.315365 | 31.4285761055777
2006 | 8724 | 346 days 05:47:25.079383 | 25.1963036906381
2007 | 8321 | 322 days 08:15:39.707406 | 25.8140203943273
2008 | 9295 | 365 days 18:02:52.322148 | 25.4133952529411
2009 | 11969 | 364 days 05:58:33.289012 | 32.859390467164
> apg -n 20 -E '|<>[]{}/~%@,+=)(&.?>-!*_\\#;:`^"'"'" -m 5 -x 6 -t -a 0 -c /dev/urandom | tr 'A-Z' 'a-z'
hoyz5 (hoyz-five)
rust$ (rust-dollar_sign)
firun (fi-run)
oadven (oad-ven)
drihep (dri-hep)
lionk (li-onk)
dithoy (dit-hoy)
iacjof (iac-jof)
yivha (yiv-ha)
// ==UserScript==
// @name BBC Date Highlighter
// @namespace rjp
// @description highlight old dates on the BBC
// @include http://news.bbc.co.uk/*
// ==/UserScript==
var snapTextNodes = null;
var lu_date = null;
var now = new Date();
zgrep 'Accepted' /var/log/auth.log* | awk '{print $9,$11}' | sort -u | while read i; do set -- $i; u=$1; h=$2; m=$(whois $h | egrep '^role|^netname' |sed -ne 's/^[^:]*: *//p' | tr '\n' ':'); echo "$u ${m:-$h}"; done | sort -u