Pages

03 September 2012

RasPi


Yesterday I ordered my first Raspberry Pi. I say my first because ever since I discovered this cute little invention I said I'd (and I intend to) buy two. But for the time being, and also with the idea in mind of running some tests to see how it works and how many things I can do with it, I just bought one.
It is going to be powered by debian. I read there is a debian derivative called Raspbian which was especially designed to work with the RasPi. So I'll have to give it a try. Besides it is the recommended operating system by the Raspberry Pi Foundation.
But to tell you the truth, even though Raspbian might be ok to begin with, I will replace it by a pure debian installation. I do not need the graphical interface provided by Raspbian. I just need a basic debian system with some servers installed.
I intend to use the little RasPi as a micro server of several things, gopher, http, an irc bouncer... but who knows? I still need to see how far one can get with such a tiny machine. To begin with its low power consumption makes it ideal to run 24/7.
The downside is that it costs a little bit more than expected (even though this should be expected) It costs 27€ but once you have paid for the case, the power supply and the expenses you need to spend 52€ (more than that if you have to buy some extra stuff like cables, memory card...) but well, I think it is worth it. The worst thing is having to wait for 13 weeks until the order is processed plus one more week (own estimation) to arrive home.
Note: I'll publish some pictures when I finally get it.

26 August 2012

My live


I have been procrastinating for a couple of weeks but I couldn't wait anymore. Today I created a git repository to store an initial configuration to build a live system based on debian.
The idea sprang from a new feature offered by live-build one of the tools created and maintained by the Debian Live Project.
This config creates a very generic graphical desktop using xfce with some additional packages and a live-installer to install the contents of the live system. It also makes use of the persistence feature to store some files.
And as the description of the repository says, it is yet far from perfect, as it is pretty much unfinished. It is just an exercise to create an update for my live-server which will be available some time soon.
The repository is located at https://gitorious.org/mylive
In order to build the image, you only have to take three really easy steps:
 $ mkdir live-system && cd live-system
 $ lb config --config git://gitorious.org/mylive/mylive.git
 # lb build
More information can be found on the live-manual
Enjoy!

09 August 2012

debootstrap


If you have ever used a unix/linux system you probably know about the chroot command. I have several testing chroot directories in my debian systems but I had never really taken advantage of such a great tool as debootstrap is, at least consciously.

This week I installed sid in a chroot in wheezy and I'm really enjoying the fact that I can play with it as much as I need to without risking breaking things badly.

I heard (on the net) that lxc are even better. I quote:

  described as “chroot on steroids”


I once tried installing a container in wheezy but I didn't succeed, I'll try again at the weekend.

29 July 2012

poic and poo


I published this script I wrote for personal use several weeks ago in my gopher hole concretely in the phlog but I decided to include it here under the scripts tag for an easy reference.

Credits go to Robby for his extraordinary suggestion of:

 "This .po file is 'poo'"

I must confess I'm still laughing at it every time I think about it but hopefully I will not get that message very often.

Here is the script:

(As you can see the usage is:  ~$ poic file.po)


 #!/bin/sh

 # 'poic' stands for Po Integrity Check

 msgfmt --verbose --check --output-file=/dev/null $1

 if [ "$?" -eq "0" ]
 then
      echo ""
      echo "This .po file is 'good': $(echo $1)"
 elif [ "$?" -ne "0" ]
 then
      echo ""
      echo "This .po file is 'poo': $(echo $1)"
 fi


A friend of mine, skizzhg, proposed this alternative version and renamed it to 'poo':
 #!/bin/sh

 if [ "$1" = "" ]; then
    printf '%s\n' " Po Integrity Check"
    printf '%s\n' " No file specified. Usage: poo <file.po>"
 else
   msgfmt --verbose --check --output-file=/dev/null "$1" && \
   { printf "\n This .po file is 'good': $1 \n"; } || \
   { printf "\n This .po file is 'poo': $1 \n"; }
 fi
I think that skizzhg's version is cleverer than mine and also more complete because it includes information about the script and usage notes.
If you think that 'poo' is not a very nice name be aware that it could perfectly stand for "PO Officer" ;-)
Thank you very much skizzhg. You rock!


Another friend proposed this other version. Let's call it poo2 (His suggestion)


 #!/bin/sh

 if [ -z "$1" ]; then
     echo ' Po Integrity Check'
     echo ' No file specified. Usage: poo2 <file.po>'
     exit 1
 fi

 if msgfmt --verbose --check --output-file=/dev/null "$1";then
    status=good 
 else
    status=poo
 fi
 printf "\n This .po file is '%s': %s \n" "$status" "$1"
Thanks :-)

17 June 2012

Sun clock


Today I have visited the biggest sun clock in Europe, even though some say it might be the biggest (one-piece) sun clock in the world. It is possible!!!

It was built in 2010 and It is just an hour trip away from my house (by car) but I had never been there until today. Well it is at least a very curious thing and worth visiting in my opinion.

I hope you like the pics.



12 June 2012

Scrobbling in the free world.


Thanks to retrospectacus' time and great Debian skills and savoir-faire we can now scrobble through libre.fm which means that we can share the music we love and listen to with everyone else in the whole world.

Thank you, you rock (and roll) ;-)

03 June 2012

'pharc wiki' and 'pharc in action' screenshots


This afternoon I have finished pharc's wiki. It is a work in progress but for the time being it is ready for publishing. You can find it here:

Pharc wiki

Perhaps the only thing that is missing there is a series of screenshots showing how pharc works. I'll upload them here first.

First pharc checks to make sure that the working directory exists, otherwise it exits.


Second if the Archive already exists pharc quits to avoid overwriting files.


If there are no posts to archive, it exits.


And finally if successful:




After it's done, if pharc suspects that something didn't go as expected it will print:

~$ Maybe unsuccessful. Please check it out. If things broke badly there is a backup of your gophermap --> gophermap~


You can see the results of pharc in my gopher hole:

gopher://sdf.org:70/1/users/chals/phlog

or browse it on the web through a proxy:

http://gopher.floodgap.com/gopher/gw.litegopher://sdf.org:70/1/users/chals/phlog