Autarchy of the Private Cave

Tiny bits of bioinformatics, [web-]programming etc

    Archive for February, 2009

    Installing new Debian systems with debootstrap

    26th February 2009

    (…)
    it is a very useful tool for performing installations if you’ve got something like a LiveCD which supports your hardware.
    (…)

    Installing new Debian systems with debootstrap, and also as a debootstrap PDF (with comments).

    Share

    Posted in *nix, Links | No Comments »

    The Visualized Crisis of Credit

    26th February 2009

    Everybody already knows that, but this visualization is good:


    The Crisis of Credit Visualized by Jonathan Jarvis.

    Share

    Posted in Misc, Society, Welfare | No Comments »

    gitosis: how to add new repository

    20th February 2009

    I assume that you already have your gitosis-admin repository working (this is described elsewhere).

    1. cd gitosis-admin && git pull – enter your gitosis administrative repository and ensure it is up-to-date
    2. $EDITOR gitosis.conf
    3. add [group newreponame] section (newreponame is the name of your new repository being added); add yourself with members = yourlogin@yourhost line; also add writable = newreponame line:

      [group newreponame]
      members = yourlogin@yourhost
      writable = newreponame

    4. based on my assumption of a correctly setup gitosis-admin repository, you should already have the appropriate public key in the keydir directory, but if not – copy your user’s ssh public key to keydir in the form of yourlogin@yourhostname.pub, then do git add keydir/yourlogin@yourhostname.pub
    5. git commit -am ‘new repository: newreponame’; git push;
    6. now that you have the new repo permissions configured, let’s actually create it. Navigate to the directory holding the files of your project (e.g. cd ~/newreponame), and do git init; git add . – this initializes empty git repository, and then adds all the files to it. If you have no files – you can skip the ‘git add .’ command, as it will do nothing for you.
    7. git commit -m ‘initial commit’. If you had no files added to the commit, git will complain that it cannot create an empty commit. In this case use the command git commit ––allow-empty -m ‘initial commit’
    8. git remote add origin ssh://gitosis@yourGitosisServerName/newreponame.git
    9. git push ––all
    10. final thing: git config ––add branch.master.remote origin && git config ––add branch.master.merge refs/heads/master; alternatively, cd .git && $EDITOR config, and then add these lines:

      [branch "master"]
      remote = origin
      merge = refs/heads/master

      Without these lines, you won’t be able to git pull.

    Share

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

    GSoC 2009 is now open

    14th February 2009

    GSoC 2009 FAQs

    Don’t forget to update your personal calendars with important GSoC 2009 dates.

    Share

    Posted in Links, Software | No Comments »

    WordPress and Google Analytics external nofollow problem in comment links

    13th February 2009

    Since some WP release, the comment author’s link in comments is broken – it has ‘ external nofollow’ attached straight to the href attribute (which breaks the link).

    I assume that the problem is caused by Google Analytics, namely the “track outgoing clicks” feature (as recalled, might be inaccurate feature name). “Track outgoing links” adds some JavaScript code to all outgoing links, and that script has tick characters like this one ‘ which, incidentally, are also used for delimiting the values of comment anchor tags.

    To fix:
    Read the rest of this entry »

    Share

    Posted in CMS, how-to, PHP, Programming, Software, Web | 2 Comments »

    Git: how to remove file and commit from history

    13th February 2009

    Once I accidentally added circa 300 MiB of archive files to one of my git repositories (which was as small as 5 MiB). I removed those files as soon as I noticed them, but the .git directory still preserved commits with those files, and still occupied over 300 MiB.

    I have found the solution at stackoverflow (see also this question).

    This method worked for me, but I couldn’t push my rebased repository to the gitosis. I would need to re-init the gitosis repository from my rebased, but I’m not yet prepared to do that.

    There is also a slightly different method (which relies on a temporary tag instead of a temporary branch), documented in Git online manual pages; I prefer the temporary branch method.

    Below is a full copy-paste of the winning answer by Charles Bailey:

    # create and check out a temporary branch at the location of the bad merge
    git checkout -b tmpfix

    # remove the incorrectly added file
    git rm somefile.orig

    # commit the amended merge
    git commit –amend

    # go back to the master branch
    git checkout master

    # replant the master branch onto the corrected merge
    git rebase tmpfix

    # delete the temporary branch
    git branch -d tmpfix

    Also, in my case this thread at stackoverflow was highly useful. I start enjoying the concise and compact style of Charles Bailey :) :
    Read the rest of this entry »

    Share

    Posted in how-to, Links, Programming | 2 Comments »