lundi 20 juillet 2009

open microblogging tool (or : An open source twitter)

Laconi.ca is used on the website identi.ca as an open microblogging
tool. Microblogging is well known with the famous Twitter that allows
post of ~140 characters


The platform is freely (AGPL) available at :

http://laconi.ca/

There are plenty of plugins and application that can use it, and for
example it is working with :
* webinterface
* Jabber/GTalk
* email
* SMS


For those who only want to try it, they even made a concurrent of
twitter using the platform :

http://identi.ca/

tag: web, blog, php, opensource

jeudi 16 juillet 2009

Jgraph, command line tool for graphics

Command-line graph production.

The input describe some plotting or curving with a language quite straightforward to read and write, and produces an image (ps, eps, gif, ...).


Main Website :
http://www.cs.utk.edu/~plank/plank/jgraph/jgraph.html

Some examples & first hands on Jgraph :
http://www.cs.utk.edu/~plank/plank/classes/cs494/494/notes/Jgraph/lecture.html

"Brief Description"
"Jgraph is a program that takes the description of a graph or graphs as input, and produces a postscript file on the standard output. Jgraph is ideal for plotting any mixture of scatter point graphs, line graphs, and/or bar graphs, and embedding the output into LaTeX, or any other text processing system that can read postscript. "


There are 2 JGraph, and the most referenced on the web search engines is a Java library. This is obviously NOT about that jgraph...

PDF tool kit : pdftk

pdftk is a toolkit available for example on ubuntu repositories. It seems to be from the "PDF Hacks" book.


Main Webpage :
http://www.accesspdf.com/pdftk/


List of the features found on the website (Latest Version: 1.41, Released: November 28, 2006) :

  • Merge PDF Documents
  • Split PDF Pages into a New Document
  • Rotate PDF Pages or Documents
  • Decrypt Input as Necessary (Password Required)
  • Encrypt Output as Desired
  • Fill PDF Forms with FDF Data or XFDF Data and/or Flatten Forms
  • Apply a Background Watermark or a Foreground Stamp
  • Report on PDF Metrics such as Metadata, Bookmarks, and Page Labels
  • Update PDF Metadata
  • Attach Files to PDF Pages or the PDF Document
  • Unpack PDF Attachments
  • Burst a PDF Document into Single Pages
  • Uncompress and Re-Compress Page Streams
  • Repair Corrupted PDF (Where Possible)

vendredi 10 juillet 2009

svn + ssh on NetBSD

Problème : sur une machine uniquement accessible en ssh, je souhaite installer un serveur svn pour la gestion de version. Je souhaite avoir plusieurs utilisateurs. Ces utilisateurs doivent pouvoir faire des "checkout", des "commit", et autres opérations avec svn, mais ne doivent pas pouvoir se logguer sur le serveur pour autre chose que pour utiliser le serveur.

1ère étape :
Création d'un utilisateur svn qui sera celui utiliser pour se logguer sur le serveur.

1.1 Authentification par clefs publique/privée ssh

 Chaque utilisateur créé une clef ssh ( ssh-keygen ). Ajouter la clef publique générée dans ~/.ssh/authorized_keys

cat clef.pub > ~svn/.ssh/authorized_keys

Maintenant les utilisateurs peuvent se logguer directement en tant que l'utilisateur svn.

Allons voir un peu plus avant le contenu du fichier ~svn/.ssh/authorized_keys ...
Chaque ligne est indépendante, et de la la forme
  command="COMMAND" TYPE KEY COMMENT

En utilisant cette syntaxe, pour restreindre l'accès uniquement au service svn, on peut également ajouter "no-port-forwarding" ainsi que "no-agent-forwarding,no-X11-forwarding,no-pty"
  command="svnserve -t",no-port-forwarding TYPE KEY COMMENT

ainsi l'on utilisera une fois la clef ssh enregistrée (ssh-agent bash; ssh-add clef)

svn co svn+ssh://svn@host/path/to/base/repos




1.2 Plusieurs utilisateurs
Pour l'instant tout le monde se loggue en tant qu'utilisateur "svn". En particulier, il est ainsi impossible de différentier les auteurs des différents commits effectués.



ajouter l'option "--tunnel-user=user" également pour l'identifier.


2ème étape : Eviter d'avoir à afficher tout le path sur le serveur

Si le repo est dans /path/to/base/repos, alors :
  command="svnserve -r /path/to/base/",no-port-forwarding TYPE KEY COMMENT

Attention
:
il semble que l'option -r et l'option -t soient incompatibles si l'on utilise pas l'option --tunnel-user


3 Et Au Final...

Nous obtenons dans le fichier ~svn/.ssh/authorized_keys :
   command="/path/to/svnserve -t -r /repository/root --tunnel-user=alice",no-port-forwarding,no-agent-forwarding,no-X11-forwarding,no-pty TYPE1 KEY1 COMMENT1
command="/path/to/svnserve -t -r /repository/root --tunnel-user=bob",no-port-forwarding,no-agent-forwarding,no-X11-forwarding,no-pty TYPE2 KEY2 COMMENT2



1.4 liens/remerciements.



lundi 6 juillet 2009

PowerTOP

PowerTOP présente une fenêtre ressemblant à ce que rend la commande "top", mais en fonction de l'utilisation des ressources en terme d'énergie.
Il tourne pour les processeurs Intel, et propose même des suggestions sur comment diminuer la consommation (dé-activation de certains modules, augmentation du temps de certaines vérification faites trop souvent, etc.)

site web :
http://www.linuxpowertop.org


Message d'erreur

J'avais un message m'indiquant :
"no ACPI power usage estimate available"

Bien que n'empèchant pas powertop de tourner, il a pour effet de ne pas m'indiquer quelle est la consommation à un instant donné, ce que powertop sait faire (vu tourner lors d'une démo).

Trouvé un début de solution ici : Smop.co.uk:Power Saving on Linux. Il faut débrancher son portable de la source principale d'énergie. Malheureusement le changement n'est pas persistant, donc cette solution n'est pas parfaite.






NAME
powertop - program to analyze power consumption on Intel-based laptops

SYNOPSIS
powertop

DESCRIPTION
This manual page documents briefly the powertop commands.

powertop is a program that shows the power consumption on Intel-based
laptops and makes suggestions on how to extend battery lifetime.
The program is more fully described at http://www.linuxpowertop.org

mardi 2 juin 2009

Rubber : a LaTeX processing tool

I still have to test it with other .tex files, but I just discovered and tried "rubber", and LaTeX compilation seems to be pretty fast (for an 8 pages document).


It seems that it proposes a tool that compiles and analyses the LaTeX source file to generate either a ps, pdf or dvi, and to run the needed tools : makeindex, bibtex, etc. and all by itself without having to write a complicated makefile.



From "rubber" man pages :

NAME
rubber - a building system for LaTeX documents

SYNOPSIS
rubber [options] sources ...
rubber-pipe [options]

DESCRIPTION
Rubber is a wrapper for LaTeX and companion programs. Its purpose is,
given a LaTeX source to process, to compile it enough times to resolve
all references, possibly running satellite programs such as BibTeX,
makeindex, Metapost, etc. to produce appropriate data files.

The command rubber builds the specified documents completely. The
source files may be either LaTeX sources (in which case the suffix .tex
may be omitted) or documents in a format Rubber knows how to translate
into LaTeX (this currently means CWEB or Literate Haskell documents).
If one compilation fails, the whole process stops, including the compi‐
lation of the next documents on the command line, and rubber returns a
non-zero exit code.


Some Links :

mardi 21 avril 2009

date relative

Utilisation de la commande date pour calculer une date relative en nombre d'heures à partir d'une autre date.

  1. 1ère étape : entrer la date initiale avec date
    $ date --date='2009-03-23 12:00'


  2. 2ème étape : utiliser le résultat obtenu comme base pour y ajouter un décalage en nombre d'heures, soit donc :
    $ date --date="$(date --date='2009-03-23 12:00') +1001 hours"
    Mon May 4 06:00:00 CEST 2009



lundi 20 avril 2009

Aptitude, apt & cie. (Mainly for Debian, but Ubuntu works on the same way)

Ce post tourne autour des commandes apt, aptitude et dpkg

Installer une selection de paquets :


D'un côté :
$ dpkg --get-selections > liste-pkg

De l'autre côté :
# dpkg --set-selections < liste-pkg
# apt-get dselect-upgrade


Ressources non officielles de paquets pour Debian





Paquets installés automatiquement (jeux de dépendance)


$ aptitude why python-notify


Update automatique sans interaction humaine



export DEBIAN_FRONTEND=noninteractive
yes '' | apt-get -y -o Dpkg::Options::="--force-confdef" -o
X Dpkg::Options::="--force-confold" dist-upgrade


(originaire de : http://www.ouaza.com/livre/admin-debian/
site web du livre "Cahier de l'admin, sur GNU/Linux «Lenny» " )

Utile également :
https://help.ubuntu.com/community/Repositories/CommandLine

mercredi 1 avril 2009

convert .wmv to .avi

mencoder infile.wmv -ofps 23.976 -ovc lavc -oac copy -o outfile.avi

mercredi 4 mars 2009

commandlinefu

Fantastique !

http://www.commandlinefu.com

c'était un peu l'idée de ce blog au départ, bien que cela ait un peu dévié...

En se retrouve sur ce site avec un équivalent twitter, mais uniquement pour des lignes de commande !

exemple, cette commande que j'avais eu l'occasion de chercher un jour pour une vidéo prise avec mon appareil photo...
mencoder -vf rotate=1 -ovc lavc -oac copy "$1" -o "$1"-rot.avi