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

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

    
    <item>
        <title>Redirecting output of the bash keyword time</title>
        <link>http://www.posteet.com/view/803</link>
        <description>
        <![CDATA[<pre>time command &gt; timelog doesn't work, because time outputs to stderr
time command 2&gt; timelog doesn't work either, because time actually is a bash keyword, and it's always run in a subshell

Redirecting the output of time can be achieved by executing the whole command in a block, then redirecting its output:
{ time command; } 2&gt; timelog

Note: Linux also provides a time binary (/usr/bin/time), but with a different output (and might be less efficient ?)</pre> <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/time">[time]</a> ]]>        </description>
        <dc:creator>skanx</dc:creator>
        <pubDate>Thu, 28 Feb 2008 18:29:03 +0000</pubDate>

            <category>bash</category>
            <category>linux</category>
            <category>time</category>
    
    </item>

  
    <item>
        <title>Kill a Windows process</title>
        <link>http://www.posteet.com/view/776</link>
        <description>
        <![CDATA[<pre>tasklist -&gt; ps

taskkill -&gt; kill
(taskkill /PID &lt;pid&gt;)</pre> <a href="http://www.posteet.com/tags/windows">[windows]</a> ]]>        </description>
        <dc:creator>skanx</dc:creator>
        <pubDate>Wed, 20 Feb 2008 09:38:57 +0000</pubDate>

            <category>windows</category>
    
    </item>

  
    <item>
        <title>Convert a pkcs12 to pem (ca crt, crt, key)</title>
        <link>http://www.posteet.com/view/769</link>
        <description>
        <![CDATA[<pre>$ openssl pkcs12 -in pkcs12file.p12 -out pemfile.pem
(by default, pkcs12 will ask for an import password, to decrypt the p12 file (just press Enter if you don't have a password), and finally a passphrase to encrypt your key)

pemfile.pem now contains your CA certificate, your client certificate, and your (encrypted) key.</pre> <a href="http://www.posteet.com/tags/ssl">[ssl]</a> ]]>        </description>
        <dc:creator>skanx</dc:creator>
        <pubDate>Mon, 18 Feb 2008 12:26:05 +0000</pubDate>

            <category>ssl</category>
    
    </item>

  
    <item>
        <title>Lock all MySQL databases</title>
        <link>http://www.posteet.com/view/745</link>
        <description>
        <![CDATA[<pre>Lock a database:
$ mysql -u user -p
mysql&gt; FLUSH TABLES WITH READ LOCK;
This closes all open tables and locks all tables for all databases with a read lock until you execute UNLOCK TABLES.

Unlock:
mysql&gt; UNLOCK TABLES;

(to lock a single table: LOCK TABLES table READ;)</pre> <a href="http://www.posteet.com/tags/mysql">[mysql]</a> ]]>        </description>
        <dc:creator>skanx</dc:creator>
        <pubDate>Tue, 12 Feb 2008 11:03:11 +0000</pubDate>

            <category>mysql</category>
    
    </item>

  
    <item>
        <title>Flush Leopard's dns cache</title>
        <link>http://www.posteet.com/view/743</link>
        <description>
        <![CDATA[<pre>sudo dscacheutil -flushcache</pre> <a href="http://www.posteet.com/tags/macosx">[macosx]</a> ]]>        </description>
        <dc:creator>skanx</dc:creator>
        <pubDate>Mon, 11 Feb 2008 16:49:50 +0000</pubDate>

            <category>macosx</category>
    
    </item>

  
    <item>
        <title>Quickly generate a self-signed SSL certificate for Apache</title>
        <link>http://www.posteet.com/view/648</link>
        <description>
        <![CDATA[<pre>openssl req -new -x509 -days 365 -nodes -out /etc/apache2/ssl/apache.pem -keyout /etc/apache2/ssl/apache.pem

hint: to generate a wildcard certificate for multiple name-based virtualhosts, use *.domain.tld as the common name.</pre> <a href="http://www.posteet.com/tags/apache">[apache]</a>  <a href="http://www.posteet.com/tags/ssl">[ssl]</a> ]]>        </description>
        <dc:creator>skanx</dc:creator>
        <pubDate>Thu, 03 Jan 2008 15:22:21 +0000</pubDate>

            <category>apache</category>
            <category>ssl</category>
    
    </item>

  
    <item>
        <title>Cleaning Apple Mail's Envelope Index</title>
        <link>http://www.posteet.com/view/553</link>
        <description>
        <![CDATA[<pre>Apple Mail keeps a lot of junk in a SQLite database named Envelope Index. Since it's a database, it tends to grow with time, and deleted records are not handled very efficiently. You might want to clean it a bit from time to time, and Mail might even seem a little faster after that.

1. Quit Mail

2. Launch a terminal, and type this command :

sqlite3 ~/Library/Mail/Envelope\ Index vacuum</pre> <a href="http://www.posteet.com/tags/macosx">[macosx]</a>  <a href="http://www.posteet.com/tags/mail">[mail]</a> ]]>        </description>
        <dc:creator>skanx</dc:creator>
        <pubDate>Fri, 07 Dec 2007 09:50:54 +0000</pubDate>

            <category>macosx</category>
            <category>mail</category>
    
    </item>

  
    <item>
        <title>Resolving apt-get gpg issues</title>
        <link>http://www.posteet.com/view/529</link>
        <description>
        <![CDATA[<pre>You run apt-get update, and it complains about some missing key IDs:

W: There is no public key available for the following key IDs:
B5D0C804ADB11277
W: GPG error: http://volatile.debian.org etch/volatile Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY EC61E0B0BBE55AB3
W: You may want to run apt-get update to correct these problems

B5D0C804ADB11277 and EC61E0B0BBE55AB3 are the missing gpg pub keys. Fetch them with gpg, and import them into apt :

gpg --keyserver subkeys.pgp.net --recv-key B5D0C804ADB11277
gpg -a --export B5D0C804ADB11277 | apt-key add -
apt-get update

OR (new and improved!)

apt-key advanced --keyserver subkeys.pgp.net --recv-keys B5D0C804ADB11277
apt-get update</pre> <a href="http://www.posteet.com/tags/apt-get">[apt-get]</a>  <a href="http://www.posteet.com/tags/debian">[debian]</a>  <a href="http://www.posteet.com/tags/gpg">[gpg]</a> ]]>        </description>
        <dc:creator>skanx</dc:creator>
        <pubDate>Thu, 29 Nov 2007 08:13:26 +0000</pubDate>

            <category>apt-get</category>
            <category>debian</category>
            <category>gpg</category>
    
    </item>

  
    <item>
        <title>Recover mysql root password</title>
        <link>http://www.posteet.com/view/357</link>
        <description>
        <![CDATA[<pre>- Stop mysql
# /etc/init.d/mysql stop

- Lauch mysql with --skip-grant-tables (WARNING: your mysql server will launch without any password authentication, so please protect it first with a firewall or something if it's world accessible)
# mysqld_safe --skip-grant-tables

- Login as root without a password
$ mysql -u root

- Change the password
mysql&gt; use mysql;
mysql&gt; update user set password=PASSWORD(&quot;your_new_root_password&quot;) where User='root';
mysql&gt; flush privileges;
mysql&gt; quit

- Stop mysql
# /etc/init.d/mysql stop

- Start mysql again to re-enable authentication
# /etc/init.d/mysql start</pre> <a href="http://www.posteet.com/tags/mysql">[mysql]</a> ]]>        </description>
        <dc:creator>skanx</dc:creator>
        <pubDate>Sun, 11 Nov 2007 11:20:09 +0000</pubDate>

            <category>mysql</category>
    
    </item>


</channel>
</rss>
