<?xml version="1.0" encoding="UTF-8" ?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Posteet: cyo</title> 
    <link>http://www.posteet.com/</link> 
    <description>Recent posteets posted to Posteet</description>
    <ttl>60</ttl>

    
    <item>
        <title>Créer un fichier tar.gz à partir d'un fichier listant un certains nombres de fichiers</title>
        <link>http://www.posteet.com/view/1358</link>
        <description>
        <![CDATA[<pre>while read line; do
  tar -P -c -T - -f archive.tar.gz
done &lt; liste_diff.txt

Le fichier fourni en paramètre contient une liste de fichiers avec pour chacun le chemin absolu sur le serveur + nom du fichier. C’est pourquoi on rajoute l’option -P (--absolute-names) à la commande tar.

ATTENTION : Il faut laisser une ligne vide au début de fichier, sinon le premier fichier de la liste n’est pas pris en compte.

Voir aussi :
http://linuxfr.org/forums/30/21469.html</pre> <a href="http://www.posteet.com/tags/archive">[archive]</a>  <a href="http://www.posteet.com/tags/bash">[bash]</a>  <a href="http://www.posteet.com/tags/compression">[compression]</a>  <a href="http://www.posteet.com/tags/fichier">[fichier]</a>  <a href="http://www.posteet.com/tags/liste">[liste]</a>  <a href="http://www.posteet.com/tags/sauvegarde">[sauvegarde]</a>  <a href="http://www.posteet.com/tags/shell">[shell]</a> ]]>        </description>
        <dc:creator>cyo</dc:creator>
        <pubDate>Fri, 07 Nov 2008 14:47:21 +0000</pubDate>

            <category>archive</category>
            <category>bash</category>
            <category>compression</category>
            <category>fichier</category>
            <category>liste</category>
            <category>sauvegarde</category>
            <category>shell</category>
    
    </item>

  
    <item>
        <title>Configurer un serveur local (sous Wamp) pour un accès en https (SSL)</title>
        <link>http://www.posteet.com/view/1351</link>
        <description>
        <![CDATA[<pre>Dans un premier temps, suivre le tutoriel qui figure à cette adresse :
http://apache.developpez.com/cours/apache20-modssl-windows/

Regénérer la clé sans RSA (sinon message d'erreur &quot;SSLPassPhraseDialog builtin is not supported on Win32&quot;) en ligne de commande (il faut d'abord faire une copie de la clé, ici : nom_du_serveur.key.org) :
openssl rsa -in C:\&quot;Program Files&quot;\wamp\bin\apache\apache2.2.6\conf\ssl\nom_du_serveur.key.org -out C:\&quot;Program Files&quot;\wamp\bin\apache\apache2.2.6\conf\ssl\nom_du_serveur.key
Voir http://www.entrust.net/knowledge-base/technote.cfm?tn=5634 pour les détails.

Il faut paramétrer le VirtualHost du serveur concerné dans le fichier httpd-ssl.conf.
En cas d'erreur, les logs se trouvent dans C:\Program Files\wamp\logs\apache_error.log</pre> <a href="http://www.posteet.com/tags/apache">[apache]</a>  <a href="http://www.posteet.com/tags/configuration">[configuration]</a>  <a href="http://www.posteet.com/tags/https">[https]</a>  <a href="http://www.posteet.com/tags/ssl">[ssl]</a>  <a href="http://www.posteet.com/tags/wamp">[wamp]</a>  <a href="http://www.posteet.com/tags/windows">[windows]</a> ]]>        </description>
        <dc:creator>cyo</dc:creator>
        <pubDate>Mon, 03 Nov 2008 11:05:53 +0000</pubDate>

            <category>apache</category>
            <category>configuration</category>
            <category>https</category>
            <category>ssl</category>
            <category>wamp</category>
            <category>windows</category>
    
    </item>

  
    <item>
        <title>Trouver l'emplacement de tous les 'php.ini' qui se trouvent sur un serveur</title>
        <link>http://www.posteet.com/view/1320</link>
        <description>
        <![CDATA[<pre>find / -name php.ini</pre> <a href="http://www.posteet.com/tags/bash">[bash]</a>  <a href="http://www.posteet.com/tags/fichier">[fichier]</a>  <a href="http://www.posteet.com/tags/php">[php]</a>  <a href="http://www.posteet.com/tags/trouver">[trouver]</a> ]]>        </description>
        <dc:creator>cyo</dc:creator>
        <pubDate>Thu, 16 Oct 2008 12:57:25 +0000</pubDate>

            <category>bash</category>
            <category>fichier</category>
            <category>php</category>
            <category>trouver</category>
    
    </item>

  
    <item>
        <title>Commande pour faire un fichier tar gzippé</title>
        <link>http://www.posteet.com/view/1299</link>
        <description>
        <![CDATA[<pre>Exemple pour créer un fichier compressé à partir d’un répertoire de log (il s’agit du dernier paramètre, ici le nom du répertoire est la date au format YYYY-MM-DD) :

tar czf archives-log-2008-10-02.tgz 2008-10-02</pre> <a href="http://www.posteet.com/tags/compression">[compression]</a>  <a href="http://www.posteet.com/tags/fichier">[fichier]</a>  <a href="http://www.posteet.com/tags/log">[log]</a>  <a href="http://www.posteet.com/tags/répertoire">[répertoire]</a> ]]>        </description>
        <dc:creator>cyo</dc:creator>
        <pubDate>Fri, 03 Oct 2008 14:20:43 +0000</pubDate>

            <category>compression</category>
            <category>fichier</category>
            <category>log</category>
            <category>répertoire</category>
    
    </item>

  
    <item>
        <title>Gérer les cookies avec du Javascript</title>
        <link>http://www.posteet.com/view/1295</link>
        <description>
        <![CDATA[<pre>//Insérer les fonctions javascript (dans l'en-tête de vos pages, directement ou dans un fichier .js).
//---------------------------------------------------------------------------------------------------

function ecrire_cookie(nom, valeur, expires) {
  document.cookie=nom+&quot;=&quot;+escape(valeur)+
  ((expires==null) ? &quot;&quot; : (&quot;; expires=&quot;+expires.toGMTString()));
}

function arguments_cookie(offset){
  var endstr=document.cookie.indexOf (&quot;;&quot;, offset);
  if (endstr==-1) endstr=document.cookie.length;
  return unescape(document.cookie.substring(offset, endstr)); 
}

function lire_cookie(nom) {
  var arg=nom+&quot;=&quot;;
  var alen=arg.length;
  var clen=document.cookie.length;
  var i=0;
  while (i&lt;clen){
    var j=i+alen;
    if (document.cookie.substring(i, j)==arg)
       return arguments_cookie(j);
    i=document.cookie.indexOf(&quot; &quot;,i)+1;
    if (i==0) break;
  }
  return null; 
}


//Faire appel aux fonctions : écrire un cookie avec javascript.
//-------------------------------------------------------------

// Création d'un cookie non persistant (pas de date)
// ce cookie s'effacera à la fin de la session
  ecrire_cookie(&quot;deja_venu&quot;, &quot;oui&quot;);

// Création d'un cookie persistant (la date est fixée)
// le cookie s'effacera dans x jours, x mois etc.
// ici le cookie restera 1 mois.
  date=new Date;
  date.setMonth(date.getMonth()+1); // expire dans un mois
  ecrire_cookie(&quot;deja_venu&quot;, &quot;oui&quot;, date);


//Faire appel aux fonctions : lire un cookie avec javascript.
//-----------------------------------------------------------

  deja_venu = lire_cookie(&quot;deja_venu&quot;);</pre> <a href="http://www.posteet.com/tags/cookies">[cookies]</a>  <a href="http://www.posteet.com/tags/javascript">[javascript]</a> ]]>        </description>
        <dc:creator>cyo</dc:creator>
        <pubDate>Tue, 30 Sep 2008 09:53:20 +0000</pubDate>

            <category>cookies</category>
            <category>javascript</category>
    
    </item>

  
    <item>
        <title>Identifier la version de PHP installée sur un serveur</title>
        <link>http://www.posteet.com/view/1281</link>
        <description>
        <![CDATA[<pre>en ligne de commande :

php -v
ou :
php5 -v</pre> <a href="http://www.posteet.com/tags/apache">[apache]</a>  <a href="http://www.posteet.com/tags/bash">[bash]</a>  <a href="http://www.posteet.com/tags/php">[php]</a> ]]>        </description>
        <dc:creator>cyo</dc:creator>
        <pubDate>Tue, 23 Sep 2008 15:28:39 +0000</pubDate>

            <category>apache</category>
            <category>bash</category>
            <category>php</category>
    
    </item>

  
    <item>
        <title>Insérer un fichier SQL sur un serveur Apache Windows (dans Wamp ou EasyPhp)</title>
        <link>http://www.posteet.com/view/1280</link>
        <description>
        <![CDATA[<pre>Note : Dans tous les cas, ajouter l’option -p si un mot de passe est nécessaire après le nom du compte. Dans les exemples, on utilise le compte 'root'. ATTENTION : Il ne faut pas mettre d’espace entre l’option -p et le mot de passe.

Pour exporter avec l’utilitaire mysqldump.exe :

mysqldump -u root database &gt; backup-file.sql

Pour importer, cliquer &quot;démarrer/executer&quot;, puis taper ’cmd’. Ensuite lancer pour Wamp :

C:\&quot;Program Files&quot;\wamp\bin\mysql\mysql5.0.45\bin\mysql.exe -u root nom_de_la_base &lt; c:\fichier.sql</pre> <a href="http://www.posteet.com/tags/données">[données]</a>  <a href="http://www.posteet.com/tags/export">[export]</a>  <a href="http://www.posteet.com/tags/fichier">[fichier]</a>  <a href="http://www.posteet.com/tags/import">[import]</a>  <a href="http://www.posteet.com/tags/mysql">[mysql]</a>  <a href="http://www.posteet.com/tags/sql">[sql]</a> ]]>        </description>
        <dc:creator>cyo</dc:creator>
        <pubDate>Tue, 23 Sep 2008 13:33:21 +0000</pubDate>

            <category>données</category>
            <category>export</category>
            <category>fichier</category>
            <category>import</category>
            <category>mysql</category>
            <category>sql</category>
    
    </item>

  
    <item>
        <title>Trouver les logs de connections sur un serveur Apache</title>
        <link>http://www.posteet.com/view/1279</link>
        <description>
        <![CDATA[<pre>Regarder dans le répertoire :
/var/log/httpd</pre> <a href="http://www.posteet.com/tags/apache">[apache]</a>  <a href="http://www.posteet.com/tags/log">[log]</a> ]]>        </description>
        <dc:creator>cyo</dc:creator>
        <pubDate>Tue, 23 Sep 2008 09:51:32 +0000</pubDate>

            <category>apache</category>
            <category>log</category>
    
    </item>

  
    <item>
        <title>Trouver les fichiers temporaires où sont stockées les sessions PHP</title>
        <link>http://www.posteet.com/view/1278</link>
        <description>
        <![CDATA[<pre>Le chemin est renseigné dans le fichier php.ini :

session.save_path = /var/lib/php/session</pre> <a href="http://www.posteet.com/tags/chemin">[chemin]</a>  <a href="http://www.posteet.com/tags/fichier">[fichier]</a>  <a href="http://www.posteet.com/tags/php">[php]</a>  <a href="http://www.posteet.com/tags/session">[session]</a> ]]>        </description>
        <dc:creator>cyo</dc:creator>
        <pubDate>Tue, 23 Sep 2008 09:12:33 +0000</pubDate>

            <category>chemin</category>
            <category>fichier</category>
            <category>php</category>
            <category>session</category>
    
    </item>

  
    <item>
        <title>Récupèrer les dernières lignes d'un fichier texte</title>
        <link>http://www.posteet.com/view/1277</link>
        <description>
        <![CDATA[<pre>On peut afficher les dernières lignes d’un fichier ou afficher en continu les ajouts à un fichier, ce qui peut être très utile pour surveiller un fichier de log (anglais: logfile), respectivement:

tail nom_fichier
tail -f nom_fichier

Dans ce dernier cas, on interrompt la commande avec CTRL-C.</pre> <a href="http://www.posteet.com/tags/affichage">[affichage]</a>  <a href="http://www.posteet.com/tags/bash">[bash]</a>  <a href="http://www.posteet.com/tags/fichier">[fichier]</a>  <a href="http://www.posteet.com/tags/log">[log]</a>  <a href="http://www.posteet.com/tags/texte">[texte]</a> ]]>        </description>
        <dc:creator>cyo</dc:creator>
        <pubDate>Tue, 23 Sep 2008 09:06:19 +0000</pubDate>

            <category>affichage</category>
            <category>bash</category>
            <category>fichier</category>
            <category>log</category>
            <category>texte</category>
    
    </item>

  
    <item>
        <title>Créer un fichier texte contenant la liste des derniers fichiers modifiés, classés par ordre de dernières modifs</title>
        <link>http://www.posteet.com/view/1203</link>
        <description>
        <![CDATA[<pre>find -type f -mtime -1 -print0 | xargs -0 ls -lt&gt;_dernieres_modifs.txt</pre> <a href="http://www.posteet.com/tags/bash">[bash]</a>  <a href="http://www.posteet.com/tags/fichier">[fichier]</a>  <a href="http://www.posteet.com/tags/liste">[liste]</a>  <a href="http://www.posteet.com/tags/tri">[tri]</a>  <a href="http://www.posteet.com/tags/windows">[windows]</a> ]]>        </description>
        <dc:creator>cyo</dc:creator>
        <pubDate>Tue, 19 Aug 2008 13:09:47 +0000</pubDate>

            <category>bash</category>
            <category>fichier</category>
            <category>liste</category>
            <category>tri</category>
            <category>windows</category>
    
    </item>

  
    <item>
        <title>Changer la sélection d'un menu déroulant à partir du texte affiché à l'écran (texte figurant entre les balises &lt;option&gt;&lt;/option&gt;</title>
        <link>http://www.posteet.com/view/1202</link>
        <description>
        <![CDATA[<pre>;(function($) {

/**
 * Selects an option by text
 *
 * @name     selectOptionsByText
 * @author   Mathias Bank (http://www.mathias-bank.de), original function
 * @author   Sam Collett (http://www.texotela.co.uk), addition of regular expression matching
 * @author   Christophe (version modifiée : recherche sur le texte au lieu de rechercher sur la valeur du champ option)
* @type     jQuery
 * @param    String|RegExp value  Which options should be selected
 * can be a string or regular expression
 * @param    Boolean clear  Clear existing selected options, default false
 * @example  $(&quot;#myselect&quot;).selectOptions(&quot;val1&quot;); // with the text 'val1'
 * @example  $(&quot;#myselect&quot;).selectOptions(/^val/i); // with the text starting with 'val', case insensitive
 *
 */
$.fn.selectOptionsByText = function(text, clear)
{
    var v = text;
    var vT = typeof(text);
    var c = clear || false;
    // has to be a string or regular expression (object in IE, function in Firefox)
    if(vT != &quot;string&quot; &amp;&amp; vT != &quot;function&quot; &amp;&amp; vT != &quot;object&quot;) return this;
    this.each(
        function()
        {
            if(this.nodeName.toLowerCase() != &quot;select&quot;) return this;
            // get options
            var o = this.options;
            // get number of options
            var oL = o.length;
            for(var i = 0; i&lt;oL; i++)
            {
                if(v.constructor == RegExp)
                {
                    if(o[i].text.match(v))
                    {
                        o[i].selected = true;
                    }
                    else if(c)
                    {
                        o[i].selected = false;
                    }
                }
                else
                {
                    if(o[i].text == v)
                    {
                        o[i].selected = true;
                    }
                    else if(c)
                    {
                        o[i].selected = false;
                    }
                }
            }
        }
    );
    return this;
};

})(jQuery);</pre> <a href="http://www.posteet.com/tags/formulaire">[formulaire]</a>  <a href="http://www.posteet.com/tags/jquery">[jquery]</a>  <a href="http://www.posteet.com/tags/option">[option]</a>  <a href="http://www.posteet.com/tags/select">[select]</a> ]]>        </description>
        <dc:creator>cyo</dc:creator>
        <pubDate>Tue, 19 Aug 2008 13:04:27 +0000</pubDate>

            <category>formulaire</category>
            <category>jquery</category>
            <category>option</category>
            <category>select</category>
    
    </item>

  
    <item>
        <title>Lister les fichiers d'un répertoire et de ces sous-répertoires avec le chemin complet</title>
        <link>http://www.posteet.com/view/1186</link>
        <description>
        <![CDATA[<pre>dir *.* /b /s</pre> <a href="http://www.posteet.com/tags/dos">[dos]</a>  <a href="http://www.posteet.com/tags/fichier">[fichier]</a>  <a href="http://www.posteet.com/tags/liste">[liste]</a>  <a href="http://www.posteet.com/tags/windows">[windows]</a> ]]>        </description>
        <dc:creator>cyo</dc:creator>
        <pubDate>Mon, 11 Aug 2008 15:24:01 +0000</pubDate>

            <category>dos</category>
            <category>fichier</category>
            <category>liste</category>
            <category>windows</category>
    
    </item>

  
    <item>
        <title>Appliquer les changements sur Apache après avoir fait des modifs dans php.ini</title>
        <link>http://www.posteet.com/view/1185</link>
        <description>
        <![CDATA[<pre>service httpd reload</pre> <a href="http://www.posteet.com/tags/apache">[apache]</a>  <a href="http://www.posteet.com/tags/bash">[bash]</a>  <a href="http://www.posteet.com/tags/linux">[linux]</a>  <a href="http://www.posteet.com/tags/php">[php]</a>  <a href="http://www.posteet.com/tags/shell">[shell]</a> ]]>        </description>
        <dc:creator>cyo</dc:creator>
        <pubDate>Mon, 11 Aug 2008 09:17:14 +0000</pubDate>

            <category>apache</category>
            <category>bash</category>
            <category>linux</category>
            <category>php</category>
            <category>shell</category>
    
    </item>

  
    <item>
        <title>Trouver les enregistrements en doublon dans une table MySQL</title>
        <link>http://www.posteet.com/view/1008</link>
        <description>
        <![CDATA[<pre>SELECT ChampUnique
FROM MaTable
GROUP BY ChampUnique HAVING COUNT(*) &gt; 1</pre> <a href="http://www.posteet.com/tags/doublon">[doublon]</a>  <a href="http://www.posteet.com/tags/sql">[sql]</a> ]]>        </description>
        <dc:creator>cyo</dc:creator>
        <pubDate>Thu, 12 Jun 2008 14:38:27 +0000</pubDate>

            <category>doublon</category>
            <category>sql</category>
    
    </item>


</channel>
</rss>
