mercredi 16 novembre 2011

My Technology Fetish: Set VLAN ID on a Network Adapter in Windows 7

My Technology Fetish: Set VLAN ID on a Network Adapter in Windows 7: Here are the steps to set a VLAN (Virtual LAN) ID on a network adapter in Windows 7

Set VLAN ID on a Network Adapter in Windows 7

Here are the steps to set a VLAN (Virtual LAN) ID on a network adapter in Windows 7:
  1. Right click on Computer > Click Properties
  2. Click Device Manager
  3. Expand Network Adapters
  4. Right click on the adapter you want to set the VLAN for > Click Properties
  5. Click on the Advanced Tab
  6. Under the Property window select VLAN ID
  7. In the Value window set your VLAN ID
  8. Click OK.

Your VLAN ID is now set. This same procedure should work in other versions of Windows with a sleight variation.

mercredi 19 octobre 2011

Carte CPS sous ubuntu karmic ou plus

Introduction

Cet article se propose de vous guider dans l’installation des librairies cryptographiques CPS sous Ubuntu version karmick ou plus.

Préparation

Téléchargez les librairies cryptographiques soit sur le site du ASIP Santé Editeurs rubrique Téléchargement logiciels.

L’archive pour linux est mal nommée. Renommez-la correctement :
:~$ mv cryptocpspcsc-101-1i386rpmtar.gz cryptocpspcsc-101-1i386rpm.tar.gz
Extrayez le paquet rpm contenu dans cette archive :
:~$ tar xvzf cryptocpspcsc-101-1i386rpm.tar.gz
Fabriquez le paquet debian :
:~$ fakeroot alien CryptoCpsPcsc-1.0.1-1.i386.rpm

Installation

Installez le paquet avec gdebi (il installera aussi toutes les dépendances)
:~$ sudo gdebi cryptocpspcsc_1.0.1-2_i386.deb
Si ce n’est déjà fait ajoutez-vous au groupe pcscd (puis déconnectez-vous et reconnectez-vous)
:~$ sudo adduser trucmuche pcscd

Correction de l’installation

Créez le répertoire dans lequel les API Cps tracent leurs opérations :
:~$ sudo mkdir -p /var/opt/santesocial/CPS/log
:~$ sudo chmod 775 /var/opt/santesocial/CPS/log
:~$ sudo chgrp pcscd /var/opt/santesocial/CPS/log
Créez un fichier de configuration PKCS11 pour java
:~$ sudo vi /etc/opt/santesocial/CPS/pkcs11.cfg
#
# Configuration du provider PKCS#11 java Sun
#
# Tester avec la commande suivante :
# keytool -keystore NONE -storetype pkcs11 -providerClass sun.security.pkcs11.SunPKCS11 -providerArg ./pkcs11.cfg -list
name=GipCpsiTest
library=/usr/lib/libcps_pkcs11_pcsc_lux.so
description=Librairie cryptographique du GIP-CPS
Insérez une carte dans le lecteur et lancez la lecture de la carte depuis java en tant que root :
:~$ sudo keytool -keystore NONE -storetype pkcs11 -providerClass sun.security.pkcs11.SunPKCS11 -providerArg /etc/opt/santesocial/CPS/pkcs11.cfg -list
Saisissez votre code pin lorsque le programme vous de demande et vérifiez que vous obtenez quelque chose du genre :
Type Keystore : PKCS11
Fournisseur Keystore : SunPKCS11-GipCpsiTest
Votre Keystore contient 2 entrée(s)
MARIE SAGE0422 (signature), PrivateKeyEntry,
Empreinte du certificat (MD5) : 7A:BD:A5:79:05:7D:4A:C7:AA:81:65:7E:12:0C:23:30
MARIE SAGE0422 (authentification), PrivateKeyEntry,
Empreinte du certificat (MD5) : BC:B0:37:F3:7A:7A:49:8C:D5:B5:68:BA:C8:9B:7B:0A
Modifiez les permissions du fichier créé par la commande précédente :
:~$ sudo chmod 664 /etc/opt/santesocial/CPS/ccert.bin
:~$ sudo chgrp pcscd /etc/opt/santesocial/CPS/ccert.bin
Relancez la lecture de la carte sous votre propre identité :
:~$ keytool -keystore NONE -storetype pkcs11 -providerClass sun.security.pkcs11.SunPKCS11 -providerArg /etc/opt/santesocial/CPS/pkcs11.cfg -list
Tapez votre code pin et vérifiez que vous obtenez les mêmes informations que précédemment.
Si c’est la cas : vous avez terminé !

mardi 4 octobre 2011

wakeonlan et freebox

Source: Le blog de Michauko

Installer le paquet :
apt-get install wakeonlan
Puis :
wakeonlan -i 82.x.y.z 00:12:34:56:78:90

mardi 26 juillet 2011

Si vous êtes harcelé par un huissier ou un cabinet...

Source : Antibanque


Un organisme, une banque, une maison de crédit, un opérateur, une assurance ou autre, estime que vous leur devez de l’argent. Vous n’êtes pas d’accord et vous contestez.

Votre créancier mandate un cabinet de recouvrement. Et le harcèlement commence. Appels téléphoniques et correspondances quotidiennes avec menaces, chantage et intimidation.

Ils vont demander votre condamnation au tribunal, ils vont venir saisir vos meubles en votre absence, ils vont bloquer vos comptes, ponctionner votre salaire et même s’en prendre à votre entourage, parents, enfants, etc.

Cet enfer est une réalité pour des millions de nos concitoyens. Pourtant, il y a plusieurs choses qu’il faut savoir. D’abord, ces démarches sont illégales.

Si vous devez réellement de l’argent, votre créancier n’a qu’une possibilité : mandater un huissier pour qu’il fasse valider la créance auprès du tribunal d’instance. Le cas échéant, il obtient une ordonnance portant injonction de payer. Ensuite, il vous présente ce document. Vous avez un mois pour faire opposition. Ce que vous faites. Puis le juge vous convoque et vous pourrez lui exposer vos arguments.

Pour obtenir une telle ordonnance, l’huissier doit avoir un dossier en béton, sans vice de forme. En réalité, il est très rare qu’un créancier puisse fournir un tel dossier.

Comme il est sûr de se faire débouter par le juge, alors il utilise des moyens illégaux comme ceux que je viens d’exposer.

Si vous êtes la cible d’un de ces organismes, je vous conseille de lui faire adresser la lettre suivante en recommandé avec accusé de réception.


Messieurs,

Vous m’avez prévenu que l’organisme XXX vous a mandaté pour recouvrir une certaine créance.

Cette somme étant l’objet d’une contestation de ma part, j’use de mon droit de demander l’arbitrage de l’autorité judiciaire.

Il appartient donc à cet organisme de solliciter le juge d’instance aux fins d’obtenir une « ordonnance portant injonction de payer ».

Le cas échéant, dès que celle-ci me sera signifiée par voie d’huissier, et en fonction des éléments présentés, je me réserve le droit, soit de payer, soit d’y faire opposition dans le délai d’un mois.

Le juge d’instance ou de proximité me convoquera en audience et je pourrais alors lui exposer mon point de vue, documents à l’appui.

Le juge pourra alors valablement trancher sur la validité de ladite créance ou non.

Il n’y a pas d’autres procédures. Je vous demande donc expressément de cesser vos relances et d’informer l’organisme qui vous a mandaté de ma position.

A partir de la date de réception de cette lettre, toutes relances de votre part, tant par courrier que par téléphone, seront considérées comme du harcèlement et de l’intimidation. Je n’hésiterai pas à porter plainte pour ce motif, ce qui hypothèquera sérieusement vos chances d’obtenir la validation de la dette par les voies judiciaires.

Je vous prie de croire, messieurs, en l’expression de mes sentiments respectueux.


www.aplombfrance.fr

mardi 19 juillet 2011

GIMP dans UNE SEULE fenêtre !

Source : WebUpd8


GIMPBox: Get A Single-Window Mode In Stable GIMP (2.6.x)




GIMP Single Window GIMPBox

GIMP from SVN (2.7.x) comes with a built-in single-window mode (can be disabled) but I find it unstable sometimes so I prefer to use the stable GIMP 2.6.x, especially since there are so many goodies you can use to enhance it, like GIMP Painter and GIMP Paint Studio, G'MIC or the GIMP Plugin Registry package.

So if you want to use the stable GIMP 2.6.x (tested with GIMP 2.6.11 under Ubuntu 11.04) and still get a single-window mode in GIMP, here's how to do it using a script called GIMPBox.


GIMPBox is a python script which wraps all the GIMP windows into one window. It does not modify GIMP and you use it by changing the GIMP shortcut to launch GIMPBox instead of GIMP. You can open multiple images at the time thanks to a tab bar that GIMPBox will display at the bottom of the window (the tabs include previews too).


Before proceeding, there are a few issues that occur when using GIMPBox that you should know about:
  • when launching GIMPBox, there is a slight delay (probably 1-2 seconds) when GIMP is not running as single-window. But like I said, the delay is very small;
  • If you use Unity and AppMenu (Global Menu) is enabled, the GIMP menu won't show up on the top panel. You can still access the menu by right clicking inside the GIMP window or by running GIMPBox with a special command (see below) which will make the menu to show up in GIMP (but it's not possible to get the menu to show up on the top panel) like in my screenshot.
  • You can't open multiple images by right clicking an image and selecting to open it with GIMP.
  •  By default, the keyboard shortcuts won't work. However, there is a way around this: you can press TAB and then you should be able to use the keyboard shortcuts. This is only required once for a session, but if you edit multiple images in the same time and keep switching between them, you'll have to press TAB again to use keyboard shortcuts.
  • it doesn't work with GNOME3

If you are ok with these issue and want to use GIMPBox, let's proceed.



GIMPBox: single-window mode for GIMP (stable - 2.6.x)



1. Install the GIMPBox script.

If you want to take a look at the script, download it from HERE. For easier installation, copy/paste the commands below in a terminal:
sudo apt-get install python-wnck
sudo wget http://gimpbox.googlecode.com/hg/gimpbox.py -O /usr/local/bin/gimpbox
sudo chmod +x /usr/local/bin/gimpbox


2. Edit the GIMP shortcut to run the GIMPBox script instead of GIMP.

Search for "Main Menu" in Dash or for the classic GNOME desktop, right click the menu and select "Edit Menus". Then, under "Graphics" select "GIMP Image Editor", click Properties and:

a) If you don't use Unity with AppMenu (global menu), replace "gimp-2.6 %U" with "gimpbox %U":

GIMPBox



b) If you use Unity with AppMenu (global menu) enabled, replace "gimp-2.6 %U" with "env UBUNTU_MENUPROXY= gimpbox %U" (yes, there's a space after "="):

GIMP Single Window GIMPBOx

The special shortcut for those who use AppMenu is required because using GIMPBox, the AppMenu won't work. Using "UBUNTU_MENUPROXY= " will disable the AppMenu for GIMPBox so the menu will be displayed inside the window, like in my screenshot.


If you want to edit the system-wide GIMP shortcut, open a terminal and copy/paste this:
gksudo gedit /usr/share/applications/gimp.desktop

And in this file, use the same command as explained above (under a and b) for launching GIMP.



TIP: If you change Toolbox or the "Layers, Channels, Paths..." dialogs and they don't stick in GIMPBox anymore, close GIMP and run the following command to fix this:
rm ~/.gimp-2.6/sessionrc

Thanks to Pinguy for sending us the tip; info via PinguyOS forums (we've adapted the instructions for Unity / Appmenu; if you use the old GNOME2 Global Menu panel applet, see Pinguy's post for instructions on getting the menu to show in in GIMP/GIMPBox).

mardi 3 mai 2011

Fusionner deux vidéos AVI

cat file1.avi file2.avi file3.avi > video_draft.avi
mencoder video_draft.avi -o video_final.avi -forceidx -ovc copy -oac copy

Cool ! :) Linux c'est trop puissant :)

jeudi 28 avril 2011

MAJ Ubuntu 10.04 -> 11.04 = Kernel panic - not syncing VFS: Unable to mount root fs on unknown-block ()

"Oups" comme dirait l'autre !

LA solution : booter avec un liveCD kivabien puis :
mkdir /mnt/linux
mount /dev/sda1 /mnt/linux —-> sda1 is my system root partition
chroot /mnt/linux /bin/bash
mount -t proc /proc /proc
dpkg --reconfigure -a
puis éventuellement :

aptitude reinstall linux-image-2.6.38-8-generic

puis surtout : rebooter avec un vieux kernel en mode rescue et refaire un petit coup de
dpkg --reconfigure -a

vendredi 25 février 2011

Conversion MKV DTS vers AC3 : script automatisation

Encore un petit script maison bourrin :)
Edit du 1er mai 2011 : Support de la détection auto de la piste DTS FR

#!/bin/bash
SRC_FILE=$1
PISTEDTS=$2

function usage() {
    echo "Usage : mkv2ac3 source [PISTEDTS]"
    echo "Converti le fichier MKV-DTS en MKV-AC3-DTS"
    echo " Syntaxe :"
    echo "    source"
    echo "        le fichier MKV contenant a minima une piste DTS FR"
    echo "    PISTEDTS (optionnel) "
    echo "        le numéro de la piste DTS à convertir en AC3"
    echo " Dépendances :"
    echo "    libdca-utils    -    decoding library for DTS Coherent Acoustics streams (utilities)"
    echo "    aften        -    encodeur audio AC3"
    echo "    mediainfo    -    Informe du contenu d'une vidéo"
}


if [ -z "$SRC_FILE" ]; then
    usage
    exit 0
else
    if [ ! -f "$SRC_FILE" ]; then
        echo "Fichier $SRC_FILE introuvable"
        exit 0
    fi
fi

DTS=`echo "$SRC_FILE"|sed 's/\(.*\)mkv/\1dts/'`
AC3=`echo "$SRC_FILE"|sed 's/\(.*\)mkv/\1ac3/'`
DEST_FILE=`echo "$SRC_FILE"|sed 's/\(.*\)mkv/\1ac3.mkv/'`

#extraction du numéro de la piste DTS
if [ -z $PISTEDTS ]; then
    #INFO_MAX_LINE=`mkvinfo "$SRC" | grep -n Chapters | cut -d: -f1`
    #SUMMARY=head -n $INFO_MAX_LINE `mkvinfo --summary "$SRC"`
    mediainfo --Inform="Audio;Piste #2 %ID% (%Format%) -> %Language%\n" $SRC_FILE
    PISTEDTS=`mediainfo --Inform="Audio;%ID% %Format% %Language%\n" $SRC_FILE | grep "DTS" | grep "fr" | awk '{print $1}'`
    echo "Piste DTS FR détectée : #$PISTEDTS"
    read -p"Appuyer sur entrée pour continuer, ou spécifiez un n° de piste choisie : " reponse
    if [ "$reponse" != "" ]; then
        PISTEDTS=$reponse;
    fi
fi

echo "Extraction de la piste DTS #$PISTEDTS"
mkvextract tracks "$SRC_FILE" $PISTEDTS:"$DTS"

echo "Conversion de la piste DTS en AC3 $AC3"
dcadec -o wavall "$DTS" | aften -b 640 - "$AC3"

echo "Création du nouveau fichier MKV AC3/DTS $DEST_FILE"
mkvmerge -o "$DEST_FILE" \
--default-track 1:no --forced-track 1:yes -d 1 -s 4 -A -T --no-global-tags "$SRC_FILE" \
--language 0:fre --default-track 0:yes --forced-track 0:yes -a 0 -D -S -T --no-global-tags --no-chapters "$AC3" \
--language 0:fre --forced-track 0:no -a 0 -D -S -T --no-global-tags --no-chapters "$DTS" \
--track-order 0:1,1:0,2:0,0:4

Iphone : sonnerie personnalisée

Petit script bourrin maison.
#!/bin/bash
if [ ! -z "$1" ]; then
    echo "Fichier à transformer introuvable"
    echo "Usage : $0 [fichier.mp3]"
    exit 0
fi
echo Démarrage de la conversion MP3->M4R

mplayer -ao pcm $1 -ao pcm:file="$1.wav"
faac $1.wav -o $1.m4r
rm $1.wav
rename 's/\.mp3//' $1.m4r