Grep + Awk Comments Off

another tips for unix file management :

how to use grep an awk combined ? here is a simple example : i want to delete those boring ._* files created by macosx that i scp to my server

make a test :
find myDirectory/ "\._*" | grep "\._" | awk '{print "rm "$1}' > tmp_file

if cat tmp_file looks good, then execute the code !
find myDirectory/ "\._*" | grep "\._" | awk '{print "rm "$1}' | sh

there is probably better but i just know this tips :)

Tags: sysadmin, tips, ubuntu

How to add a post-commit mailing on SVN Comments Off

Here is a short mémo on how setting up an automatic emailing when a user commits files on a svn repository
Assuming you use a Ubuntu/Debian-based OS.

  1. First step : make sure you have a functionnal SVN-repository on the machine
  2. 2nd step : we’ll need libsvn-notify-perl package :sudo apt-get install libsvn-notify-perl
  3. You may now have the svnnotify binary in /usr/bin/ or something like this. try whereis svnnotify if you don’t know where it is
  4. go to you repository’s directory:cd /home/myname/svn/project1/
  5. create a file named post-commit in ./hooks/ and make it executable by www-datatouch ./hooks/post-commit && chown www-data:www-data ./hooks/post-commit && sudo chmod u+x ./hooks/post-commit
  6. Now edit post-commit file and write the following :#!/bin/sh
    REPOS="$1"
    REV="$2"
    /usr/bin/svnnotify -r "$REV" -C -d -H Alternative \
    --alt HTML::ColorDiff -p "$REPOS" -t "to@domain.tld" \
    --from 'from @ domain.tld ' \

    just replace to@domain.tld and from@domain.tld by your correct email adresses (advising that to@domain.tld may be a mailing-list that mail all the people that work on the project)
  7. Additionnaly, you can add this : --reply-to `cat "/home/myname/etc/svn-authors/myproject/$AUTHOR"`\ assuming that you have files that contains the email of each svn-user in the /home/myname/etc/svn-authors/myproject/ directory
    E.G : in the etc/svn-authors/myproject/ directory you can
    echo -n 'firstName.lastName@domain.tld' > userPseudo foreach of yours svn-users

Good luck !

Tags: devloppement, svn, sysadmin, tips, tool, ubuntu

Décembre 2008 : Mashup Comments Off

  • Namely, pour les féru du clavier, cet AppsLauncher vous permettra probablement de gagner pas mal de temps. De plus il est gratuit ce qui n’enlève rien a son charme .
  • Duplicity, un logiciel (Linux) basé sur Rsync et GPG pour effectuer des sauvegardes de données.
  • pour installer Ubuntu sur un macbook, c’est ici que ça se passe
  • Nice form, relookez vos formulaires !
  • le CSS expliqué encore une fois à ceux qui n’ont pas la fibre graphique : Why Programmers Suck at CSS Design
  • Voila maintenant quelques temps que je me fait à l’idée que le CSS n’est bien que quand il est utilisé a fond, donc quand il est utilisé via JS (Merci IE …). Eric meyer nous en parle ici : JavaScript Will Save Us All
  • Et pour finir, un billet de Jonathan Snook. Un petit tutorial pour Animer des menus via Javascript, toujours sur une base de Jquery.
Tags: backup, Bookmarks, CSS, JavaScript, macbook, Macosx, ubuntu