SommitRealWeird

Twitter and irssi...

So, from the last post, it appears that most people got fed up with trying to get twirssi working in Lenny, and it was suggested that twircd was the viable alternative - I've not tried that (yet) mostly because it's PHP based, and (strangely) I try to avoid running any PHP unless I absolutely have to. Might be of interest to others though!

I'm likely to see about making a cleaner package of libnet-twitter-lite at some point over the next week (for Lenny), but for the moment it's mostly working (I'm fairly sure the URL shortening bit won't, but I haven't tested that yet... right - tested and it doesn't work - fairly sure that's because it relies on a newer version of LWP than in stable... so I'll add that to the list of things I need to work around :)

Posted: 2010-03-15 17:05 in Tech | permalink | Comments: 0

Getting twirssi working in Debian Lenny

So, I finally gave in and got my self a twitter account, it is (as one would guess) http://twitter.com/sommitrealweird, me, being me, I hate having to have lots of browser tabs open for things that I should be able to access in my IRC client, with twitter this is even more obvious that an IRC client is better for reading it, lots of short messages that are text, why would you need a browser tab for that? Also it means that I've got a log of the twitter messages and can look when I feel like it. All of my IRC is done from my main virtual machine, which is also my e-mail server and web server, and thus, it's running Debian stable (currently lenny), unfortunately this does not include the Net::Twitter library that twirssi relies on.

So, first step first, how much of a PITA would backporting Net::Twitter be... well, I took a look at the dependencies and went "Well, that looks like rather more effort than I want to put in right now", however I then found Net::Twitter::Lite, which you can satisfy the dependencies (well, sortof) in Lenny... they're a few versions out, but they're close...

First part was doing :

dh-make-perl --cpan Net::Twitter::Lite

Once that's finished you'll have a Net-Twitter-Lite-blah directory, which in turn contains a debian/ directory, so you can go in there and do:

dpkg-buildpackage -rfakeroot

That should tell you roughly what you're missing etc, from there you can check for the debian packages providing the missing libraries, and what versions they are. Install them and edit Makefile.PL to have the version numbers of the debian packages, you might also need to update debian/control to change some of it's restrictions.

Once all that is done, you should have a libnet-twitter-lite-perl package, install that and you're most of the way there.

I then cloned the twirssi source, and edited it to use Net::Twitter::Lite rather than Net::Twitter, my source is available via gitweb at http://git.sommitrealweird.co.uk/gitweb?p=twirssi-net-twitter-lite.git;a=summary. To clone do:

git clone git://git.sommitrealweird.co.uk/twirssi-net-twitter-lite.git/

or

git clone http://git.sommitrealweird.co.uk/twirssi-net-twitter-lite.git/

Hope that helps someone else out there! If you want my Net::Twitter::Lite package, let me know!

Posted: 2010-03-15 00:26 in Tech | permalink | Comments: 4

SeeSaw

So, I just went to register for a SeeSaw invite, I entered my usual e-mail address, which is iDunno@sommitrealweird.co.uk, and got told it was not a valid e-mail address... erm, yes it is, I use it rather a lot, dammit! So, I changed the localpart from iDunno to one of my less used aliases, and that it accepted... this means that they're checking the localpart and rejecting things with a localpart of idunno, I don't know what other localparts they're rejecting, but that seemed a little harsh...

Ah well, now I'll wait for the invite then I can test :)

Update: Apparently if you put the e-mail address in all lowercase it accepts it fine. sigh.

Posted: 2010-02-02 10:38 in Life | permalink | Comments: 2

Of TV shows and them being cancelled...

So, I've (only just) got round to watching most of Tru Calling, I'm nearly at the end of season one, and then I looked at the number of DVDs left and went "erm, err, what happened with season two, then?"... This appears to happen rather often with anything shown by Fox... The other show that I really liked but didn't see till a long time after they'd cancelled it was Firefly. Why do Fox do this?! Annoying gits! Of course, the other show that I'm waiting for on DVD/Blu-Ray is Dollhouse Season 2, after which we get no more of that either (go Fox!) - I've also just finished The Sarah Connor Chronicles Season 2... which I believe has also been cancelled...

Mutter - it just all mostly sucks. With that and the stupid schedule that Disney PIXAR are releasing things, I'm sure that the entertainment industry is just out to piss me off, there's no way that they needed so many months between the US premier of Up and it coming to the UK (OK, so when it did come out here, I didn't go and see it in the cinema, but that's mostly cos I was still pissed off with the release scheduling, and that I'll have it on DVD/Blu-ray as soon as it's released here on that... I own the rest of the Disney PIXAR movies, so meh).

Posted: 2010-01-23 16:09 in Life | permalink | Comments: 0

Of networking, bridging and ipv6 tunnels...

So, as I'm not always sitting directly in front of machines that I'm working on I've been using various tools to get temporary network connections between completely seperate network blocks, for example, sitting on wireless outside of my home, connecting back in to the desktop at home, and then connecting to the virtual machines on that desktop - the virtual machines are on their own private network, which is bridged and then routed through the desktop. The desktop machine has an ipv6 tunnel setup using tinc to my main VPS. That in turn has a tunnel setup to he.net's ipv6 network... I then have my laptop configured to also use tinc to connect to my VPS, so lots of ipv6 over ipv4, really.

From that I can then get a 'direct' ssh connection between my laptop and my desktop (OK, so it's actually going over 2 ipv6 over ipv4 tunnels to get there, but it "looks" direct), so, that gets me as far as the external network on that box. From here, we can run a vde_switch which is connected to a tun/tap interface that's part of the internal bridge, once we've got that running, I bring up another vde_switch on my laptop attached to another tun/tap interface purely for that network with a static ip configure on that interface... using the magic of dpipe I then connect the two vde_switches together using vde_plug, and as if by magic, I then have access to the internal networking of my virtual machines, meaning that I can now ssh directly in to the virtual machines without having to do anymore interesting ssh bouncing and port forwarding.

It's a little sick, but it really does make remote working a lot easier to do, it's a vpn of sorts, I suppose, as all traffic is being thrown over ssh pipes or tinc (which in turn is encrypted using x509 certificates)... probably not the quickest of networks, but very very nice all the same.

Posted: 2010-01-22 16:16 in Tech, and Work | permalink | Comments: 0

Firefox Paper Size

It appears that no matter what the system papersize is set to, and no matter what cups says is the default paper size, firefox, in its infinite wisdom locks it to being letter - this would probably be fine if I was in the US, but I'm not, and I want it to be A4...

So, the stages to go through to get it to do the right thing appear to be:

  • Goto about:config

  • Filter on print_paper_size

  • Change any bold (i.e. set) entries that are wrong to A4

This seems like something that should be much easier set, apparently using Page Setup only affects the current tab/window you are in and doesn't change the default, which is just odd.

Posted: 2009-10-09 10:03 in Tech | permalink | Comments: 1

Random Storage Idea...

So, I was reading some random mumblings on the interwebs, and the pigeon with USB stick being a quicker method of data transfer in SA than their intertubes... then there was a thread on a mailing list discussing this, and someone mentioned using stacks of microSD cards... so then my brain decided to launch itself orthogonally, as it often does. What we end up with is wondering just how much storage you could fit in to the space a 3.5" drive would normally take - not taking in to account any method of attaching it at this point. So, a 3.5" drive is approx 102mmx147mmx26mm, a microSD card is 11mmx15mmx1mm, so, assuming that we're just lying them side by side, and not optimising the way they're stored at all, you can fit (with space round the sides) 9*9*26 = 2106 microSD cards in the area of a 3.5" drive. Assuming that each of those is 16G that's just shy of 33.7TB of storage!

So, that set me thinking a bit further... I reckon that in that space you could do a 6*6 grid of cards with room for connectors, and just about get it to 10 high...so, that's 360 microSD cards, and probably enough room for some control gear (haven't worked out quite what we'd use for that), I then went in to wondering if we could then create a small embedded system to talk to those 360 microSD cards, if we did that then you could potentially do RAID0 across the "platters" with RAID6 on each platter. Now, to my poor head that meant that there should be 340*16G of available storage, which is 5.44TB... of course, that involves somehow interfacing the 360 microSD cards... I'm thinking that it might be possible with some form of embedded system...

Unfortunately, it appears that to actually build this with consumer components... and without including the interface gear which I haven't even begun to work out yet... we're talking around about £26 per microSD card, so, erm, £9360... but I still think it'd be a really neat project... now, if someone can arrange for me to win the lottery, have lots of spare time, and some more brain power... :)

Oh dear... my brain appears to have ticked further through, and I've realised that with spacing between each microSD card, you could, in theory, easily fit 400 of them upended in the space available. Erm. Of course, this still doesn't answer the "how the hell do you then get them all to talk in any sane manner" question... but I'm sure that will work out in my head sometime...

Posted: 2009-09-13 20:01 in Random, and Tech | permalink | Comments: 8

LVM weirdness - solution found...

ARGH! So, now I know the issue, the disk was created with a standard dos partition table... this won't extend past the bit that I'm at... it needs to be GPT, so there's going to need to be some downtime to sort it out. SIGH.

Posted: 2009-09-09 18:25 in Tech, and Work | permalink | Comments: 0

LVM weirdness

I'm having some issues with LVM, basically it appears that I can't assign over a certain amount of my pv, where that certain amount is somewhere around 1.5TB... output from all the relevant chunks are:

ensenada:~# lvdisplay
  --- Logical volume ---
  LV Name                /dev/main/root
  VG Name                main
  LV UUID                ZR33WS-glE2-bUn6-adCX-n50C-37eX-Fc7Pde
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                7.45 GB
  Current LE             1907
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:0

  --- Logical volume ---
  LV Name                /dev/main/voldemort
  VG Name                main
  LV UUID                DrT0co-THRw-6Zcy-Q3PT-OiQj-4KBz-xfV0Un
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                1.37 TB
  Current LE             358400
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:1

ensenada:~# vgdisplay
  --- Volume group ---
  VG Name               main
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  56
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               2
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               5.45 TB
  PE Size               4.00 MB
  Total PE              1428053
  Alloc PE / Size       360307 / 1.37 TB
  Free  PE / Size       1067746 / 4.07 TB
  VG UUID               ddVSIr-W9BU-XOWJ-gdSo-HZ4m-vw3M-S33Q3s

ensenada:~# pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda3
  VG Name               main
  PV Size               5.45 TB / not usable 1.54 MB
  Allocatable           yes
  PE Size (KByte)       4096
  Total PE              1428053
  Free PE               1067746
  Allocated PE          360307
  PV UUID               sFxRYg-Ua60-zpMT-DMqo-tpD5-d24W-qfW31p

ensenada:~# lvcreate -n test -L 74G main
  Logical volume "test" created
ensenada:~# pvs
  PV         VG   Fmt  Attr PSize PFree
  /dev/sda3  main lvm2 a-   5.45T 4.00T
ensenada:~# lvs
  LV        VG   Attr   LSize  Origin Snap%  Move Log Copy%  Convert
  root      main -wi-ao  7.45G
  test      main -wi-a- 74.00G
  voldemort main -wi-ao  1.37T
ensenada:~# lvremove /dev/main/test
Do you really want to remove active logical volume "test"? [y/n]: y
  Logical volume "test" successfully removed
ensenada:~# lvcreate -n test -L 75G main
  device-mapper: reload ioctl failed: Invalid argument
  Aborting. Failed to activate new LV to wipe the start of it.
  LV main/test in use: not deactivating
  Unable to deactivate failed new LV. Manual intervention required.
ensenada:~# lvremove /dev/main/test
Do you really want to remove active logical volume "test"? [y/n]: y
  Logical volume "test" successfully removed
ensenada:~# lvcreate -n test -L 74G main
  Logical volume "test" created
ensenada:~# lvremove /dev/main/test
Do you really want to remove active logical volume "test"? [y/n]: y
  Logical volume "test" successfully removed
ensenada:~#

Please, someone, put me out of my misery - this is driving me nuts!

Extra info:

ensenada:~# uname -a
Linux ensenada 2.6.26-2-amd64 #1 SMP Fri Aug 14 07:12:04 UTC 2009 x86_64 GNU/Linux
ensenada:~# dpkg -l lvm2
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name                  Version               Description
+++-=====================-=====================-==========================================================
ii  lvm2                  2.02.39-7             The Linux Logical Volume Manager
ensenada:~#
ensenada:~# cat /etc/debian_version
5.0.1

(Erm, just remembered that I haven't got comments enabled at the mo, so if you've got fixes, please mail me! iDunno@sommitrealweird.co.uk - thanks!)

Posted: 2009-09-09 16:07 in Tech, and Work | permalink | Comments: 0

XKB and xsessionrc

So, for a while now I've been using xmodmap to remap my caps lock key off to mod4 to make using awesome just that little easier... although my laptop has got a 'Windows' key, it's in an awkward place for general use, whereas caps lock is in a somewhat more convenient place. Also, not wanting to make it system wide (you never know, someone else might want to use the laptop at some point, at which point it'd be a different user), I wanted to keep with something close to the xmodmap method of just replacing bits as we needed 'em.

As I upgraded the laptop yesterday, various things broke (not least of all, my awesome config, as the theme format had changed to lua, and my theme, erm, broked it), I changed from it using my ~/.xsession for starting the things that I want to using the default Xsession foo, fortunately this sources a .xsessionrc file, which is handy.

So, using hints from madduck's post about extending xkb, I setup a very simple mapping that just adds in the Caps Lock -> Mod4 override, which is nice and handy.

I then just use:

[ -r $HOME/.xkb/keymaps/default ] && xkbcomp -I$HOME/.xkb $HOME/.xkb/keymaps/default $DISPLAY

in my .xsessionrc to setup the keyboard with the right settings, the default keymap in $HOME/.xkb/keymaps is simply the output of setxkbmap -print, edited to add +brettp(caps_mod4) to the symbols, the +brettp(caps_mod4) is a copy of madducks partial for that, i.e. there is a file $HOME/.xkb/symbols/brettp that contains:

// caps_mod4: make capslock generate the mod4 modifier
partial modifier_keys
xkb_symbols "caps_mod4" {
  replace key <CAPS> {
    [ VoidSymbol, VoidSymbol ]
  };
  modifier_map Mod4 { <CAPS> };
};

Looks a little cleaner than using xmodmap, and might mean that firing off Xnest sessions might stop breaking things!

Posted: 2009-08-16 14:13 in Tech | permalink | Comments: 0

Terminator: The Sarah Conner Chronicles - Season 1

So, I mostly missed Terminator: The Sarah Conner Chronicles when it was shown on TV, so I bought the first season on blu-ray to watch... I'm about half way through now, and I'm really quite enjoying it. Might have to see if I can find season 2... Appears that the series has had the usual Fox treatment though... "Oh, people like it, we'll ditch it!" sigh.

Posted: 2009-06-06 15:11 in Life | permalink | Comments: 0

Of pro-life and pro-choice

So, this blog entry is purely about my life experience and my gut feelings... but, basically, here's the rub - pro-choice are all about being able to kill a child up to 24 weeks old, my nephew wasn't far past that, and he's a fucking fantastic child, he's now 8 - and absolutely fucking brilliant - so yeah - pro-choice - I'm not going to fuck up my life, but I'm going to mince a child that might or might not have feelings because I can... argh - for fuck sake - given that most abortions are through consensual sex - for fuck sake - either take the choice that you're going to be pregnant and live with that or don't have sex - it's not a hard choice - and that is what I see as pro-choice - you have the choice to have sex, or not. If it wasn't a consensual agreement, take the damn after morning pill, not a hell of a lot is going to survive that, and you're within a week, barely noticeable.

What pisses me off is the "pro-choice" vs "pro-life" battle - you're both wrong, anything after 2 weeks and I'm with the pro-lifers, any thing before that, yeah - the pro-choicers are fine...

Another thing that pisses me off is people deciding that they know best about how the government should go - what they haven't yet realised is that the entire government is there to tax us so that the pro-life and pro-choicers can have their bitter dispute, no matter who is in power. Shortly followed by screwing over either students or workers, depending on who's in power. It doesn't really matter - whoever is in power, some one is going to get screwed.

Posted: 2009-06-06 00:27 in Life | permalink | Comments: 0

And summer bites again!

So, summer has arrived - how can I tell? The heat is killing the servers in our office again, the poor little AC unit can't keep up when the temperature outside is getting to summer weather. So the door to the magical cupboard is open for the moment, as the office temperature is slightly lower (but still, not great), and it's keeping the cupboard at somewhere around 26, which is still a little higher than I'd like, but better than the 32/33 that knocks the main firewall out.

I'll be replacing the main firewall over the weekend with a lower power (and thus less heat generating) soekris box (which should have enough grunt to shift the packets), and means that we'll go from OpenBSD 4.3 -> OpenBSD 4.5 at the same time.

Also, it's time to finally get the workstations on to lenny - as they're all NFS root, it becomes slightly tricky to get the setup just right for them... hopefully we can start rolling it out to the developers early next week, and then we should be in business...

Posted: 2009-06-05 12:50 in Work | permalink | Comments: 0

Another day, another fab evening!

So, was supposed to end up in Hector's House playing pool with various people that I know, but all of 'em were out last night (erm, half of 'em with me) and didn't quite manage to make it... So after an hour of waiting for people to turn up I gave up and considered going back to my "local" (the hop poles) to have a swift beer or three... instead, it being a wednesday, and knowing that Band Aids was on at the Pav Tav, I wandered there... managed to get there before the first band played - they were Vier and were absolutely bloody fantastic. Stayed and watched/danced to the other 3 bands and all was well with the world.

Now it's time for the sleep and the getting everything else ready for the big move on Friday (yay for working Good Friday... or something!)

Posted: 2009-04-09 00:15 in Life, and Work | permalink | Comments: 0

New Website Design...

It's been a long long time since I last posted anything at all, so this is a post to warn of impending doom. I've switched from a static html website (well, it was statically generated when I edited source files I then ran a bash script that fired off a perl script several times...) to a fully dynamic, django 1.0 backed website - this might mean that I manage to update things more often!

I've also taken the opportunity to convert the previous content in to ReST, so it's actually easier to edit too. There's still work to do - but it's now "good enough" to be used, and I'll split the code out in to better chunks later on.

So, anyways - that's what I've done with my day - so I expect all the aggregators to now break on the new feeds...

Posted: 2009-04-04 17:40 in Life, and Tech | permalink | Comments: 0

More on rss2maildir.py...

Just to confirm, yes, I do know of rss2email - it has the unfortunate side effect of needing an MTA configured to process the rss feeds and seperate them in to seperate maildirs, basically I wanted something that would write straight to the maildir for me because then I don't have to think about the config for the MTA on each machine that I want to use it on.

Thanks to Martin for the suggestion of pandoc, I'll take a look at that over the next few days to see if it'll make the "plain text" generation slightly neater than the current HTMLParser based code.

Posted: 2007-12-21 12:12 in Tech | permalink | Comments: 0

rss2maildir.py

I've been looking for a decent way to read rss feeds for a bit, I've finally given in to the fact that there's actually nothing about that I feel comfortable with... so, what I've started is writting a simple rss to maildir convertor (I know there's toursst, but that appears to want a galleon bookmarks file and appears to use deprecated bits of python). At the moment it is very very basic, there's still a way to go before I'll be fully happy with it, but it's much nicer being able to read rss using mutt than Yet Another Random Program, I'll be hacking up a mutt config to make it look different to e-mail later, but for now as it's still in testing phases, I'm just testing with a bog standard mutt config.

I've made the code available through a git repository that should (when DNS has finished updating) be available with a git clone git://git.sommitrealweird.co.uk/rss2maildir.git/ before that it should be available from git clone http://miranda.sommitrealweird.co.uk/~brettp/rss2maildir.git/ .

The HTML -> Text parser still needs some work, I'm mostly aiming for it to take HTML and generate almost OK ReST which is easier to read in a text mail client. It still needs paragraph wrapping etc, but I'll work on those over time.

If anyones interested, or wants to get involved, or has some nicer ideas for how to make it work, as always I can be contacted at iDunno@sommitrealweird.co.uk :)

Posted: 2007-12-20 21:31 in Tech | permalink | Comments: 0

Update to bpgallery

Just after having made the 1.1.0 release I discovered an annoying bug in that version that meant using caption files made it fail in new and interesting ways, I've now fixed the bug and released bpgallery 1.1.1 which fixes this.

Posted: 2007-05-14 08:32 in Tech | permalink | Comments: 1

New bpgallery available, and xmms-scrobbler work...

I've taken over upstream development of xmms-scrobbler, it's now hosted at http://xmms-scrobbler.sommitrealweird.co.uk/ and has a public readonly git repository for the code. Since taking over development I've dropped a lot of the tag parsing code and replaced it with taglib, found some "interesting" locking issues and am now looking at making it so that we don't need to restart it when adding username/password. It'd also be good to get it to actually report a username/password breakage at least once rather than being totally silent about it!

In other news, I've just released a new version of bpgallery, this version adds in medium sized pages - i.e. you can have the index page, the index page links to pages that have a resized image on the page, and has next/previous links. If you also generate full sized pages then the link from the image on the medium sized page goes to the full sized page, otherwise it'll go straight to the origional image.

Also thinking about making a last.fm "client" for xmms so that I can keep all my music playing in the one place (lastfmproxy appears to have stopped working for me :/)

Posted: 2007-05-13 12:00 in Tech | permalink | Comments: 0

Oh No! What the hell has happened to Selby?

Been watching the snooker - Selby was playing really quite well yesterday, and started the early session this morning looking promising, he seems to have lost it this evening though, which is a shame - and at 12 to 4 down starting tomorrow, he's got a hell of a lot to make up tomorrow.

Higgins isn't playing to his best, but he's being more consistent than Selby, it'll be a hell of a final if they both dig in tomorrow.

That is all.

Posted: 2007-05-06 23:14 in Life | permalink | Comments: 0

Pages: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Next