// archives

UNIX world

This category contains 4 posts

SVN & TRAC Backup

After a few server crashes I had to write this very same script each time so I better keep it up here and maybe someone find it useful 1 2 3 4 5 6 7 8 9 10 11 12 13 #!/bin/sh   PREFIX=/var/develbackup SVNFOO=/home/svnuser/repos/foo TRACFOO=/home/svnuser/trac-env/foo   DATE=$( date +%Y%m%d ) BACKUPDIR=backup-${DATE}   mkdir ${PREFIX}/${BACKUPDIR} [...]

Embedded System Development: QEMU + BuildRoot + Linux ARM

Here are some basic steps to get a virtual ARM Development board which will allows to practice our embedded systems skills or test code / firmware or whatever we want to do but without the need of having a physical device. The following takes place in a Linux machine running on Virtual Box (512MB RAM), [...]

Python: Simple Socket Server

The simplest socket server, don’t know why but I always forget how bind is used in python. import socket   sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.bind(("127.0.0.1", 1024 + 666)) sock.listen(5)     client, details = sock.accept() while 1: data = client.recv(1024) print "data : %s" % repr(data)

Good shell scripting practice

Since I started work at HP I became worrier and worrier in producing shell scripts easy to extend. I have modified hundrends of badly written scripts and worst designed in a couple of days which led our team, fortunately, to a non-big fiasco. Anyway, all could have been nice if the original scripts were acomplished [...]