Maxime Chambreuil » Information Technology

[english]Tooltips for GIT[/english]

Auteur: 
Max

[english]
GIT

Initialization

$ git config --global user.name "Your Name Comes Here"
$ git config --global user.email you@yourdomain.example.com

Cloning
$ git clone git+ssh://sflphone_org@sflphone.org/git/sflphone.git

Edit .git/config to have :

VoIP with Ekiga

Auteur: 
Max

Ekiga

As I will be moving in August, I have asked Bell Canada to install the new line on August the 1st and terminate the old one on the 20th. Unfortunately, they cut the old one on the 1st.

Great news, I still have Internet. Bad news, this is my mom birthday and I can’t call her! Such a good opportunity to try and use VoIP softwares on Ubuntu Feisty Fawn.

Ubuntu Live

Auteur: 
Max

Ubuntu LiveI went to the Ubuntu Live last week-end. it was the first Ubuntu conferences, sponsored by Canonical.

How do I use GPG ?

Auteur: 
Max

Here are the basics command after installing gnupg :Generate his public and private key :

$ gpg --gen-key

Publish his public key :

$ gpg --keyserver wwwkeys.pgp.net --send-key [your email]

Retrieve public keys :

$ gpg --keyserver wwwkeys.pgp.net --search-keys [email]
$ gpg --keyserver wwwkeys.pgp.net --recv-keys [hexadecimal code of the key]
$ gpg --sign-key [email]

List all your keys :

$ gpg --list-keys

Update/Modify key :

$ gpg --edit-key [email]

Delete key :

How can I protect a part of a website ?

Auteur: 
Max

You have to create an .htaccess file in the directory you want to protect. Here is an example of the syntax :

AuthUserFile /home/*/*/protected/.htpasswd
AuthGroupFile /dev/null
AuthName ByPassword
AuthType Basic
<Limit GET POST>
require valid-user
</Limit>

Then you just have to use the htpasswd command of the Apache Web Server to create a base of users and encrypted passwords :

# htpasswd -c .htpasswd user

How to use CVS ? What are the basic commands ?

Auteur: 
Max

Set your CVSROOT variable environment in your .bashrc :

$ export CVSROOT=:ext:@:/path/to/cvs/repository

To import an existing project to the CVS server :

$ cd files/of/your/project
$ cvs import -m " - Initial version."
init devel

To upload files to the CVS server :

$ cvs commit -m "Comments"

To retrieve files from the CVS server :

$ cvs checkout

To update your files from the CVS server :

$ cvs update

To get information of a file :

$ cvs log

To compare your file from his copy on the CVS :

$ cvs diff

Administration

Auteur: 
Max

GNU/LinuxHow to add a user to an existing group ?
$ adduser -g group -d /home/group/user user

How to create a block device from a file ?

For a 100M size file:

$ dd if=/dev/zero of=/root/block1 bs=100M count=1
$ losetup /dev/loop0 /root/block1
$ mkfs -j /dev/loop0
$ mount -t ext3 /dev/loop0 /mnt/newfs