AirV's Blog

Just another blog

Claws-mail

Dépot Ubuntu

ppa:claws-mail/ppa

Déplacement de la bal

  • déplacer le dossier
  • éditer le fichier

~/.claws-mail/folderlist.xml à la main)

Création d’une bal

Par contre il est possible de créer une nouvelle boîte MH où l’on désire. Utilisez un chemin absolu dans le menu Fichier/nouvelle boite.

April, un catalogue de logiciels libres

From april.org :

« …L’April publie le 2 décembre 2010 un catalogue de logiciels libres intitulé « Catalogue Libre. 26 logiciels libres à découvrir ». L’enjeu de ce guide est double. D’une part, présenter des logiciels libres correspondant à des usages quotidiens de l’ordinateur ; par exemple : « lire une vidéo » en référence au célèbre lecteur multimédia VLC. D’autre part, inscrit dans une perspective de promotion du logiciel libre et des sujets afférents, le contenu du catalogue est complété par une série d’encadrés, détaillant des enjeux liés aux logiciels libres… »


Serveur SSH Windows

Copssh is an ssh server and client implementation for windows systems. It is a yet another packaging of portable openssh, cygwin, some popular utilites, plus implementation of some best practices regarding security. You can use copssh for remote administration of your systems or gathering remote information in a secure way.

OpenSSH is a FREE version of the SSH protocol suite of network connectivity tools. It encrypts all traffic (including passwords) to effectively eliminate eavesdropping, connection hijacking, and other network-level attacks. Additionally, OpenSSH provides a myriad of secure tunneling capabilities, as well as a variety of authentication methods. Cygwin is a Linux-like environment for Windows. It consists of a DLL (cygwin1.dll), which emulates substantial Linux API functionality, and a collection of tools.

Comparaison des clients SSH

SSH via le web

WebShell is a web-based ssh shell.

It runs on any browser capable of JavaScript and AJAX. You can use it from any computer or iPhone/smartphone.

The server is written in Python and is very easy to set up on Linux, Mac OS X, *BSD, Solaris, and any Unix that runs python 2.3.

WebShell is based on Ajaxterm.

Migration des bases de données WordPress

From http://www.tipstechtricks.com

Change Siteurl & Homeurl

WordPress stores the absolute path of the site URL and home URL in the database. Therefore, if you transfer your WordPress site from the localhost to your server, your site will not load online. This is because the absolute path URL is still pointing to your localhost. You will need to change the site URL and the home URL in order for the site to work.
Solution:
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldsiteurl.com','http://www.newsiteurl.com') WHERE option_name = 'home' OR option_name = 'siteurl';

Change GUID

After you have migrated your blog from the localhost to your server or from another domain to a new domain, you will need to fix the URLs for the GUID field in wp_posts table. This is crucial because GUID is used to translate your post or page slug to the correct article absolute path if it is entered wrongly.
Solution:
UPDATE wp_posts SET guid = REPLACE (guid, 'http://www.oldsiteurl.com','http://www.newsiteurl.com');

Change URL in Content

WordPress uses absolute path in the URL link instead of a relative path in the URL link when storing them in the database. Within the content of each post record, it stores all the old URLs referencing the old source. Therefore you will need to change all these URLs to the new domain location.
Solution:
UPDATE wp_posts SET post_content = REPLACE (post_content, 'http://www.oldsiteurl.com','http://www.newsiteurl.com');

Change Image Path Only

If you decide to use Amazon CloudFront as your Content Delivery Network (CDN) to offload the delivery of images from your server. After your have created your CNAME record, you can use the query below to change all the image paths in WordPress to load all your images from Amazon CloudFront.
Solution:
UPDATE wp_posts SET post_content = REPLACE (post_content, 'src="http://www.oldsiteurl.com','src="http://yourcdn.newsiteurl.com');
You will also need to update the GUID for Image Attachment with the following query:
UPDATE wp_posts SET guid = REPLACE (guid, 'http://www.oldsiteurl.com','http://yourcdn.newsiteurl.com') WHERE post_type = 'attachment';

Update Post Meta

Updating Post Meta works almost the same way as updating the URL in post content. If you have stored extra URL data for each post, you can use the follow query to change all of them.
Solution:
UPDATE wp_postmeta SET meta_value = REPLACE (meta_value,'http://www.oldsiteurl.com','http://www.newsiteurl.com');

Change Default « Admin » Username

Every default WordPress installation will create an account with a default Admin username. This is wide spread knowledge, everyone who uses WordPress knows this. However, this can be a security issue because a hacker can brutal force your WordPress admin panel. If you can change your default “Admin” username, you will give your WordPress admin panel additional security.
Solution:
UPDATE wp_users SET user_login = 'Your New Username' WHERE user_login = 'Admin';

Reset Password

Ever wanted to reset your password in WordPress, but cannot seem to use the reset password section whatever the reason?
Solution:
UPDATE wp_users SET user_pass = MD5( 'new_password' ) WHERE user_login = 'your-username';

Assign all articles by Author B to Author A

If you want to transfer the articles under Author B to merge with those under Author A, it will be very time consuming if you do it article by article. With the following SQL query, you can easily go through all the records and assign articles by Author B to go under Author A.
You will first need to obtain the author ID of both authors by going to your Author & User page in your WordPress admin panel. Click on the author’s name to view their profile. At the address bar, look for « user_id« . That is the author ID information we require.
Solution:
UPDATE wp_posts SET post_author = 'new-author-id' WHERE post_author = 'old-author-id';

Delete Revision

When you are editing an article in WordPress, there will be many revision copies being saved. This is a waste of resources because excessive revision records can increase the burden of the database. Over time, when you have thousands of entries, your database will have grown significantly. This will increase loop iterations, data retrieval and will affect the page loading time.
Solution:
DELETE a,b,c FROM wp_posts a
LEFT JOIN wp_term_relationships b ON (a.ID = b.object_id)
LEFT JOIN wp_postmeta c ON (a.ID = c.post_id)
WHERE a.post_type = 'revision'
Source from: Lester chan
Note: Bear in mind that all revisions from each post will be deleted, including all of its meta data.

Delete Post Meta

Installing or removing plugins is a very common task for WordPress. Some of the plugins make use of the post meta to store data pertaining to the plugin. After you have removed the plugin, those data are still left inside the post_meta table, which will no longer be needed. Run the following query to clean up the unused post meta value. This will help to speed up and reduce the size of your database.
Solution:
DELETE FROM wp_postmeta WHERE meta_key = 'your-meta-key';

Export all Comment Emails with no Duplicate

Over a period of time, your blog will have received many comments. These comments will include the email addresses left by the commenter. You can retrieve all these emails for your mailing list without any duplicate.
Solution:
SELECT DISTINCT comment_author_email FROM wp_comments;
Once you have the result, under Query results operations, select export to export all the emails in phpMyAdmin.

Delete all Pingback

Popular articles receive plenty of pingback. When this happens, the size of your database increases. In order to reduce size of the database, you can try removing all the pingbacks.
Solution:
DELETE FROM wp_comments WHERE comment_type = 'pingback';

Delete all Spam Comments

If you have plenty of spam comments, going through each page to delete spam can be tedious and frustrating. With the following SQL query, even if you have to face deleting 500 over spam comments, it will be a breeze.
Solution:
DELETE FROM wp_comments WHERE comment_approved = 'spam';
  • 0 = Comment Awaiting Moderation
  • 1 = Approved Comment
  • spam = Comment marked as Spam

Identify Unused Tags

In a WordPress database, if you run a query to delete old posts manually from MySQL, the old tags will remain and appear in your tag cloud/listing. This query allows you to identify the unused tags.
Solution:
SELECT * From wp_terms wt
INNER JOIN wp_term_taxonomy wtt ON wt.term_id=wtt.term_id WHERE wtt.taxonomy='post_tag' ANDwtt.count=0;

Mot de passe Windows

Fonctionnement des partages

  • Activer les mots de passe
    • il faut le bon login / mdp
  • Désactiver les mots de passe
    • si le comtpe n’existe pas ok
    • si le compte existe il faut le bon mot de passe

Astuce

Sous windows seven il est possible d’ajouter un compte administrateur sur une machine (voir le post suivant pour plus de détails)

Utilisez un LiveCD afin d’accéder à votre partition système NTFS (C: depuis Windows).

  • Renommez le fichier Utilman.exe en Utilman.exe.bak situé dans le répetoire C:WindowsSystem32
  • Faites une copie du fichier cmd.exe et renommez le Utilman.exe (tout se passe dans le même répertoire).

Nous venons de remplacer l’exécutable de gestion des options d’ergonomie (Utilman.exe) par l’éxecutable de l’invite de commande (cmd.exe)

Redémarrez votre PC normalement sous Windows (Vista ou Seven).

Créer le nouveau compte admin en ligne de commande en cliquant sur l’icone de gauche

  • net user root /add
  • net user root toto
  • net local group administrateurs root /add

Logiciel

Voir le post suivant pour plus de détails.

Ophcrack is a free Windows password cracker based on rainbow tables. It is a very efficient implementation of rainbow tables done by the inventors of the method. It comes with a Graphical User Interface and runs on multiple platforms.

Testé le 04/02/2011 => ok

Features:

  • Runs on Windows, Linux/Unix, Mac OS X, …
  • Cracks LM and NTLM hashes.
  • Free tables available for Windows XP and Vista.
  • Brute-force module for simple passwords.
  • Audit mode and CSV export.
  • Real-time graphs to analyze the passwords.
  • LiveCD available to simplify the cracking.
  • Loads hashes from encrypted SAM recovered from a Windows partition, Vista included.
  • Free and open source software (GPL).

Test plugin Facebook

I was looking for ways to integrate my WordPress blog with my Facebook account…

Cloud Drive

From http://www.howtogeek.com
This little desktop gadget makes it very simple to add your documents to Google Docs. Drag & drop your files into Google Doc for free online file storage through secure HTTPS connections.
No need to register for anything other than owning a Google Account.

OpenStreetMap WP Plugin

N’ayant toujours pas résolu le problème d’affichage des fichiers gpx avec le plugin XML Google Maps alors que les fichiers kml fonctionnnent très bien, j’ai donc testé le plugin OpenStreetMap

Procédure d’installation du plugin

  • Install WordPress OSM plugin
  • Upload your geo logger file (gpx or kml)
  • Choose the section and zoomlevel with the shortcode generator at OSM plugin settings page.
  • Add the OpenStreetMap shortcode in your post page adding the argument: gpx_file=”Address of gpx file”
  • Add the argument: marker_file=”Address of txt file”

Pas de soucis avec le fichier kml

Par contre avec le fichier gpx… impossible d’afficher conjointement le tracé et le marqueur…. tantôt ça marche puis sans rien faire plus rien 🙁

Syntaxe

[*osm_map lat= »47.515″ long= »-2.844″ zoom= »13″ width= »600″ height= »450″
gpx_file= »http://rozec.legtux.org/map/cap/10/07/20100702.gpx »
marker_file= »http://rozec.legtux.org/map/cap/10/07/20100702.txt »]

[*osm_map lat= »47.515″ long= »-2.844″ zoom= »13″ width= »600″ height= »450″ kml_file= »http://rozec.legtux.org/map/cap/10/07/20100702.kml » marker_file= »http://rozec.legtux.org/map/cap/10/07/20100702.txt » ]

* <= remove this star in the shortcode
Note: gpx file has to be on your own domain!

Documentation
Documentation 2

Mise à jour WordPress 3

Si la mise à jour de WordPress 3 n’a pas posé de problème… il n’en a pas été de même lorsque j’ai voulu tester la fonction multisite. Ainsi les permaliens n’avait plus la même syntaxe et qui plus est le codage des accents ne se faisait plus correctement.

Il m’a fallu opérer à cœur ouvert en travaillant au niveau des tables de la base de données pour rectifier les accents :

  • copie de sauvegarde de la table (onglet opération)
    • tables concernées :
      wp-comments
      wp-posts
      wp-terms
      wp-links
  • export de la table au format sql
  • copier coller du résultat de l’export dans un éditeur de texte (gedit)
  • enregistrement du fichier au format UTF8
  • modification du fichier avec la commande sed (unix)

rozec@pcbare:~/Bureau$ sed -i « s/è/è/g » export
rozec@pcbare:~/Bureau$ sed -i « s/â/â/g » export
rozec@pcbare:~/Bureau$ sed -i « s/Ã/à/g » export
rozec@pcbare:~/Bureau$ sed -i « s/Â//g » export
rozec@pcbare:~/Bureau$ sed -i « s/î/î/g » export
rozec@pcbare:~/Bureau$ sed -i « s/é/é/g » export
rozec@pcbare:~/Bureau$ sed -i « s/à«/ë/g » export
rozec@pcbare:~/Bureau$ sed -i « s/€/€/g » export
rozec@pcbare:~/Bureau$ sed -i « s/à®/î/g » export
rozec@pcbare:~/Bureau$ sed -i « s/à§/ç/g » export

  • modifier la structure de la table en UTF8
  • vider la table
  • importer le fichier modifier format UTF8

Message d’erreur
« Vous n’avez pas les droits suffisants pour accéder à cette page… »
Recherche infructueuse sur le net… en fait le problème se situe au niveau de la table wp_options. J’ai donc gardé la table de la nouvelle installation.

Modification de l’UID de l’auteur
UPDATE wp_posts SET post_author = ‘new-author-id’ WHERE post_author = ‘old-author-id’;

Plus d’infos sur les commandes mysql sur le site suivant

« Page précédentePage suivante »