/home/telatin

a web notebook to store some memos…

Sum numbers in a row with paste + awk

leave a comment »

When in the need of summing tracks for Artemis:

paste *.track | awk ‘{sum=0; for (i=1; i<=NF; i++) { sum+= $i } print sum}’ > sum.track

ciao

Written by proch

October 26, 2011 at 2:00 pm

Posted in Uncategorized

How to open .daa disk images from Linux/Ubuntu

leave a comment »

DAA files are images of CD or DVDs stored in a proprietary format, so there’s no “out-of-the-box” solution from your favourite Linux shell.

You have to download PowerISO, a software famous for its Windows incarnation but available also for Linux from their website. Download the package into a suitable directory, expand it and run the program contained as described in third line:

wget http://poweriso.com/poweriso-1.3.tar.gz
tar xfz poweriso-1.3.tar.gz
./poweriso convert "yourfile.daa" -o outputfile.iso -ot iso

Then to mount .iso file, Linux can do it for you:

mount -o loop yourfile.iso /your/folder

Written by proch

February 5, 2010 at 9:44 am

Posted in linux

Tagged with , , ,

SQL, time to migrate to Postgre

leave a comment »

MySQL… lovely thing so easy to use.

Some drawbacks when it comes to performances, but even worst if you look for a really open source package, no matter if you use it for academia or for commercial activities (see this). I don’t want to get locked in!

So I think I have to migrate to PostgreSQL, let see if it’s so different.

Written by proch

February 3, 2010 at 12:00 pm

Posted in Uncategorized

Simple CSS photo gallery

leave a comment »

Adapting to page width, this simple unordered list is suitable for most photo galleries…

<style>
.gallery li {
 display: inline;  list-style: none;
 width: 150px; min-height: 175px;
 float: left; margin: 0 10px 10px 0;
 text-align: center;  }
</style>

<h3>Gallery</h3>
<ul class="gallery">
<li><a href="/images/image.jpg"><img src="/images/image_tn.jpg" alt="image" /></a>
   <br />Image Caption</li>
<li><a href="/images/image.jpg"><img src="/images/image_tn.jpg" alt="image" /></a>
   <br />Image Caption</li>
<li><a href="/images/image.jpg"><img src="/images/image_tn.jpg" alt="image" /></a>
   <br />Image Caption</li>
</ul>

Found on the net…

I also found this nifty example: http://joshuaink2006.johnoxton.co.uk/templates/gallery/. Cool if you have simplicity in mind.

Written by proch

August 4, 2009 at 1:56 pm

Posted in Uncategorized

NIS, Autofs and kerberos within the CRIBI Network

leave a comment »

Settings memo for the CRIBI Bioinformatics network:

  • Install nis, autofs, nfs-client packages (optionally libpam-krb5 for kerberos authentication)
  • Nis domain is: cribi.unipd.it
  • /etc/network/interfaces
    auto lo
    iface lo inet loopback
    
    auto eth0
    iface eth0 inet dhcp
  • See /etc/krb5.conf as in package
  • Special issue: if your PC has a local partition for the homes, then if we want to access local homes in conflict with NIS… let’s change local home path to mount home drive in /usr/local/home instead of /home.  See /etc/fstab for this.
  • In /etc/passwd add a nis mask (+,,,,,) and change local users home directory to /usr/local/home
  • See /etc/yp.conf
  • See  /etc/auto.master
  • See /etc/nsswitch.conf
  • proch@darwin /etc/rc2.d $ ls
    S10apmd                S50avahi-daemon           S90binfmt-support
    S10sysklogd            S50cups                   S98nis
    S11klogd               S50NetworkManager         S98usplash
    S20apport              S50rsync                  S99autofs
    S20dkms_autoinstaller  S50saned                  S99laptop-mode
    S20hotkey-setup        S50system-tools-backends  S99ondemand
    S20nfs-common          S70bootlogs.sh            S99rc.local
  • See /etc/pam.d/common* for kerberos

Written by proch

June 30, 2009 at 4:53 pm

Posted in Uncategorized

Summing values from shell

leave a comment »

Suppose you have two or more text files with one value per line

File1:

0
1
4
20
2

If you want to sum them:

paste first.txt second.txt | awk '{ print $1+$2; }'

Written by proch

June 16, 2009 at 9:27 am

Posted in Uncategorized

User quotas with Ubuntu

leave a comment »

This step by step tutorial shows how to install and implement user quotas, to limit disk space available for selected users in a Linux system (tested on Ubuntu, using repositories). Read the rest of this entry »

Written by proch

March 2, 2009 at 9:15 am

Posted in linux

Linux back up: a review of free tools

leave a comment »

I found a useful review of free backup systems in junauza.com. As untidy as usual, I definitely rely on premade solutions, even if I like hacking with small scripts running in cron directorys :)
This site provides a rsync script.

Memo: buy a 1Tb hard drive to make backup simpler…

Written by proch

January 12, 2009 at 12:17 pm

Posted in linux

A tiny CMS written in Perl

leave a comment »

Davide Bianchi, an Italian sysadmin popular for his tales, wrote his own CMS to manage his site. He called it “CMS FDT”, Italian acronym for “DIY CMS”… You can find it here, code and comments…

http://www.soft-land.org/articoli/cmsfdt

Written by proch

January 5, 2009 at 9:26 am

Posted in linux

Tagged with , ,

Alternative shell interfaces in Ubuntu Linux

with 3 comments

Faster than default Gnome-terminal, they can be installed via repository. They run under X and don’t require Gtk or Qt libraries…

1) xterm, is quite fast. I use it as a nice replacement with this shortcut:

xterm -fs 11 -fa "Courier 10 Pitch"

2) mrxvt is very fast, with nice tabs. I run it in default configuration, without antialiasing or background to keep good performance.

Written by proch

January 5, 2009 at 9:09 am

Posted in linux

Tagged with ,

Follow

Get every new post delivered to your Inbox.