Autarchy of the Private Cave

Tiny bits of bioinformatics, [web-]programming etc

    • Archives

    • Recent comments

    Archive for the '*nix' Category

    Unix sex and Linux command reference

    5th January 2009

    Unix SEX :{ look; gawk; find; sed; talk; grep; touch; finger; find; flex; unzip; head; tail; mount; workbone; fsck; yes; gasp; fsck; more; yes; yes; eject; umount; makeclean; zip; split; done; exit:xargs!!;)} (source: someone’s signature in the Debian mailing lists).

    download Unix/Linux command reference by Jacob Peddicord/FOSSwire.com

    Share

    Posted in *nix, Humour, Notepad | No Comments »

    Using GIT version control system

    25th December 2008

    One of my projects – COTRASIF – has grown complex enough to necessitate the use of version control system (VCS).

    The most frequently mentioned is definitely SVN (SubVersion).

    However, with a characteristic scrupulosity, I decided to run my own comparison of the available tools. I had a look at Darcs, Mercurial, SVN, and Git. Of these, only SVN is not a distributed VCS (but there is SVN addon which adds distributed features to SVN). Unfortunately, I didn’t take any notes during comparison, so there will be no details on how the choice narrowed down to Mercurial vs Git. These dVCSs are quite similar, with the following major differences: Mercurial is better documented and (much?) easier to use than Git; Git is more feature-rich, and Git currently has more add-on modules. Here the differences almost end. I decided that learning curves never were an obstacle, so Git is currently my first distributed VCS of choice (please note: I’ve never before used any version-control systems).

    After choosing Git, I had to install Git central repository on a server. (Yes, Git is distributed, but central repository on the always-on server is a convenience worth the trouble; and again, this adds yet another backup copy.)

    This is a collection of resources I found useful when setting up my Git repository:

    1. Hosting Git repositories, easy and secure way (note: do not create the user manually, installation of gitosis package does that for you automagically).
    2. Setting up Git repository on Dreamhost.
    3. gitosis: how to add new repository

    Some more resources on how to use Git:

    1. Git user manual
    2. Git guide
    3. Git recipes (branching and merging in examples)
    4. everyday Git with 20 commands
    5. version control with git – tutorial

    Update: Git is simple enough to get started in minutes. So far I had only used clone/push/pull/commit/gc commands, but I’m familiar with tag/branch/checkout commands. The drawback of insufficient documentation (as mentioned above) isn’t really a problem now. I’m not using any GUIs for git (as sometimes I’m working on a remote server via ssh), but of the three locally tried GUIs I liked gitk the most; both git-gui and qgit feel less convenient than gitk, but are approximately equal. I wish I had some SVN/Mercurial/Darcs experience to be able to recommend Git – but I don’t have that :)

    Share

    Posted in *nix, Links, Software | No Comments »

    How to fix “MySQL server has gone away” (error 2006)

    25th December 2008

    Source: George from vbulletin team.

    Two most common reasons (and fixes) for the MySQL server has gone away (error 2006) are:

    1. Server timed out and closed the connection. How to fix: check that wait_timeout variable in your mysqld’s my.cnf configuration file is large enough. On Debian: sudo nano /etc/mysql/my.cnf, set wait_timeout = 600 seconds (you can tweak/decrease this value when error 2006 is gone), then sudo /etc/init.d/mysql restart. I didn’t check, but the maximal value for wait_timeout might be around 28800 seconds (8 hours).
    2. Server dropped an incorrect or too large packet. If mysqld gets a packet that is too large or incorrect, it assumes that something has gone wrong with the client and closes the connection. You can increase the maximal packet size limit by increasing the value of max_allowed_packet in my.cnf file. On Debian: sudo nano /etc/mysql/my.cnf, set max_allowed_packet = 64M (you can tweak/decrease this value when error 2006 is gone), then sudo /etc/init.d/mysql restart.

    If you get MySQL server has gone away (error 2006) when using MySQL ODBC driver – give this hint a try.

    Share

    Posted in *nix, how-to, Software | 54 Comments »

    How to print a single page from PDF file using Linux command line interface (CLI)

    30th October 2008

    There are several ways to do that, I’ll describe the one which worked for me. Please note, that printing from CLI has an advantage of being able to print out something at work from the comfort of your home and ssh :) (provided that the printer is on and is loaded with paper).

    To extract a single page (or a range of pages), I used pdftops:
    Read the rest of this entry »

    Share

    Posted in *nix, how-to, Software | 2 Comments »

    Citation and reference managers for Linux: short overview

    29th October 2008

    For some period of time, I had to switch to my Windows installation when writing articles with references, because I keep my references database there and there is an extremely convenient add-on for MS Office to insert citations and format bibliography on the fly.

    However, it is quite inconvenient to make/run programs/scripts under Linux, and then switch to Windows to describe the obtained results in the article-like form. Thus, I briefly investigated available citation managers for Linux.
    Read the rest of this entry »

    Share

    Posted in *nix, Links, Science, Software | 3 Comments »

    Why I love Debian

    4th October 2008


    I love Debian, too.

    Though I prefer ‘testing’ (which is currently codenamed Lenny) over ‘stable’ (aka Etch).

    Share

    Posted in *nix, Links, Misc | 1 Comment »

    Debian, fgl_glxgears: Using GLX_SGIX_pbuffer… Segmentation fault

    1st October 2008

    If you get Segmentation fault when trying to run fgl_glxgears in your Debian desktop environment, most often this would mean that 3D acceleration isn’t enabled.

    For the case of ATI (and ATI Mobility) Radeon series, the easiest procedure would be (doing all as root, or prepending sudo to all commands):

    1. aptitude update, to ensure you’ve got the list of latest packages
    2. aptitude install fglrx-driver fglrx-control fglrx-kernel-src, for the actual driver; I also installed fglrx-atieventsd and fglrx-glx (these are driver-recommended packages)
    3. aptitude install module-assistant, required for building the kernel module
    4. module-assistant prepare, to verify that you have everything needed for the module build procedure
    5. module-assistant update
    6. module-assistant auto-install fglrx, to build and install the fglrx kernel module
    7. depmod -a
    8. modprobe fglrx, to load the fglrx kernel module
    9. aticonfig ––initial, to configure ATI’s device section in /etc/X11/xorg.conf (for more options, see aticonfig ––help)
    10. reboot

    Read the rest of this entry »

    Share

    Posted in *nix | 5 Comments »