Bash and SED script to play...Tetris...?

If you navigate your browser to here, you will find a most amazing thing: Tetris crafted out of a SED script with a bash wrapper.  The page is in Russian, but Google or another translation site will tell you that the first few words read: > Wrote a small Tetris on sed’e: sedtris.sed and wrapper on Bashe sedtris.sh Download both scripts to the same directory, on the command line do:

bash sedtris.sh

It’s actually very good!

Making a script run on startup on OpenSolaris

While working on my dissertation, I found that virtual NICs and etherstubs don’t automatically reappear on a restart.  So, I have a nice little script to make them come back: #!/bin/bash /sbin/dladm up-aggr /sbin/dladm up-vlan /sbin/dladm up-vnic /sbin/dladm init-linkprop -w I need this to run on startup.

Now, as of Solaris 10, things like this should really be done in SMF.  We can easily create a new service using the following template (modify as you require :) ) :

 

MY_SCRIPT

Now, you put that into: /var/svc/manifest/site It should be named something like “my_script.xml” where “my_script” is a descriptive name of your script to run. On the command line, as root or using `pfexec` run the following commands: cd /var/svc/manifest/site svccfg validate my_script.xml svccfg import my_script.xml svcadm enable my_script Now if you restart, your script will execute! Thanks to the wonderful people at the opensolaris.org discussion boards for their help!

SUNWyp - A.K.A. NIS

So, over the last week I have been trying to get NIS to work with OpenSolaris in VirtualBox machines.

I managed to get the master server to work fine by doing the following:

  1. Make sure all hosts are in /etc/inet/hosts
  2. Install SUNWyp
  3. Set the domain name like so: domainname mydomain
  4. Create the default domain file to make domain name persistent across reboots: domainname > /etc/defaultdomain
  5. touch ethers, bootparams and netgroup in /etc
  6. Copy /etc/nsswitch.nis to /etc/nsswitch.conf
  7. Run ypinit -m and answer questions This list should have started all of the necessary NIS services.  Setting up the clients proved a little more difficult.  All of the documentation I found said to do the following:

  8. Make sure all hosts are in /etc/inet/hosts

  9. Install SUNWyp

  10. Set the domain name like so: domainname mydomain

  11. Create the default domain file to make domain name persistent across reboots: domainname > /etc/defaultdomain

  12. Copy /etc/nsswitch.nis to /etc/nsswitch.conf

  13. Run ypinit -c and name the NIS master server

  14. Start NIS client service with svcadm enable nis/client However, this didn’t work.  I tried using host names and IP addresses to identify the NIS master when ypinit asked me to specify it, but it wouldn’t work. As a work around I found that if you don’t specify a master server at all, ypbind will use the -broadcast option and find the master automatically.  Using the method above and staerting ypbind -broadcast myself didn’t seem to work.

This all works on OpenSolaris 2009.06

Goodbye George Ward Event – 3/7/10

The George Ward School Association are attempting to organise a ‘Goodbye George Ward’ Event The date has been set for Saturday 3rd July, from 10am – 5pm with a Celebration Ball in the evening from 7.30-11.30pm. (Tickets to be sold to public nearer the event)

During the day we hope to have various areas of the school set aside for each of the decades the school has been opened, with music and school related pictures and memories from that era, and if possible, staff! We are hoping that as many ex staff, pupils and Governors can be persuaded to attend as possible, and hopefully be up for a photo shoot too! We are looking to reopen the ‘tuck shop’ for a one off session, as well and opening the Sports Hall for a soft play/bouncy play and GW sporting hero’s area, we may even have a chance to open the school canteen for a small taste of a ‘last George Ward School dinner’! The event will finish with a final assembly at 4pm where we hope a few speeches from various headmasters/dignitaries may occur.

There are lots of other ideas for the day still being finalised to make this a fab ‘goodbye’ but we will need your help with getting this publicised and was wondering if you could advertise this for us in your media? We need to get in contact with anyone who has any photos, memorabilia or just wants to write into us with their old school memories, which could be displayed on the day in the various areas, all would be gratefully accepted.

Please forward any correspondence to the school at George Ward School, Melksham, Wiltshire, SN12 8DQ or via email to [goodbye@georgeward.wilts.sch.uk][1] or check out our school website at www.georgeward.wilts.sch.uk where we will have up to date notices as plans progress along with a direct link for any comments and memories to be sent in.

Your help in contacting any ex staff or pupils would be invaluable.

Thank you Liz Dimond GWSA George Ward School, Melksham Wiltshire

[1]: mailto:goodbye@georgeward.wilts.sch.uk?subject=Goodbye George Ward School

Apple iPad

So, I’m a little late to the blogsphere on this one, but then when am I not? I’ve read some pretty damning things about the iPad, it doesn’t have a SD card reader, it doesn’t have a camera, it has files and no file system, it doesn’t do Flash, and that the name suggests a type of adult nappy… I thought that I’d look at these comments and generally give my views on the iPad and it’s hardware.

First up, I’d like to say that the lack of an SD card reader really doesn’t bug me. All my photos are stored in iPhoto, I transfer them there via a cable from my camera. And this is, perhaps, one of the reasons why people seem to hate the fact there is no viable file system on the iPad. Windows users are used to dragging files around, Mac users (with the introduction to iLife) have enjoyed the magic of self-organised photos, movies and music. Windows users have applications available to them, but many don’t see to use them, Mac users seem to like the increased productivity iPhoto and iTunes gives them. I believe in a number of years, all these files will be gone. File space and network speeds will mean that compression is no longer needed, so people will only have to concern themselves with Photos, Documents, Music, Spreadsheets, Movies, etc…Apple know that the desktop isn’t ready yet, but the mobile platforms of today are. Having said all of that, Apple have created an accessory for connecting a camera via USB or by using a SD card.

The lack of Flash doesn’t worry me either. I visit very few sites that require Flash to get the most out of the site. Most Flash on the web seems to drive adverts. It’s a shame that Flash games won’t run, but I tend not to play games that often… Flash videos can go, with the introduction of H.264, YouTube doesn’t need Flash and neither does a number of other sites offering video streaming.

iPad. I guess it could conjure the image of an Apple branded nappy:

However, I feel the name has slightly more technical and historical background. In the late 1980’s Xerox PARC’s Mark Weiser coined the phrase “ubiquitous computer”, a term to mean “computing all around us”. He believed that we were entering a new era in computing. We’d had the mainframes (one computer to many people), we’d had desktops (one computer to one person), but now we were entering the ubiquitous era, with many small (perhaps task specific) computers serving many people in everyday life. PARC created three devices in the early-mid 1990’s, the tab, the pad and the board. The tab, a small palm device that ran applications on a server and the GUI on the device, it encouraged computing on the go and had the vision of always being connected to the network. The board, similar to an interactive whiteboard today, allowing many people to interact with it both over the network and physically. The pad, a smaller more personal board, one could use a tab to drive a board. Pads ran on workstations with forwarded graphics. Today’s iPad, in my mind, fulfils pretty much what the Xerox PARC Pad tried to accomplish almost two decades ago. The iPhone/iPod Touch is similar to the tab.

The iPad’s hardware is something to marvle at. Whatever Apple have in there it’s super power efficient as Apple claim the iPad will last for ten hours on a single battery charge, and it all squeezes into an incredibly thin package. The tablet is powered by a 1GHz Apple A4 chip. The A4 chip is a CPU and GPU all on one chip. I’m guessing the added bonus of having this combination is perhaps less power consumption and added room in a cramped space. I can see the next-gen iPhone having an Apple chip. The A4 drives all of the applications and the 9.7” screen which runs at a 1024x768 resolution. The three capacities given are 16GB, 32GB and 64GB, each costs $100 more than the previous. Apart from that, I think it will be interesting to see the first break-apart.

Pricing isn’t too bad. The 16GB model is $499 as of 31/1/10 that’s £312.79! Perhaps Apple will up this to £350, though I fancy that they’ll charge around £400 for it.

I’d like to see how the iPad is recieved when it is released. I’m also looking forward to seeing the second and third generation iPads.

Second thoughts on RSS

OK, so back in July I posted my praises of Google Reader and RSS technology.  Today however, I’m not so sure.  I’ve been without Internet for a couple of weeks, and I’ve just looked at my Google Reader…Over 1000 stories for me to look at…I’m never going to have the time!

Homemade Hot Chocolate

I know, I know, making hot chocolate isn’t geeky, but Ive been wanting to try it for ages.  I bought some 200g Bournville bars to try out a recipe.  I basically made the recipe up, though looking at the internet now, it seems that it’s similar to others.

Ingredients include: 8 blocks of Bournville chocolate 1 teaspoon of sugar Mug of milk (I used semi-skimmed) Pinch of allspice

I measured a mug of milk (as much as I wanted), and transfered the milk into a saucepan.  Putting the hob on high I popped on the saucepan.  While stiring with a whisk I added a few pinches of allspice (as I didn’t have cinemon or mixed spice) and a teaspoon of sugar. When the milk started to steam I added four blocks of chocolates (I broke them up before adding them) and started to stir vigorously with the whisk, when they had melted I added another four block of chocolate.  Having done it, I think next time I might grate the eight blocks to save a little time. When the chocolate had melted I continued to whisk until the milk was bubbly then poured into my mug again.  If I had had it, a squiring of cream would have been a very nice addition!

They dont make them like they used to...

Faye has got a new phone, some up-to-date Nokia to replace her old 6200.  Her 6230 still works apart, just the battery doesn’t hold a charge very well. This new phone cost about the same price as the six year old phone, has less useful features, doesn’t keep the same charge as the 6200 did when new and broke after six months of use…After getting it back from the O2 shop, they are telling us that it broke because of rust…

The old 6200 has been dropped in photo chemicals, dropped many a time and has been run over by the Faye’s KA.  This new one seems to have broken because it has a small amount of photo chemicals dripped over it…

Why oh why isn’t technology today more robust?  Or at least as robust as it used to be…Yes, phone manufacturers want you to upgrade your phone every now and again, but every six months!?

Our Flat in Aberystwyth

As promised, here’s mine and Faye’s flat in Aber!

My new work area

Well it’s been a while since I last posted here.  Though it’d be right that I come back with tales of new desks, screens and computers!

So what’s new?  I’ve left Camberley, worked for the MoD over the summer and am now back in Aber living with Faye (hopefully a film of the flat coming soon).  Since being in Aber I have bought a new desk, a new chair (which is annoyingly not here), a pair of new monitors and a new shiney computer.

Let’s talk about the monitors to start off with, two 22” things from Samsung (SyncMaster T220 apparently), here they are:

As you can see from the picture, a nice wide desk that is also quite long.  Plenty of room for lots of crap!

So, that are these screens attached to?

  • 2 x Quad-Core Xeons (5500)
  • 6GB of RAM (DDR3 1066MHz)
  • 3 x Hard drives, (1 x 640GB, 2 x 500GB)
  • NVIDIA GeForce GT 120
  • 2 x DVD±RDL/DVD±RW/CD-RW drives
  • Wi-Fi & Bluetooth Guessing that you’ve either heard me shout it about, or have guesst that, yes, it’s a Mac Pro!  Here’s some pics of it:

I do love it,  I’ve quickly found that 6GB of memory isn’t very much at all, not once you start ripping DVD’s and starting up virtual machines….I’ve found that the 64-bit apps do run quite a bit faster, and don’t really take up much more memory than their 32-bit equivilants.

I still have my trusty MacBook, I’m running ChronoSync to keep the two machines in check, though I’m hoping to develop an open alternative in the next year or two.

Some last pictures before I finish this off, one of my main desk, and another of my desk from last year: