This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, '>'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name twitter timestamps | |
// @namespace rjp | |
// @include http://*twitter.com/* | |
// ==/UserScript== | |
var allTimestamps, thisTimestamp; | |
allTimestamps = document.evaluate("//span[contains(@class,'timestamp')]", | |
document, | |
null, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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'] }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scribot=# select * from (select count(distinct url) as c, date_trunc('hour', wh) as x from url group by x) as q order by c desc limit 20; | |
c | x | |
----+------------------------ | |
35 | 2010-03-24 11:00:00+00 | |
26 | 2009-10-28 10:00:00+00 | |
25 | 2009-10-06 10:00:00+01 | |
24 | 2009-10-07 12:00:00+01 | |
24 | 2004-05-05 12:00:00+01 | |
23 | 2004-01-29 12:00:00+00 | |
22 | 2004-11-17 10:00:00+00 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function parse_git_branch { | |
xx=$(git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\) | |
/(\1)/") | |
echo "$xx" | |
} | |
function check_git_changes { | |
git diff --quiet 2>/dev/null | |
if [ $? -ne 0 ]; then | |
tput setaf 1 # red | |
else |