jamesoff.net




1
Apr
2008
0

BBC News Stylish script

The new BBC News layout seems to be causing some people to stress out a bit - but then all new redesigns do until they get used to them. I quite like it, but for a friend I knocked this up quickly to get rid of the two banners across the top of the page.

You’ll need Stylish and then stick this in a userscript for it. You may need to adjust the domain (2nd line) if you don’t use news.bbc.co.uk to access the site.

(more…)


Permalink | Posted in Coding internets and tagged  



21
Feb
2008
4

irssi and ZNC

ZNC is an IRC bouncer with some pretty nice features. For a number of reasons I wanted to move my ircing from home to a shell, so I decided to give ZNC a try. ZNC isn’t in ports, but compiles fine using gmake.

The only problem I encountered was getting it set up to work with multiple networks in irssi. Configuring ZNC itself to put me on many networks was easy enough, and when I connected irssi to it for each network using /connect it worked fine. Using /server add to set up irssi’s server list didn’t work out so well.

Every time I tried to add another server (for connecting to another network), irssi would remove the first one. This is because irssi only considers a server’s hostname and port when trying to work out if it’s unique. When I added another server which differed from the first only by password and associated network, irssi assumed I was updating the existing one and changed it. Putting the required entries in irssi’s config by hand also didn’t work.

The solution was easy enough; one ZNC instance can listen on multiple ports, so I got it to listen on a selection of ports using multiple Listen directives in its config file, and then added each network’s server to irssi using a different port number.

Now I can take advantage of cool things like buffer replay and detaching from channels. Sorry, irssi-proxy - you don’t quite cut it now :)


Permalink | Posted in FreeBSD internets and tagged  



15
Nov
2007
3

Thunderbird’s RSS reader

Having previous tried getting Thunderbird to behave as an RSS reader on FreeBSD and failed (the option didn’t show up on the Add Account wizard), Roz asked me today about getting it going.

A quick Google search this time lead me to this post which gives the answer:

cp /usr/local/lib/thunderbird/defaults/isp/rss.rdf /usr/local/lib/thunderbird/isp/rss.rdf

and suddenly it works! :hellyeah:





16
Jul
2007
2

Testing posting from Vimpress

Is this thing on?

It looks like I can post from vim, but there’s something in one of my posts that makes Python’s xmlrpc library burst into tears and I can’t view a list of my posts :(





27
Apr
2007
1

When opers are bored

[+     JamesOff] HI I'M BARRY SCOTT
[+          alz] JamesOff (james@im.barry.scott)
[+     JamesOff] \o/
                 BARRYS joins [HI@IM.BARRY.SCOTT]
                 limescale joins [ground@in.dirt]
*     limescale pokes BARRYS
                 limescale quits IRC [ground@in.dirt] [Killed (BARRYS (BANG! And the dirt is gone!))]

Permalink | Posted in Fun internets 



26
Apr
2007
0

windowtidy for irssi

Finally got around to writing a script for irssi which closes all empty windows.

It’s over here


Permalink | Posted in Coding internets 



24
Feb
2007
0

Reformatting SomethingAwful forums

I’ve just found the Stylish extension for Firefox, which is to CSS what Greasemonkey is to JavaScript, or something. It lets you define CSS snippets for pages. Admitted what can be done with this can be done by hacking up your userContent.css file but this makes it so much easier.

Go see userstyles.org for an index of snippets you can download. Meanwhile, I present my own one for the SomethingAwful forums. It does the following:

  • Highlights the thread row under the mouse on a forum page
  • Moves the “somenick fucked around with this page” text off to the right and makes it less intrusive
  • Moves the paginator from the bottom of the page to be hovering bottom right at all times; semi-transparent mostly but opaque when moused over. This works on both forum views and reading a thread.
  • Hides the post buttons (edit/quote/report) except for the post your mouse is over.

BEHOLD!

snapshot8.png

snapshot9.png

To install, create a new blank style in Stylish and dump this into it:

@namespace url(http://www.w3.org/1999/xhtml);
 
@-moz-document domain("forums.somethingawful.com") {
 
	tr.thread:hover td {
		background-color: #fff7df !important;
	}
 
	.postbody .mainbodytextsmall {
		text-align: right !important;
		color: #555;
	}
 
	div[class="pages bottom"] {
		position: fixed;
		top: auto;
		left: auto;
		right: 5px;
		bottom: 0;
		background-color: #fff7df;
		border: 1px solid black;
		padding: 3px;
		font-size: 12px;
		-moz-opacity: .50;
	}
 
	div[class="pages bottom"]:hover {
		-moz-opacity: 1;
	}
 
	table[class~="post"] .postbuttons {
		-moz-opacity: 0.2;
	}
 
	table[class~="post"]:hover .postbuttons {
		-moz-opacity: 1;
	}
 
}

Permalink | Posted in Coding internets 



16
Nov
2006
0

Assimilation complete

I knew this was coming, but seeing it happen makes me a sad panda.

http://www.sysinternals.com now redirects to a Microsoft :xbox: TechNet site. While the new site carries all of the stuff sysinternals.com had, and also has some new stuff (hooray!) it’s sad to see it finally gone :(

Luckily, nothing ever really dies on the Internet!





10
Oct
2006
1

APC features

While rummaging around the APC site to find information on Uninterruptible Power Supplies, I noted that one of the features was “ERROR: No Translation Found”:

apc.png

I’m not sure if an error is a feature I do or don’t want, to be honest.


Permalink | Posted in Fun Work internets 



26
Sep
2006
3

I’ve had enough

I’ve decided I’ve had enough of blbl.org. Last night my server that runs it (along with all of my other stuff) had some kind of hardware fault, and I realised that I didn’t really want to pay for this machine just for blbl.org to rag it until the disks fall out and the assorted important bits melt. My father always used to say there’s nothing worse than having your important bits melt.

Actually he didn’t, but if I was to ask him about this theoretical event his response would definitely be on the negative side.

What it comes down to is this: blbl.org sucks quite a bit of power out of my server in both memory use and CPU time. (The bandwidth is probably negligible, but the worry of some blog spammer getting his knickers in a twist and performing some kind of DDoS is always at the back of my mind.) It hammers the disk (the main database tables contain 18 million and 6 million rows respectively, and that’s not taking into account the tables used to accumulate the data people submit) and generally slows everything down. I’m getting fed up of having to field questions like “why is your gallery down?” because of it.

On top of all of that, I seem to end up spending more time than I’d like looking after the whole (admitedly shaky) set up. If blbl.org was represented on paper, it would be a Heath Robinson machine. Frankly SpamKarma2 does a pretty damn good job of trapping spam by itself, WordPress has anti-spam stuff in it and there are plenty of other plugins which do a decent job too.

Looking at the stats from rbldnsd(8), I was fielding about 400 queries every five minutes (i.e. just over one per second) for the IP blacklist, and I was getting about a 10% hit rate. I guess that’s not so bad, but I’ve no idea how much of the comments posted on all blogs ever (or all blogs that might use blbl.org) is spam. If it’s 10%, then I guess I was doing ok, but I suspect that it’s probably more than that. Based on the flood of submissions (which often ran to 200/sec), I’d say it’s not that effective anyway.

The stats for the URL blacklist are worse - roughly 100 queries every five minutes and less than four hits in the same period.

So, I’ve shut it off. blbl.org is now firewalled off to save my webserver from even having to attempt to serve requests. In about a week, the scripts that generate the blacklist data for rbldnsd will decide nothing should be listed any more. I’ll leave that running for now because otherwise it will have an impact on people’s blogs. 200+ submissions a second tells me I could potentially screw up a lot of blogs :) I certainly won’t be doing anything like returning a positive hit for all queries and saying “well you should have noticed that blbl.org was shutting down!”

In due time, I’ll shut down rbldnsd too, but that’ll be a while yet. If you’re using the SpamKarma2 plugin for WordPress, or any other RBL lookup plugin on any blog software at all, please remove blbl.org from the lookup list (bl.blbl.org and uri-bl.blbl.org).

I would say it’s been fun, but I’m not sure that applies :) It’s certainly been interesting from many perspectives. I’ve had to figure out how to run an RBL, write scripts (and rewrite) them to handle large volumes of submissions, process large quantities of data, and so on. I never even got round to writing a proper website for it (not that you can look now, since I’ve blocked it). I hope that in the time it’s been running I’ve helped stop at least a little bit of spam, and stuck two fingers up at the people who go around filling people’s blogs with unnecessary “comments” about poker, transexuals, lesbians and bestiality. There are plenty of people who write their own blogs about that. Actually, I think that’s called myspace or something :fry:

In the time it’s been running, especially since I posted last about the detrimental effect blbl.org was having on my server (and thus all my other sites), I’ve had a couple of offers from people for more hosting. I’ve decided not to take them up in the end (although I am very grateful) because leaving this project is as much about my personal time as anything else. When I had more free time (like when I was a student) I happily created many complex projects for myself, but nowadays I want to keep things simpler because I’m so busy.

If anyone wants to take over blbl.org (in its entirely - management and hosting) then I’d be more than happy to hand the reigns over to a suitable person (or people).

I think this is officially my longest blog post ever, so I’d better stop here before I ruin my average.


Permalink | Posted in RBL Spam internets