Welcome to MekTrix 4.0

Aka Shish’s Place of Stuff

Archive for the 'pimp' Category

Debconf 7.1: Travel

Travelling with each of us having our own body weight in computing gear was surprisingly smooth; starting from the first station where one of the station-dudes put up a ramp, and phoned ahead to the next station, it chained, until the second to last station, which had huge sets of stairs and no elevator /o\

Also on the train, I noted a teenage / very early 20s couple, with PSP in one hand and baby in the other, which made me ponder modern society D:

Much of the train time was spent attempting to sleep (having gone ~48 hours with only two 3-hour naps), and otherwise resting. Some of that was spent listening to the limited amount of music on my phone, which wouldn’t be noteworthy, except for the irony* of listening to “The Sound of Silence” right before “Halo”…

(* sentance may not contain actual irony)

Posted June 10th, 2007 by Shish, in event, pimp, reallife

Monty <3

19:57 >>> Mithrandir has joined #cs
19:57 [Monty] Thank goodness, Mithrandir is back!
21:52 [Shish] Monty: why do you never greet me? D:
21:52 [Monty] classics
21:53 [Shish] Monty: you only greet old timers? fair enough...
21:53 [Monty] apache/php job
21:53 [Shish] Monty: get it away from me!
21:53 [Monty] ffs
21:53 [Shish] Monty: no offence, your job offers are appreciated, I just
              react that way to php...
21:53 [Monty] nobody seems that size screw i hate cb302
21:54 [Shish] Monty: I suppose cb302 could be described as a screw, and
              I didn't like it either :S
21:54 [Monty] yay!
21:55 * Shish huggles monty for being better at the turing test than
              several people he knows...
21:55 [Monty] <3
21:55 [Shish] <3

Posted June 5th, 2007 by Shish, in pimp, software

Auto-login & desktop setup

In further automation, I tired of logging in and opening and resizing xterms, so taking bits from the mythtv wiki, I set up my desktop to automatically log me in and start all my usual programs. Of particular note is xterm’s “geometry” option, which allows you to set the position and size from the command line. Also useful is the “class” option, so that those of us with awesome window managers (enlightenment) can set them to remember position / stacking layer / border style / etc, and assign the remembered values to windows with set classes. For example, whenever I start a window with class “xterm_starter” (ie, by running “xterm -class xterm_starter”), enlightenment will notice it, shrink it, and move it to the corner of my screen, ready to start things from~

Posted June 1st, 2007 by Shish, in pimp, software, tech


Part one of some notes on automation:

Having tired of keeping ~20 shell accounts up to date with my preferred settings, I made a script to do it. Snippets which other people may find useful are:

Only doing things if an app is installed:

is_installed() {
    if type -p $1 > /dev/null ; then
        return 0
        return 1

if is_installed mplayer ; then
    ... do mplayer specific things ...

Outputting large amounts of text from the script into the config file:

cat > ~/.vimrc <<EOD
syntax enable
set autoindent
set autowrite
set nocompatible    " Use Vim defaults instead of 100% vi compatibility
set backspace=indent,eol,start  " more powerful backspacing
set ruler
set foldmethod=marker
if v:version >= 700
    set spelllang=en_gb
    set spellfile=~/.vimspell.en_gb.add
    set spellfile=~/.vimspell.add

cat > ~/.inputrc <<EOD
"\e[A": history-search-backward
"\e[B": history-search-forward

set completion-ignore-case On
#set editing-mode vi
set mark-symlinked-directories On

cat > ~/.bash_logout <<EOD

if [ "\$SHLVL" = 1 ]; then
    [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q
chmod +x ~/.bash_logout

Now using those, I have all my important settings stored in one shell script. In order to push settings to another host, I can run “cat slek2.sh | ssh user@host.com”, which doesn’t even create any temporary files on the other side of the connection \o/

(Note: the post title, and the script, are called “slek”, which was originally a typo on “skel”, but then got made into “shish’s linux enhancement kit”. Though it’s also tested and working fine on solaris…)

Posted June 1st, 2007 by Shish, in pimp, software, tech


To paraphrase:

[Kitty] fancy joining us for a pint?
[Shish] Sure, where are you?
[Kitty] Amsterdam. 
[Shish] OK, see you soon~

Friday: Bus /o/

Saturday: Get on the ferry at ~1am, spend all my english money on DDR and Time Crisis 3. On the european side of the bus jouney, cheese on a stick!

Get to wfk’s place, sleep

Belgians arive. We all go wandering~ I note a mannequin with an interesting lack of clothes in a window, who then winks at me, and I realise I have arrived in the red light district ._.;;

More sleep

Go out for pizza & ice cream, except the pizza is some sort of pasty shaped thing. Wandering round, I note interestingly named shops, then we go to the pub /o/

Sunday: Out for a drink at a local brewery

Diving round places, finding windmills

Out for supper, made of icecream. The place we went into was geneally agreed to be far too upper class for us, and had the cutest waitress ever :3

Mon: Wake up, get on the train direct from Sloterdijk to Utrecht. Arrive at Amsterdam Central. Confused as to the meaning of “direct”, I stay on the train until the next stop, Sloterdijk.

Of note is that the train stations over there lack in signs — whereas in the UK you get a sign telling you where you are every few yards, theirs have one at each end of one platform; if you miss it, your next opportunity to find out if you’re at the right station is when the train is leaving it out the other end…

Finally arriving in Utrecht, we go shopping; there are many interesting places, like this one, where they sell dresses and gundam models, amongst other nerd things /o/

Then home~

Tuesday: On the bus home I overhead some people speaking what seemed like a foreign language, then I noticed some English in a heavy Jamaican(?) accent; listening carefully, it seemed to have a lot of english, but it ways I didn’t understand. Jive is real o_O?

Posted May 16th, 2007 by Shish, in pimp, reallife

TravMap’s somewhat-late Birthday

I forget exactly when the project was started, but monitoring started a year ago. Thus I shall reminice:

Originally, a bunch of people in an IRC channel I hang out in decided to play Travian. As there were about 20 of us, keeping track was a pain, so I decided to make a map. This first version of the map was an SVG file drafted in Inkscape, edited by hand, and saved as a PNG image.

Pretty soon I got bored of updating by hand, and started looking for a way to automate things. Thankfully, the travian creators decided to be awesome and give out a dump of part of their database \o/ I put it into a local SQLite database so that it could be searched easily. Seeing as this was just a 5 minute hack that nobody other than myself would ever use or even see, I decided to use PHP to write the front end…

After a couple of weeks of adding features, I noticed that it could be useful to other people, so I posted about it on the forums. It ended up being quite popular, and I got several feature requests~ I also added support for other servers, and from there, to other languages. Having people offer to help with translation has been very motivational — It’s nice to know that people care about the project~

Talking about other languages, an interesting note on culture; when an American server is added, I get bug reports along the lines of “Type: Defect // Priority: Critical // The new server was added 3 hours ago, why is it not on travmap yet?!”. When a European server is added, the report is more like “Type: Enhancement // Priority: Minor // There is a new travian server at s2.travian.foo, please can you add it to your list? Thankyou :)”

Another few weeks later I had broken all my web serving records; I was serving tens of megabytes per day, and my server was melting — getting a P2 200MHz box with 64MB RAM to search through 200MB of database several times a second was painful. Switching to highly indexed MySQL made things better, but still bad. I ended up buying a load more RAM, ending up at 256MB. This was OK for a couple of months, until the database grew to be again too large to fit in memory… It got to the point where it was being queried faster than it could respond, so it got slower, and things stacked up exponentially — load average broke 60 within minutes of apache being started :-/

Eventually I gave up on self hosting, and moved across to dreamhost — thanks to the wonders of overselling, they had tons of spare processing power, memory, and bandwidth. Aside from datacenter problems, they’ve been pretty cool.

Since then, growth has been pretty steady. The database is now over 500MB, going over a hit a second at peak times (That’s quite a lot of traffic, nearing a gig a day now…). I also notice that dreamhost moved me to a different database server without telling me :|

Also I figured that with 10,000 visitors per day, there ought to be some way of making some money out of it — putting up a “please pay for my hosting” link earned me a grand total of $5 ($4.50 once paypal took their cut) from one guy — to this day, the only money I’ve made directly from programming ^_^ About a month ago I put some ads on the site to see how effective they were, and since then I’ve made enough to cover nearly half of that 256MB RAM I bought so long ago — another 3-4 months of the same earnings, and I’ll have got as much money out of the project as I’d put in XD

Overall, it’s been a fun year — I’ve learned lots about caching and optimisation, and how much PHP sucks (I *really* wish I’d written it in something else, I didn’t know it’d get so big…); I haven’t actually played travian for a few months now, I’m just sticking with the project because it’s enjoyable~

I forget how I was going to end my rambling, so I shall do so abruptly. End.

Posted March 15th, 2007 by Shish, in software, stats, tech, web

Belgium \o/

Yay for taking a week to write up…

1400) Arrive at Kitty’s house, find nobody there. After much wandering round looking, she comes cycling into the garden — the T-Shirt printing company, who’d been told to get some done by that morning, had decided that they couldn’t start until they had a signature; and they hadn’t told her about this until she phoned up to check that they were done…
1600) T-Shirts finally printed, we run for the train, and get to the platform just as it leaves
1615) Next train, off to Ashford International~
1700) Having passed customs and such, the Eurostar leaves. Much training happens.
2000) We arrive at the hotel. They seem to have a thing about a pissing boy
2100) We went to the LeRoy for supper. Being Belgium, who’s languages are French and Dutch (not Belgian, as I had always thought…), wfk ordered in Dutch, Mike ordered in French, and the rest of us in English, though Kitty was in the habit of saying “Danke schon” a lot… I had the only things I recognised, meatballs in tomato sauce. These were, by far, the best meatballs I’ve ever had — I ended up stopping after each bite to wait a few seconds just savouring the taste… For pudding we had Dame Noire; chocolate icecream with chocolate bits covered in cream covered in chocolate sauce; which was also nice. We then had much misc beer, and I can’t remember what we talked about (Except gezpacho soup :P).

1100) Go for tea in some random place, decide where to go. We found a guide full of much pisstaking, and followed it to…
1200) The Atomium. Belgium’s equivalent of the Eifel tower, apparently; it’s made out of several huge metal spheres making a model of an atom. It was in a state of being rebuilt while we were there though :| We saw a video of how it was built originally in the 60s, with the workers having absolutely no safety equipment. Those guys must have had balls of steel to build that place… It also had fridges and a nice view.
1530) Siesta
1730) Back to LeRoy for drinking. Here is where I first met Tolman(sp?), one of Kitty’s belgian friends.
1800) We decide that seeing as there’s nowhere to sit in LeRoy (this was “the FOSDEM beer event”, and it was totally packed), we’ll go elsewhere. We try and take several random people with us, but the only one who manages is Mike, who gets a cute girl~ We then go for pizza and more talking.
1900) Back to LeRoy, it’s still full, so we go to another pub /o/ Tolman introduces me to a beer called Gueuze, which is lovely. Unlike the english beers, it tastes nice *and* has alcohol :O People shuffle around, and I end up next to Bettina, a nice German girl who’s living in Belgium, and is only here because her FOSDEM-attending friend needed a place to crash. Apparently I spoke more to her than to everyone else all weekend put together, but I didn’t notice. Possibly drunk.
2200) Bettina suggests going elsewhere; we get outside and ponder home vs a bar with more music; most people go with the first, as I would have done, had Mike not pushed me towards the latter… I am most thankful for that, as that evening with Bettina was most entertaining ^_^
2500) I get Home. wfk and Kitty collaborate to tell me the history of unix as a bedtime story <3 Saturday: 1000) Wake, metro, bus. Trying to navigate the crowds at the uni was hard…
1100) Arrive mid way through the OLPC talk
1400) I go to an Xorg talk, which seemed interesting, but my student instincts of “I’m in a lecture theatre, must be bedtime” took over :(
1500) An AIGLX talk; the guy from Red Hat got a round of applause when his laptop managed to boot, after 15 minutes :P
1600) Linux Kernel talk with Andrew Morton
1800) Home
1900) Dinner at some random place with random people

1100) Debian internals
1300) CACert signing
1500) Secure jabber
1600) Debian auto-install
1700) A talk on the GPLv3 from some FSF guy; I found it terrifying. The speaker was young, had a german accent, with a crew cut, and was talking about how the enemy were weak and now is the time to crush them. Much spreading of blatantly biased propoganda was done…
1800) Dinner with just our group
1900) We go to the bar opposite the real-life mannequin-pis
2200) Be very drunk. Most of what was discussed in that pub will stay in that pub. Inspector Gadget was played on the radio, in French… There was much talking of war and geography too. Once we were quite drunk, 3 of the group started trying to work out how to get in bed with a girl at the bar who didn’t speak english… Once we got out, Mike gave me a fireman’s lift down the street~
2300) To bed, for misc drunken chatter.

1000) Mike had a hangover, but everyone else was OK, which isn’t what I would have predicted…
1100) Train back to England; much like thursday morning in reverse. I arrived home knackered, with an hour to go before an exam \o/

Posted March 4th, 2007 by Shish, in event, pimp, reallife

Service pimpery

1) Akismet — I’ve been using it to stop wordpress and trac spam for the past ~3 months, and I only just remembered that it exists, since it let one through (as opposed to the 20 a day I was getting before)

2) OpenID; which has been around a while, but might actually get somewhere now that microsoft have said they’ll be putting their weight behind it (although they may well end up doing their embrace / extend / extinguish thing…)

I shall add support for them to my webapps once I find APIs and time…

Posted February 12th, 2007 by Shish, in pimp, site, software

KLUG Stuffs

3 meets, none blogged :O For background: KLUG is the kent linux user’s group; a bunch of linux users who meet to talk about random things, and occasionally do something productive together.

Firstly: A brief social meet in The Old Bev, just down the road. Drinking was done, penguins were hugged, and talk was mostly about jobs in the industry~

Then: The day after was a more official meet, in Dover, in the port’s immigration office. People actually brought computers to this one. Mostly talk was admin stuff, about what the LUG should be doing, how to be doing it, events we should travel to or run for ourselves, etc. There were also lightning talks; Mike did beer related analogies for various types of routing, a guy I don’t know talked about working in a school, and Kitty did a very brief overview of the history of computing~

After the dover meet Mike, Kitty, Allen, and myself went to a local town for food and beer. On the way we also stopped off at The Bunker, a datacenter built inside an old RAF base. It seemed pretty deserted on the surface, except for the security guard + dog who appeared once we started poking about…

Recently: The Maidstone meet. Which was a lot like the Canterbury meet, except that we managed to get kicked out of two pubs in one evening… First was the society rooms(?), where we were told we weren’t even allowed on the site without proof of age (and not any proof of age — it had to be specifically a driver’s licence or passport); then we moved to the druid’s arms for pizza and beer. The meet carried on there quite happily for a couple of hours, until Kitty got fed up enough with people leaving the fire exit open (letting the cold in) that she slammed the door and exaggerated one of the cracks in the window… By that time most people were ready to leave anyway, so they did. A couple of us went to KFC while waiting for the train back, had one last conversation, then went our separate ways~

Posted February 10th, 2007 by Shish, in pimp, reallife

On Servers

Chai (router) and Aru (server) are being turned off for the first time in 4 months; chai is retiring for now, aru is becoming a router + xen server. It’s pretty much the same setup as I’ve done in school — one upstream network, two downstream; serving DHCP on the two downstreams using dnsmasq. VPSes are bridged to one or more networks depending on who needs access to them.

The school’s moodle install has been moved to a VPS at context shift, since dreamhost were complaining that we were using too much CPU time. That seems to have gone mostly OK, except for me not knowing how to configure Apache + PHP to deal with more load than the server can handle (Lowering MaxClients seems to have solved the swappy death problem — now if the server gets more requests than it can handle it queues them, rather than trying to do everything at once)

Update: FastCGI’ed PHP seems to ignore MaxClients. Sigh.

Posted January 4th, 2007 by Shish, in pimp, reallife, site, tech