<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6071090923092205032</id><updated>2012-02-16T02:23:27.475-08:00</updated><category term='apache'/><category term='sysadmin tricks'/><category term='linux'/><category term='xml'/><category term='tricks'/><category term='burocratic'/><category term='sysadmin'/><category term='list'/><category term='lifehack'/><category term='kubuntu'/><category term='process'/><category term='life in europe'/><category term='vmware'/><category term='programming'/><category term='lists'/><category term='regexp'/><category term='gnu'/><category term='pipe'/><category term='date'/><category term='bash'/><category term='eu'/><category term='list comprehension'/><category term='mod_python.publisher'/><category term='firefox'/><category term='webdevel'/><category term='nx6325'/><category term='dictionaries'/><category term='amd64'/><category term='python'/><category term='escape'/><category term='sql database logic programming'/><category term='grep'/><category term='html'/><category term='dictionary'/><category term='mod_python'/><category term='debian'/><category term='testdrive'/><category term='latex tricks'/><category term='xss'/><category term='popen'/><category term='vim'/><category term='.htaccess'/><category term='library problems'/><category term='notebook'/><category term='lrr'/><title type='text'>Caffee &amp; Latte</title><subtitle type='html'>ideas, thoughts and notes from another information technology guy.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://caffeelatte.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6071090923092205032/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://caffeelatte.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Me</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>21</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6071090923092205032.post-4022226987864878587</id><published>2008-12-06T05:49:00.000-08:00</published><updated>2008-12-06T05:55:43.426-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='process'/><category scheme='http://www.blogger.com/atom/ns#' term='pipe'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='popen'/><title type='text'>Python subprocess Module example: using Popen()</title><content type='html'>&lt;div style="font-family: Courier New, courier, sans-serif; color: rgb(64,255,64); background-color: black; font-size: 85%;"&gt;&lt;br /&gt;#!/usr/bin/python&lt;br /&gt;&lt;br /&gt;from subprocess import *&lt;br /&gt;&lt;br /&gt;cmd1 = "tail"&lt;br /&gt;cmd1Arg1 = "-n 3"&lt;br /&gt;cmd1Arg2 = "/var/log/syslog"&lt;br /&gt;&lt;br /&gt;p1 = Popen([cmd1, cmd1Arg1, cmd1Arg2], stdout=PIPE)&lt;br /&gt;print p1.communicate()[0]&lt;br /&gt;&lt;br /&gt;p1 = Popen(["tail", "-n 3", "/var/log/syslog"], stdout=PIPE)&lt;br /&gt;print p1.communicate()[0]&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And the output of this thing:&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: Courier New, courier, sans-serif; color: rgb(64,255,64); background-color: black; font-size: 85%;"&gt;&lt;br /&gt;&lt;br /&gt;joe@adam:~/Documents$ python popen-example.py&lt;br /&gt;&lt;br /&gt;Dec  6 14:38:27 adam hddtemp[6067]: /dev/sda: TOSHIBA MK8034GSX: 38 C&lt;br /&gt;Dec  6 14:43:27 adam hddtemp[6067]: /dev/sda: TOSHIBA MK8034GSX: 38 C&lt;br /&gt;Dec  6 14:48:27 adam hddtemp[6067]: /dev/sda: TOSHIBA MK8034GSX: 38 C&lt;br /&gt;&lt;br /&gt;Dec  6 14:38:27 adam hddtemp[6067]: /dev/sda: TOSHIBA MK8034GSX: 38 C&lt;br /&gt;Dec  6 14:43:27 adam hddtemp[6067]: /dev/sda: TOSHIBA MK8034GSX: 38 C&lt;br /&gt;Dec  6 14:48:27 adam hddtemp[6067]: /dev/sda: TOSHIBA MK8034GSX: 38 C&lt;br /&gt;&lt;br /&gt;joe@adam:~/Documents$&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6071090923092205032-4022226987864878587?l=caffeelatte.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6071090923092205032/posts/default/4022226987864878587'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6071090923092205032/posts/default/4022226987864878587'/><link rel='alternate' type='text/html' href='http://caffeelatte.blogspot.com/2008/12/python-subprocess-module-example-using.html' title='Python subprocess Module example: using Popen()'/><author><name>Me</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-6071090923092205032.post-4135244232891857627</id><published>2008-11-28T06:06:00.000-08:00</published><updated>2008-11-28T06:57:04.156-08:00</updated><title type='text'>python and md5 hashes - very easy</title><content type='html'>Using python2.5 and md5 hash is indeed very easy&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: Courier New,courier,sans-serif; color: rgb(64, 255, 64); background-color: black; font-size: 85%;"&gt;&lt;br /&gt;&gt;&gt;&gt; import hashlib&lt;br /&gt;&gt;&gt;&gt; m = hashlib.md5()&lt;br /&gt;&gt;&gt;&gt; m.update("Nobody inspects")&lt;br /&gt;&gt;&gt;&gt; dir(m)&lt;br /&gt;['__class__', '__delattr__', '__doc__', '__getattribute__', '__hash__', '__init__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__str__', 'block_size', 'copy', 'digest', 'digest_size', 'digestsize', 'hexdigest', 'name', 'update']&lt;br /&gt;&gt;&gt;&gt; m.hexdigest()&lt;br /&gt;'3ef729ccf0cc56079ca546d58083dc12'&lt;br /&gt;&gt;&gt;&gt; len(m.hexdigest())&lt;br /&gt;32&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Links:&lt;br /&gt;http://www.python.org/doc/2.5.2/lib/module-hashlib.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6071090923092205032-4135244232891857627?l=caffeelatte.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6071090923092205032/posts/default/4135244232891857627'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6071090923092205032/posts/default/4135244232891857627'/><link rel='alternate' type='text/html' href='http://caffeelatte.blogspot.com/2008/11/python-and-md5-hashes-very-easy.html' title='python and md5 hashes - very easy'/><author><name>Me</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-6071090923092205032.post-4360764857104521698</id><published>2008-11-27T14:04:00.001-08:00</published><updated>2008-11-27T14:18:52.739-08:00</updated><title type='text'>cisco include command - the poor cousin of the unix grep</title><content type='html'>How to use the include command in the cisco routers IOS CLI?&lt;br /&gt;&lt;br /&gt;A nice way to use it, is like this:&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 4px solid gray; padding: 20px; font-family: Courier New,courier,sans-serif; color: rgb(64, 255, 64); background-color: black; font-size: 85%;"&gt;&lt;br /&gt;BB#sh int | inclu DLY|is up|is down&lt;br /&gt;FastEthernet0/0 is administratively down, line protocol is down&lt;br /&gt;MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,&lt;br /&gt;Serial0/0 is up, line protocol is up&lt;br /&gt;MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,&lt;br /&gt;FastEthernet0/1 is administratively down, line protocol is down&lt;br /&gt;MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,&lt;br /&gt;Serial0/1 is up, line protocol is up&lt;br /&gt;MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,&lt;br /&gt;Loopback0 is up, line protocol is up&lt;br /&gt;MTU 1514 bytes, BW 8000000 Kbit, DLY 5000 usec,&lt;br /&gt;BB#&lt;br /&gt;BB#sh ip int | inclu is up|is down|Internet address| access list&lt;br /&gt;FastEthernet0/0 is administratively down, line protocol is down&lt;br /&gt;Serial0/0 is up, line protocol is up&lt;br /&gt;Internet address is 10.1.24.1/30&lt;br /&gt;Outgoing access list is not set&lt;br /&gt;Inbound  access list is not set&lt;br /&gt;FastEthernet0/1 is administratively down, line protocol is down&lt;br /&gt;Serial0/1 is up, line protocol is up&lt;br /&gt;Internet address is 10.1.34.1/30&lt;br /&gt;Outgoing access list is not set&lt;br /&gt;Inbound  access list is not set&lt;br /&gt;Loopback0 is up, line protocol is up&lt;br /&gt;Internet address is 172.30.0.1/24&lt;br /&gt;Outgoing access list is not set&lt;br /&gt;Inbound  access list is not set&lt;br /&gt;BB#&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6071090923092205032-4360764857104521698?l=caffeelatte.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6071090923092205032/posts/default/4360764857104521698'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6071090923092205032/posts/default/4360764857104521698'/><link rel='alternate' type='text/html' href='http://caffeelatte.blogspot.com/2008/11/cisco-include-command-poor-cousin-of.html' title='cisco include command - the poor cousin of the unix grep'/><author><name>Me</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-6071090923092205032.post-313714976747543609</id><published>2008-10-13T06:02:00.000-07:00</published><updated>2008-10-13T06:08:09.395-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='lrr'/><category scheme='http://www.blogger.com/atom/ns#' term='library problems'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='sysadmin'/><category scheme='http://www.blogger.com/atom/ns#' term='vmware'/><title type='text'>running vmware-server-console on amd64 kubuntu 8.04</title><content type='html'>&lt;p&gt;For some library-related-reason (lrr) I was not able to start the vmware-server-console on my kubuntu machine. The error messages I was getting were:&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family: courier new;"&gt;/usr/lib/vmware-server-console/bin/vmware-server-console: /usr/lib/vmware-server-console/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_3.4' not found (required by /usr/lib32/libcairo.so.2)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;/usr/lib/vmware-server-console/bin/vmware-server-console: /usr/lib/vmware-server-console/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib32/libstdc++.so.6)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;/usr/lib/vmware-server-console/bin/vmware-server-console: /usr/lib/vmware-server-console/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_3.4' not found (required by /usr/lib32/libcairo.so.2)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;/usr/lib/vmware-server-console/bin/vmware-server-console: /usr/lib/vmware-server-console/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib32/libstdc++.so.6)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;/usr/lib/vmware-server-console/bin/vmware-server-console: /usr/lib/vmware-server-console/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_3.4' not found (required by /usr/lib32/libcairo.so.2)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;/usr/lib/vmware-server-console/bin/vmware-server-console: /usr/lib/vmware-server-console/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib32/libstdc++.so.6)&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p  style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;vmware-server-console -v&lt;br /&gt;VMware Server Console 1.0.7 build-108231&lt;/span&gt;&lt;/p&gt;&lt;p&gt;The solution from &lt;a href="http://whocares.de/2008/02/25/running-vmware-server-console-on-ubuntu-hardy/"&gt;whocares.de&lt;/a&gt; was reproduced and worked smoothly.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Linux kubuntu 2.6.24-19-generic #1 SMP Wed Aug 20 17:53:40 UTC 2008 x86_64 GNU/Linux&lt;/p&gt; &lt;p  style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;cd /usr/lib/vmware-server-console/lib&lt;br /&gt;cd libgcc_s.so.1/&lt;br /&gt;ll&lt;br /&gt;sudo /bin/bash&lt;br /&gt; mv libgcc_s.so.1 libgcc_s.so.1.org&lt;br /&gt; ll&lt;br /&gt; cd ../libpng12.so.0/&lt;br /&gt; mv libpng12.so.0 libpng12.so.0.org&lt;br /&gt;vmware-server-console &amp;amp;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;Thanks!&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6071090923092205032-313714976747543609?l=caffeelatte.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6071090923092205032/posts/default/313714976747543609'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6071090923092205032/posts/default/313714976747543609'/><link rel='alternate' type='text/html' href='http://caffeelatte.blogspot.com/2008/10/running-vmware-server-console-on-amd64.html' title='running vmware-server-console on amd64 kubuntu 8.04'/><author><name>Me</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-6071090923092205032.post-4298175269560254039</id><published>2008-09-23T10:01:00.000-07:00</published><updated>2008-09-23T10:07:16.699-07:00</updated><title type='text'>Security ROI</title><content type='html'>This is another series of interesting texts. This time about return-on-investment for IT Security.&lt;br /&gt;&lt;br /&gt;http://communities.intel.com/openport/blogs/it/2007/09/04/the-four-dirty-questions-of-measuring-information-security&lt;br /&gt;http://communities.intel.com/openport/blogs/it/2007/09/10/practical-aspects-of-measuring-security&lt;br /&gt;http://chuvakin.blogspot.com/2007/07/security-roi-pile-up.html&lt;br /&gt;http://taosecurity.blogspot.com/2007/07/are-questions-sound.html&lt;br /&gt;http://www.schneier.com/crypto-gram-0809.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6071090923092205032-4298175269560254039?l=caffeelatte.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6071090923092205032/posts/default/4298175269560254039'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6071090923092205032/posts/default/4298175269560254039'/><link rel='alternate' type='text/html' href='http://caffeelatte.blogspot.com/2008/09/security-roi.html' title='Security ROI'/><author><name>Me</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-6071090923092205032.post-4805390925357061494</id><published>2008-09-17T01:27:00.000-07:00</published><updated>2008-09-17T01:34:03.788-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='webdevel'/><category scheme='http://www.blogger.com/atom/ns#' term='escape'/><category scheme='http://www.blogger.com/atom/ns#' term='xss'/><category scheme='http://www.blogger.com/atom/ns#' term='xml'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><title type='text'>escaping xml/html with python</title><content type='html'>escaping xml/html with python is very simple. It is useful to post code excepts on the blog...&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&amp;gt;&amp;gt;&amp;gt; from xml.sax.saxutils import escape&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&amp;gt;&amp;gt;&amp;gt; s = """&amp;lt;Directory /var/www/py&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;...     SetHandler mod_python&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;...     PythonHandler mod_python.publisher&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;...     PythonDebug On&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;...     &amp;lt;Files ~ "\.(gif|html|jpg|png)$"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;...         SetHandler default-handler&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;...     &amp;lt;/Files&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;... &amp;lt;/Directory&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;...&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;... """&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&amp;gt;&amp;gt;&amp;gt; print escape(s)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&amp;lt;Directory /var/www/py&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    SetHandler mod_python&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    PythonHandler mod_python.publisher&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    PythonDebug On&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    &amp;lt;Files ~ "\.(gif|html|jpg|png)$"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        SetHandler default-handler&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    &amp;lt;/Files&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&amp;lt;/Directory&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6071090923092205032-4805390925357061494?l=caffeelatte.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6071090923092205032/posts/default/4805390925357061494'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6071090923092205032/posts/default/4805390925357061494'/><link rel='alternate' type='text/html' href='http://caffeelatte.blogspot.com/2008/09/escaping-xmlhtml-with-python.html' title='escaping xml/html with python'/><author><name>Me</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-6071090923092205032.post-6318472381284301749</id><published>2008-09-17T01:14:00.000-07:00</published><updated>2008-09-17T03:02:16.103-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='apache'/><category scheme='http://www.blogger.com/atom/ns#' term='mod_python'/><title type='text'>apache2 and mod_python configuration</title><content type='html'>The useful code snipet that can be included in the .htaccess file or in the apache conf files, so that  .py files and other files can be placed in the same directory.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;    &amp;lt;Directory /var/www/py&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    SetHandler mod_python&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    PythonHandler mod_python.publisher&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;    PythonDebug On&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    &amp;lt;Files ~ "\.(gif|html|jpg|png)$"&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;SetHandler default-handler&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    &amp;lt;/Files&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    &amp;lt;/Directory&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Links&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;a style="font-family: courier new;" href="http://webpython.codepoint.net/mod_python_publisher_apache_configuration"&gt;http://webpython.codepoint.net/mod_python_publisher_apache_configuration&lt;/a&gt;&lt;br /&gt;&lt;a style="font-family: courier new;" href="http://www.phpbb.com/community/viewtopic.php?f=46&amp;amp;t=1139555"&gt;http://www.phpbb.com/community/viewtopic.php?f=46&amp;amp;t=1139555&lt;/a&gt;&lt;br /&gt;&lt;a style="font-family: courier new;" href="http://httpd.apache.org/docs/2.0/mod/core.html#sethandler"&gt;http://httpd.apache.org/docs/2.0/mod/core.html#sethandler&lt;/a&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6071090923092205032-6318472381284301749?l=caffeelatte.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6071090923092205032/posts/default/6318472381284301749'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6071090923092205032/posts/default/6318472381284301749'/><link rel='alternate' type='text/html' href='http://caffeelatte.blogspot.com/2008/09/apache2-and-modpython-configuration.html' title='apache2 and mod_python configuration'/><author><name>Me</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-6071090923092205032.post-3638640404213261400</id><published>2008-09-05T03:31:00.000-07:00</published><updated>2008-09-05T03:32:56.716-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sysadmin tricks'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='bash'/><category scheme='http://www.blogger.com/atom/ns#' term='sysadmin'/><title type='text'>nice article: linux backup/reinstall</title><content type='html'>Linux Get list of installed software for reinstallation / restore software&lt;br /&gt;http://www.cyberciti.biz/tips/linux-get-list-installed-software-reinstallation-restore.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6071090923092205032-3638640404213261400?l=caffeelatte.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6071090923092205032/posts/default/3638640404213261400'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6071090923092205032/posts/default/3638640404213261400'/><link rel='alternate' type='text/html' href='http://caffeelatte.blogspot.com/2008/09/nice-article-linux-backupreinstall.html' title='nice article: linux backup/reinstall'/><author><name>Me</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-6071090923092205032.post-2012695067546014648</id><published>2008-09-03T06:53:00.000-07:00</published><updated>2008-09-03T07:00:35.529-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='eu'/><category scheme='http://www.blogger.com/atom/ns#' term='life in europe'/><category scheme='http://www.blogger.com/atom/ns#' term='lifehack'/><category scheme='http://www.blogger.com/atom/ns#' term='burocratic'/><title type='text'>EU - VIES VAT number validation</title><content type='html'>You can verify the validity of a VAT number issued by any Member State by selecting that Member State from the drop-down menu provided, and entering the number to be validated.&lt;br /&gt;&lt;br /&gt;http://ec.europa.eu/taxation_customs/vies/vieshome.do?selectedLanguage=EN&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6071090923092205032-2012695067546014648?l=caffeelatte.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6071090923092205032/posts/default/2012695067546014648'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6071090923092205032/posts/default/2012695067546014648'/><link rel='alternate' type='text/html' href='http://caffeelatte.blogspot.com/2008/09/eu-vies-vat-number-validation.html' title='EU - VIES VAT number validation'/><author><name>Me</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-6071090923092205032.post-3879883754553675059</id><published>2008-09-02T03:52:00.000-07:00</published><updated>2008-09-02T03:53:18.172-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><category scheme='http://www.blogger.com/atom/ns#' term='sysadmin tricks'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='bash'/><title type='text'>my nice .vimrc</title><content type='html'>syntax on&lt;br /&gt;set number&lt;br /&gt;colorscheme delek&lt;br /&gt;&lt;br /&gt;au FileType python source ~/.vim/scripts/python.vim&lt;br /&gt;&lt;br /&gt;"highlight RedundantSpaces ctermbg=red guibg=red"&lt;br /&gt;""match RedundantSpaces /\s\+$\| \+\ze\t\|\t/"&lt;br /&gt;" line numbers on/off ctrl+n ctrl+n"&lt;br /&gt;:nmap &lt;c-n&gt;&lt;c-n&gt; :set invnumber &lt;cr&gt;&lt;br /&gt;" "autoindent on/off"&lt;br /&gt;:nmap &lt;c-i&gt;&lt;c-i&gt; :set invautoindent &lt;cr&gt;&lt;br /&gt;" " Suche NICHT case-senitiv, außer ein Grossbuchstabe steht im Suchmuster"&lt;br /&gt;" " SmartCase, SMARTcase, smartCASE, SmArTcAsE, sMaRtCaSe, smartcase"&lt;br /&gt;set ignorecase&lt;br /&gt;set smartcase&lt;br /&gt;" " Während Eingabe eines Suchmusters bereits suchen (inkrementell)"&lt;br /&gt;" " Alle zu einem Suchmuster passenden Textstücke markieren (highlight)"&lt;br /&gt;set incsearch&lt;br /&gt;set hlsearch&lt;br /&gt;"&lt;br /&gt;:map &lt;f10&gt; :nohl &lt;cr&gt;&lt;br /&gt;:imap &lt;f10&gt; &lt;esc&gt;:nohl &lt;cr&gt;i&lt;br /&gt;":map &lt;f9&gt; :w!&lt;cr&gt;:!ispell -d ngerman -w ÖÄÜöäüß %&lt;cr&gt;:e! %&lt;cr&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6071090923092205032-3879883754553675059?l=caffeelatte.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6071090923092205032/posts/default/3879883754553675059'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6071090923092205032/posts/default/3879883754553675059'/><link rel='alternate' type='text/html' href='http://caffeelatte.blogspot.com/2008/09/my-nice-vimrc.html' title='my nice .vimrc'/><author><name>Me</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-6071090923092205032.post-2970266835728733624</id><published>2008-08-29T08:26:00.000-07:00</published><updated>2008-08-29T08:29:17.965-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tricks'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='bash'/><category scheme='http://www.blogger.com/atom/ns#' term='sysadmin'/><title type='text'>linux/unix: list files with full path</title><content type='html'>what to do if you need to list files with their full paths?&lt;br /&gt;&lt;br /&gt;ls won't do the job at all. The solution: use the find command.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(51, 255, 51);"&gt;find reservation -type f -name "*.py"&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6071090923092205032-2970266835728733624?l=caffeelatte.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6071090923092205032/posts/default/2970266835728733624'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6071090923092205032/posts/default/2970266835728733624'/><link rel='alternate' type='text/html' href='http://caffeelatte.blogspot.com/2008/08/linuxunix-list-files-with-full-path.html' title='linux/unix: list files with full path'/><author><name>Me</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-6071090923092205032.post-4320629783284876695</id><published>2008-08-28T07:46:00.000-07:00</published><updated>2008-08-28T07:49:15.570-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql database logic programming'/><title type='text'>SQL select exercise 1</title><content type='html'>How to select the lowest value for each day that has a value? For instance, for the 2008-04-10, the lowest 'time' value is "09:15:00". What would be the SELECT statement that would produce a list of the lowest values per day, one value for each date?&lt;br /&gt;&lt;br /&gt;Date; time&lt;br /&gt;"2008-04-04";"16:00:00"&lt;br /&gt;"2008-04-09";"08:45:00"&lt;br /&gt;"2008-04-09";"12:45:00"&lt;br /&gt;"2008-04-09";"17:45:00"&lt;br /&gt;"2008-04-10";"09:15:00"&lt;br /&gt;"2008-04-10";"12:55:00"&lt;br /&gt;"2008-04-11";"09:15:00"&lt;br /&gt;"2008-04-11";"12:50:00"&lt;br /&gt;"2008-04-14";"10:15:00"&lt;br /&gt;"2008-04-14";"12:45:00"&lt;br /&gt;"2008-04-14";"14:55:00"&lt;br /&gt;"2008-04-16";"08:10:00"&lt;br /&gt;"2008-04-16";"10:10:00"&lt;br /&gt;"2008-04-16";"10:50:00"&lt;br /&gt;"2008-04-16";"14:20:00"&lt;br /&gt;"2008-04-16";"15:50:00"&lt;br /&gt;"2008-04-17";"10:00:00"&lt;br /&gt;"2008-04-17";"13:30:00"&lt;br /&gt;"2008-04-21";"09:45:00"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6071090923092205032-4320629783284876695?l=caffeelatte.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6071090923092205032/posts/default/4320629783284876695'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6071090923092205032/posts/default/4320629783284876695'/><link rel='alternate' type='text/html' href='http://caffeelatte.blogspot.com/2008/08/sql-select-exercise-1.html' title='SQL select exercise 1'/><author><name>Me</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-6071090923092205032.post-3247022575915898419</id><published>2008-08-25T02:51:00.000-07:00</published><updated>2008-08-25T02:53:36.222-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='latex tricks'/><title type='text'>It would look strange to have the first paragraph of a section be indented</title><content type='html'>Did you happen to notice that the first paragraph of each section is&lt;br /&gt;not indented?  This paragraph is indented, but it's not the first one&lt;br /&gt;in its section.&lt;br /&gt;&lt;br /&gt;\section{It would look strange to have the first paragraph of a&lt;br /&gt;section be indented}&lt;br /&gt;&lt;br /&gt;\hspace{\parindent}You probably had never really noticed this&lt;br /&gt;phenomenon before.  But if I'm doing my job correctly, you'll never&lt;br /&gt;again accept an indented paragraph at the beginning of a section.&lt;br /&gt;&lt;br /&gt;http://www.cs.dartmouth.edu/~thc/CS110/latex-examples/basic2.txt&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6071090923092205032-3247022575915898419?l=caffeelatte.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6071090923092205032/posts/default/3247022575915898419'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6071090923092205032/posts/default/3247022575915898419'/><link rel='alternate' type='text/html' href='http://caffeelatte.blogspot.com/2008/08/it-would-look-strange-to-have-first.html' title='It would look strange to have the first paragraph of a section be indented'/><author><name>Me</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-6071090923092205032.post-234475090020863574</id><published>2008-08-13T06:37:00.000-07:00</published><updated>2008-09-02T03:54:01.837-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sysadmin tricks'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='bash'/><title type='text'>useful commands in the unix world part 1</title><content type='html'>This list will be sporadically updated...&lt;br /&gt;&lt;br /&gt;history | awk '{print $2}' | sort | uniq -c | sort -rn | head&lt;br /&gt;&lt;br /&gt;file /path/to/file&lt;br /&gt;&lt;br /&gt;Some links:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;awk tutorial&lt;br /&gt;&lt;a href="http://www.hcs.harvard.edu/%7Edholland/computers/awk.html"&gt;http://www.hcs.harvard.edu/~dholland/computers/awk.html&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://cocoon.cs.odu.edu/cocoon/%7Ecs252/open/unix/section-2.3.html#piping"&gt;http://cocoon.cs.odu.edu/cocoon/~cs252/open/unix/section-2.3.html#piping&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.debian.org/doc/manuals/reference/ch-tips.en.html"&gt;http://www.debian.org/doc/manuals/reference/ch-tips.en.html&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;!-- &lt;li&gt;&lt;a href=""&gt;&lt;/a&gt;&lt;/li&gt; --&gt;&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6071090923092205032-234475090020863574?l=caffeelatte.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6071090923092205032/posts/default/234475090020863574'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6071090923092205032/posts/default/234475090020863574'/><link rel='alternate' type='text/html' href='http://caffeelatte.blogspot.com/2008/08/useful-commands-in-unix-world-part-1.html' title='useful commands in the unix world part 1'/><author><name>Me</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-6071090923092205032.post-1252746599897762921</id><published>2008-08-05T03:03:00.000-07:00</published><updated>2008-09-03T00:10:34.948-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='regexp'/><category scheme='http://www.blogger.com/atom/ns#' term='gnu'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='bash'/><category scheme='http://www.blogger.com/atom/ns#' term='grep'/><title type='text'>grep and regular expressions</title><content type='html'>How to use grep with a resonably simple regexp, but which enables me to use OR? I mean, matching A OR B??? Got it... see the example:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;cat /var/log/syslog | grep 'vpnc\|wlan0'&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;See the grep man page (type &lt;span style=";font-family:courier,monospaced;color:silver;"  &gt;man grep&lt;/span&gt; at the prompt)&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Basic vs Extended Regular Expressions&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;In  basic  regular  expressions  the  meta-characters ?, +, {, |, (, and ) lose their special meaning; instead use the backslashed versions \?, \+, \{, \|, \(, and \).&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Links:&lt;br /&gt;&lt;a href="http://www.amk.ca/python/howto/regex/regex.html"&gt;http://www.amk.ca/python/howto/regex/regex.html&lt;br /&gt;&lt;/a&gt;&lt;a href="http://analyser.oli.tudelft.nl/regex/index.html.en"&gt;http://analyser.oli.tudelft.nl/regex/index.html.en&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6071090923092205032-1252746599897762921?l=caffeelatte.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6071090923092205032/posts/default/1252746599897762921'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6071090923092205032/posts/default/1252746599897762921'/><link rel='alternate' type='text/html' href='http://caffeelatte.blogspot.com/2008/08/grep-and-regular-expressions.html' title='grep and regular expressions'/><author><name>Me</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-6071090923092205032.post-1117631685330660768</id><published>2008-07-14T03:27:00.000-07:00</published><updated>2008-07-14T03:31:27.941-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='nx6325'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><category scheme='http://www.blogger.com/atom/ns#' term='notebook'/><category scheme='http://www.blogger.com/atom/ns#' term='testdrive'/><category scheme='http://www.blogger.com/atom/ns#' term='amd64'/><category scheme='http://www.blogger.com/atom/ns#' term='kubuntu'/><title type='text'>kubuntu on the notebook hp nx6325</title><content type='html'>Well, after one month running Kubuntu 8.04 on my hp nx6325 i am very happy with the results.&lt;br /&gt;&lt;br /&gt;Finding out the hardware:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;joe@adam:~$ uname -rs;less /proc/meminfo | grep MemTotal;less /proc/cpuinfo | grep "model name"&lt;br /&gt;Linux 2.6.24-19-generic&lt;br /&gt;MemTotal:       899656 kB&lt;br /&gt;model name      : Mobile AMD Sempron(tm) Processor 3500+&lt;br /&gt;&lt;br /&gt;joe@adam:~$ sudo lshw | grep 6325&lt;br /&gt;  product: HP Compaq nx6325 (RU370ES#ABD)&lt;br /&gt;joe@adam:~$ &lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6071090923092205032-1117631685330660768?l=caffeelatte.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6071090923092205032/posts/default/1117631685330660768'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6071090923092205032/posts/default/1117631685330660768'/><link rel='alternate' type='text/html' href='http://caffeelatte.blogspot.com/2008/07/kubuntu-on-notebook-hp-nx6325.html' title='kubuntu on the notebook hp nx6325'/><author><name>Me</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-6071090923092205032.post-6417951246297880090</id><published>2008-05-28T09:02:00.000-07:00</published><updated>2008-05-28T09:04:12.173-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='lists'/><title type='text'>Add (append) unique items to a list</title><content type='html'>&gt;&gt;&gt; a = ['jmendonca', 'joe', 'ann', 'maya']&lt;br /&gt;&gt;&gt;&gt; b = ['jmendonca', 'joe', 'ann', 'maya', 'rod', 'tom', 'tobi']&lt;br /&gt;&gt;&gt;&gt; def addUnique( item ):&lt;br /&gt;...     if item not in a:&lt;br /&gt;...         a.append(item)&lt;br /&gt;...&lt;br /&gt;&gt;&gt;&gt; def addUnique( item ):&lt;br /&gt;...     if item not in a:&lt;br /&gt;...         a.append(item)&lt;br /&gt;...     print a&lt;br /&gt;...&lt;br /&gt;&gt;&gt;&gt; for item in b:&lt;br /&gt;...     addUnique(item)&lt;br /&gt;...&lt;br /&gt;['jmendonca', 'joe', 'ann', 'maya']&lt;br /&gt;['jmendonca', 'joe', 'ann', 'maya']&lt;br /&gt;['jmendonca', 'joe', 'ann', 'maya']&lt;br /&gt;['jmendonca', 'joe', 'ann', 'maya']&lt;br /&gt;['jmendonca', 'joe', 'ann', 'maya', 'rod']&lt;br /&gt;['jmendonca', 'joe', 'ann', 'maya', 'rod', 'tom']&lt;br /&gt;['jmendonca', 'joe', 'ann', 'maya', 'rod', 'tom', 'tobi']&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6071090923092205032-6417951246297880090?l=caffeelatte.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6071090923092205032/posts/default/6417951246297880090'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6071090923092205032/posts/default/6417951246297880090'/><link rel='alternate' type='text/html' href='http://caffeelatte.blogspot.com/2008/05/add-append-unique-items-to-list.html' title='Add (append) unique items to a list'/><author><name>Me</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-6071090923092205032.post-7416583028873402165</id><published>2008-05-28T01:41:00.000-07:00</published><updated>2008-05-28T09:06:21.358-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='mod_python.publisher'/><category scheme='http://www.blogger.com/atom/ns#' term='.htaccess'/><category scheme='http://www.blogger.com/atom/ns#' term='apache'/><category scheme='http://www.blogger.com/atom/ns#' term='mod_python'/><title type='text'>Getting mod_python.publisher work via .htaccess</title><content type='html'>&lt;span style="font-family:trebuchet ms;font-style: italic;"&gt;Being able to use a ".htaccess" file, was however dependent on your directory at least allowing overriding of "FileInfo" aspects of the configuration. If however an Apache administrator will not allow this, you will not have any choice but to have the ability to use mod_python in a directory enabled in the global configuration."&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;http://www.dscpl.com.au/wiki/ModPython/Articles/GettingModPythonWorking&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;So, add AT LEAST the following lines to your httpd.conf&lt;/span&gt;&lt;br /&gt;&lt;directory  var="" www="" 2py="" style="font-family:trebuchet ms;"&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;     AllowOverride FileInfo&lt;/span&gt;&lt;br /&gt;&lt;/directory&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;And to your .htaccess:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;SetHandler mod_python&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;PythonHandler mod_python.publisher&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;This was tested in the following environment:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;Apache/2.2.3 (testvw) mod_python/3.2.10 Python/2.4.4 PHP/5.2.0-8+etch7.56.200712100724 mod_ssl/2.2.3 OpenSSL/0.9.8c Server at 10.200.20.10 Port 80&lt;br /&gt;&lt;br /&gt;Some useful links:&lt;br /&gt;http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride&lt;br /&gt;http://httpd.apache.org/docs/1.3/mod/mod_mime.html#sethandler&lt;br /&gt;http://missysadmin.com/2007/11/21/installing-mod_python/&lt;br /&gt;http://www.dscpl.com.au/wiki/ModPython/Articles/SetHandlerVersusAddHandler&lt;br /&gt;http://www.dscpl.com.au/wiki/ModPython/Articles/GettingModPythonWorking&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;Some useful commands:&lt;br /&gt;tail -f /var/log/apache2/error.log&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6071090923092205032-7416583028873402165?l=caffeelatte.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6071090923092205032/posts/default/7416583028873402165'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6071090923092205032/posts/default/7416583028873402165'/><link rel='alternate' type='text/html' href='http://caffeelatte.blogspot.com/2008/05/getting-modpythonpublisher-work-via.html' title='Getting mod_python.publisher work via .htaccess'/><author><name>Me</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-6071090923092205032.post-8460798666119392359</id><published>2008-05-27T06:55:00.000-07:00</published><updated>2008-05-28T09:04:44.483-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='webdevel'/><title type='text'>Running multiple Firefox processes concurrently</title><content type='html'>start the second firefox with the following switches:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;firefox -P &lt;/span&gt;&lt;profilename&gt;&lt;span style="font-family:courier new;"&gt; -no-remote&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;If profilemanager should be started with the second instance, use instead:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;firefox -profilemanager -no-remote&lt;/span&gt;&lt;/profilename&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6071090923092205032-8460798666119392359?l=caffeelatte.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6071090923092205032/posts/default/8460798666119392359'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6071090923092205032/posts/default/8460798666119392359'/><link rel='alternate' type='text/html' href='http://caffeelatte.blogspot.com/2008/05/firefox-running-multiple-firefox.html' title='Running multiple Firefox processes concurrently'/><author><name>Me</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-6071090923092205032.post-5975888557340463578</id><published>2008-05-27T04:29:00.000-07:00</published><updated>2008-05-28T09:05:30.814-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dictionaries'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='list'/><category scheme='http://www.blogger.com/atom/ns#' term='list comprehension'/><category scheme='http://www.blogger.com/atom/ns#' term='dictionary'/><category scheme='http://www.blogger.com/atom/ns#' term='lists'/><title type='text'>Dictionaries and list comprehension</title><content type='html'>&lt;span style="font-family:courier new, monospaced, sans-serif;"&gt;&lt;br /&gt;&gt;&gt;&gt; di = {'joao':['blue', '009']}&lt;br /&gt;&gt;&gt;&gt; di&lt;br /&gt;{'joao': ['blue', '009']}&lt;br /&gt;&lt;br /&gt;&gt;&gt;&gt; di = {'jan':['white', '001']}&lt;br /&gt;&gt;&gt;&gt; di&lt;br /&gt;{'jan': ['white', '001']}&lt;br /&gt;&lt;br /&gt;&gt;&gt;&gt; di['joao'] = ['blue', '009']&lt;br /&gt;&gt;&gt;&gt; di&lt;br /&gt;{'jan': ['white', '001'], 'joao': ['blue', '009']}&lt;br /&gt;&lt;br /&gt;&gt;&gt;&gt; print di&lt;br /&gt;{'jan': ['white', '001'], 'joao': ['blue', '009']}&lt;br /&gt;&gt;&gt;&gt; for item in di:&lt;br /&gt;...     print item&lt;br /&gt;...&lt;br /&gt;jan&lt;br /&gt;joao&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&gt;&gt;&gt; for i,j in di.iteritems():&lt;br /&gt;...     print i,j&lt;br /&gt;...&lt;br /&gt;jan ['white', '001']&lt;br /&gt;joao ['blue', '009']&lt;br /&gt;&gt;&gt;&gt; for i,j in di.iteritems():&lt;br /&gt;...     print j&lt;br /&gt;...&lt;br /&gt;['white', '001']&lt;br /&gt;['blue', '009']&lt;br /&gt;&gt;&gt;&gt; for i,j in di.iteritems():&lt;br /&gt;...     print j[1]&lt;br /&gt;...&lt;br /&gt;001&lt;br /&gt;009&lt;br /&gt;&gt;&gt;&gt;   &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;######## list comprehension&lt;br /&gt;&gt;&gt;&gt; for person, (color, code) in di.iteritems():&lt;br /&gt;...     print "%s likes %s and has code %s" % (person, color, code)&lt;br /&gt;...&lt;br /&gt;jan likes white and has code 001&lt;br /&gt;joao likes blue and has code 009&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&gt;&gt;&gt; for person, (color, code) in di.iteritems():&lt;br /&gt;...     if color == "blue":&lt;br /&gt;...             value = True&lt;br /&gt;...&lt;br /&gt;&gt;&gt;&gt; print value&lt;br /&gt;True&lt;br /&gt;&gt;&gt;&gt; for x, bla in di.iteritems():&lt;br /&gt;...     print x&lt;br /&gt;...&lt;br /&gt;jan&lt;br /&gt;joao&lt;br /&gt;&gt;&gt;&gt; for x, bla in di.iteritems():&lt;br /&gt;...     print x, bla&lt;br /&gt;...&lt;br /&gt;jan ['white', '001']&lt;br /&gt;joao ['blue', '009']&lt;br /&gt;&gt;&gt;&gt; di&lt;br /&gt;{'jan': ['white', '001'], 'joao': ['blue', '009']}&lt;br /&gt;&gt;&gt;&gt; if "joao" in di:&lt;br /&gt;...     print "hi"&lt;br /&gt;...&lt;br /&gt;hi&lt;br /&gt;&gt;&gt;&gt;     print "hi5"&lt;br /&gt;  File "&lt;stdin&gt;", line 1&lt;br /&gt;    print "hi5"&lt;br /&gt;    ^&lt;br /&gt;SyntaxError: invalid syntax&lt;br /&gt;&gt;&gt;&gt; if "joao" in di:&lt;br /&gt;...     print "hi5"&lt;br /&gt;...&lt;br /&gt;hi5&lt;br /&gt;&gt;&gt;&gt; if "joao" not in di:&lt;br /&gt;...     print "hi5"&lt;br /&gt;...&lt;br /&gt;&gt;&gt;&gt; if "joo" not in di:&lt;br /&gt;...&lt;br /&gt;  File "&lt;stdin&gt;", line 2&lt;br /&gt;&lt;br /&gt;    ^&lt;br /&gt;IndentationError: expected an indented block&lt;br /&gt;&gt;&gt;&gt; if "joo" not in di:&lt;br /&gt;...     print "hi5"&lt;br /&gt;...&lt;br /&gt;hi5&lt;br /&gt;&gt;&gt;&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;adding and removing elements from a dictionary&lt;br /&gt;keys = ['orders','users','textfilter','datefilter']&lt;br /&gt;&lt;br /&gt;myData = {}&lt;br /&gt;for key in keys:&lt;br /&gt;    myData[key] = None&lt;br /&gt;&lt;br /&gt;&gt;&gt;&gt; myData&lt;br /&gt;{'datefilter': None, 'textfilter': None, 'orders': None, 'users': None}&lt;br /&gt;&lt;br /&gt;&gt;&gt;&gt; for key in keys:&lt;br /&gt;...     myData[key] = [key, key.upper()]&lt;br /&gt;...&lt;br /&gt;&gt;&gt;&gt; myData&lt;br /&gt;{'datefilter': ['datefilter', 'DATEFILTER'], 'textfilter': ['textfilter', 'TEXTFILTER'], 'orders': ['orders', 'ORDERS'], 'users': ['users', 'USERS']}&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6071090923092205032-5975888557340463578?l=caffeelatte.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6071090923092205032/posts/default/5975888557340463578'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6071090923092205032/posts/default/5975888557340463578'/><link rel='alternate' type='text/html' href='http://caffeelatte.blogspot.com/2008/05/python-dictionaries-and-list.html' title='Dictionaries and list comprehension'/><author><name>Me</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-6071090923092205032.post-3864932685245110101</id><published>2008-05-27T04:22:00.000-07:00</published><updated>2008-06-04T08:11:12.091-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='bash'/><category scheme='http://www.blogger.com/atom/ns#' term='date'/><title type='text'>Using dates on your filenames</title><content type='html'>&lt;span style="font-family: trebuchet ms;" &gt;A nice way to use the output of the date command to name your filenames:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new, monospaced, sans-serif;" &gt;cp test.sh tesh.sh.$(date +%Y%m%d-%H%M%S)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;now it should be ok!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6071090923092205032-3864932685245110101?l=caffeelatte.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6071090923092205032/posts/default/3864932685245110101'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6071090923092205032/posts/default/3864932685245110101'/><link rel='alternate' type='text/html' href='http://caffeelatte.blogspot.com/2008/05/linux-using-date-on-your-filenames.html' title='Using dates on your filenames'/><author><name>Me</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry></feed>
