<?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-29543621</id><updated>2012-02-16T04:59:23.091-08:00</updated><category term='apache'/><category term='linux'/><category term='Python'/><category term='Humanity'/><category term='Help'/><category term='postgresql'/><category term='mod_wsgi'/><category term='pg_dump'/><category term='mysql'/><category term='Xcode'/><category term='Debian'/><category term='SOS'/><category term='Xorg'/><category term='bookmarks'/><category term='iOS4'/><category term='django'/><category term='http'/><category term='ideas'/><category term='Darfur'/><category term='networking'/><category term='sqlite3'/><category term='tags'/><category term='important'/><category term='biology'/><category term='animation'/><category term='Mac'/><category term='Cocoa'/><category term='Emacs'/><category term='iOS'/><category term='collective intelligence'/><category term='blogs'/><category term='comments'/><category term='science'/><title type='text'>The Golden Spot</title><subtitle type='html'>I hope this helps someone who is learning about Linux and web application programming with Python, Django, and Javascript.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://thegoldenspot.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://thegoldenspot.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>play drums</name><uri>http://www.blogger.com/profile/11200364600780049962</uri><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>37</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-29543621.post-6980052126197511423</id><published>2011-11-25T16:05:00.001-08:00</published><updated>2011-11-25T20:09:38.908-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='http'/><category scheme='http://www.blogger.com/atom/ns#' term='django'/><category scheme='http://www.blogger.com/atom/ns#' term='mod_wsgi'/><category scheme='http://www.blogger.com/atom/ns#' term='iOS'/><category scheme='http://www.blogger.com/atom/ns#' term='apache'/><category scheme='http://www.blogger.com/atom/ns#' term='Python'/><category scheme='http://www.blogger.com/atom/ns#' term='networking'/><title type='text'>Authentication redirects with iOS and Django</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;I am writing a client/server application. The client is an iPhone; client requests are handled by a Django application. Below, I will demonstrate how an iOS device can respond to redirects for login credentials from a Django service when a session has expired. I have not found much written about this subject so I am publishing what I have learned. This assumes that you know how to store and retrieve the username and password on an iOS device via &lt;a href="http://developer.apple.com/library/mac/#documentation/security/conceptual/keychainServConcepts/01introduction/introduction.html#//apple_ref/doc/uid/TP30000897-CH203-TP1" target="_blank"&gt;Keychain Services&lt;/a&gt;, make HTTP requests from an iOS client, and create basic Django applications.&lt;br /&gt;&lt;br /&gt;There are several questions that arise when acquiring a new session id with the client:&lt;br /&gt;&lt;ol style="text-align: left;"&gt;&lt;li&gt;How do we send username and password credentials to the Django service from the iOS client, such that we a) login to the server b) get forwarded to the original page we requested?&lt;/li&gt;&lt;li&gt;What happens when the client requests a Django view with an @login_required decorator if the client's session id is expired?&lt;/li&gt;&lt;li&gt;What happens to POST data in an original client request after the server sends login URL redirects while sending authentication challenges?&lt;/li&gt;&lt;/ol&gt;&lt;div style="text-align: left;"&gt;I hope the following post answers all of these. First, some definitions:&lt;/div&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;'session id' - this refers to the&amp;nbsp;hexadecimal&amp;nbsp;string sent from the server as a cookie value, after the a user has signed-in/logged-in. (eg. &lt;span class="Apple-style-span" style="background-color: white; color: #bb8844; font-family: monospace; line-height: 17px; white-space: pre;"&gt;"2b1189a188b44ad18c35e113ac6ceead"&lt;/span&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: inherit; line-height: 17px; white-space: pre;"&gt;). More info on &lt;a href="https://docs.djangoproject.com/en/1.3/topics/http/sessions/" target="_blank"&gt;Django sessions&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;'server' - in this case a &lt;a href="https://www.djangoproject.com/" target="_blank"&gt;Django&lt;/a&gt; app, hosted by &lt;a href="http://httpd.apache.org/" target="_blank"&gt;Apache&lt;/a&gt; using &lt;a href="http://code.google.com/p/modwsgi/" target="_blank"&gt;mod_wsgi&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;'client' - in this case an iPhone (3GS), running the application and sending requests over a &lt;a href="http://en.wikipedia.org/wiki/Local_area_network" target="_blank"&gt;LAN&lt;/a&gt;. But theoretically, it could be any iOS networked device.&lt;/li&gt;&lt;/ul&gt;I will demonstrate with a URL that requires the user to be 'logged in' on the Django app. If the client does not have a valid session id, Django will respond by forwarding to a login view. In our case we will challenge the iOS client with a WWW-Authenticate; the client will respond to the challenge in a delegate method and be redirected to the original URL requested by the client. Inside a delegate method on the iOS client, I will show how to preserve the original request's HTTP method and &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;(NSData *)HTTPBody&lt;/span&gt; .&lt;br /&gt;&lt;br /&gt;Let's make this a simple HTTP GET request. In this case the requested URL will be:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;http://10.0.0.2/user/home/&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;When the client sends the above request, the Django view will detect that the client is not logged in because either the session id was not sent with the GET request or the session id was expired. T&lt;/span&gt;he server will respond with a&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/HTTP_302" target="_blank"&gt;status code of 302&lt;/a&gt;.&amp;nbsp;In this case the server will respond with the redirect URL of the login page. Here is the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;@login_required&lt;/span&gt; decorator in the requested view:&lt;br /&gt;&lt;script src="https://gist.github.com/1394843.js"&gt; &lt;/script&gt;&lt;br /&gt;Before we look at the Django sign in view, let's have a look at&amp;nbsp;the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;NSURLConnection Delegate&lt;/span&gt; in the class that sends the request:&lt;br /&gt;&lt;script src="https://gist.github.com/1394827.js"&gt; &lt;/script&gt;&lt;script src="https://gist.github.com/1394818.js"&gt;&lt;/script&gt;&lt;br /&gt;The delegate method is sending a new request containing the redirected URL if the server sends a redirect. And it is sending the original request if no redirect has been sent by the server. It is also sending a version of the original( very first ) request ( HTTPBody, HTTP method, and the latest header fields), &lt;span class="Apple-style-span" style="background-color: yellow;"&gt;only if the redirected URL is the same as the original request; &lt;/span&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;This is how we keep any POST data in the HTTPBody when login redirects have succeeded. More on that below. Let's first take a look at the Django login view:&lt;/span&gt;&lt;br /&gt;&lt;script src="https://gist.github.com/1394856.js"&gt;&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;Notice how we send an authentication challenge from the view if no credentials have been sent by the client? Also, note that within httpd.conf,&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt; WSGIPassAuthorization&lt;/span&gt;&lt;/i&gt; must be set to 'on' for mod_wsgi to forward the credentials to the Django view.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Upon redirecting to the login URL, the client is presented with an authentication challenge. The client should respond appropriately within the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;NSURLConnection&lt;/span&gt; delegate method:&lt;br /&gt;&amp;nbsp;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;- (&lt;span class="s1"&gt;void&lt;/span&gt;)connection:(&lt;span class="s2"&gt;NSURLConnection&lt;/span&gt; *)connection didReceiveAuthenticationChallenge:(&lt;span class="s2"&gt;NSURLAuthenticationChallenge&lt;/span&gt; *)challenge&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;The client requests the redirected URL and sends the login credentials when receiving a WWW-Authentication challenge. Upon successful login, they are redirected to the original URL- which is stored by Django in the requests as&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;request.GET['next'] = "&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;/user/home/"&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;In the redirect for the original URL, after successful login, the Django view sends the cookie containing the session id. In the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;NSURLConnection &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;delegate&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;-(&lt;span class="s1"&gt;NSURLRequest&lt;/span&gt; *)connection:(&lt;span class="s1"&gt;NSURLConnection&lt;/span&gt; *)connection willSendRequest:(&lt;span class="s1"&gt;NSURLRequest&lt;/span&gt; *)request redirectResponse:(&lt;span class="s1"&gt;NSURLResponse&lt;/span&gt; *)response;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;all of the headers from the last request are copied to the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;newRequest&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;;&amp;nbsp;t&lt;/span&gt;his includes the session id. If there was any POST data in the original request, it will also be copied to the &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;newRequest,&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&amp;nbsp;so that the original transaction data will be sent to the server after authenticating and acquiring a new session id.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;I hope that this shed some light on how to keep your iOS app able to handle authentication redirects when the server session id expires.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;NOTE: I did not cover displaying a login view that allows the user to enter in username and password in the iOS client if the server login fails. Also, I did not show how to use the&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29543621-6980052126197511423?l=thegoldenspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thegoldenspot.blogspot.com/feeds/6980052126197511423/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29543621&amp;postID=6980052126197511423&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/6980052126197511423'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/6980052126197511423'/><link rel='alternate' type='text/html' href='http://thegoldenspot.blogspot.com/2011/11/authentication-redirects-with-ios-and.html' title='Authentication redirects with iOS and Django'/><author><name>play drums</name><uri>http://www.blogger.com/profile/11200364600780049962</uri><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><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29543621.post-1781937084882283186</id><published>2011-09-21T23:38:00.000-07:00</published><updated>2011-09-21T23:38:23.140-07:00</updated><title type='text'>Forward LAN traffic to localhost web server on the same MacBook Pro</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Using a stock, early 2011 model MacBook Pro, I needed to access my secure webserver, which runs on localhost and the default port for HTTPS of 443 (127.0.0.1:443), with remote clients on the LAN. The LAN at my home office is 10.0.0.0/24.&lt;br /&gt;&lt;br /&gt;The following assumes you have edited httpd.conf and have HTTPS configured correctly; that is, you are able to &amp;nbsp;point a web browser to https://127.0.0.1/ and see the site you are serving with httpd.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1) Turn on Web Sharing in System Preferences/Sharing. This will open a port on the LAN for httpd to serve requests.&lt;br /&gt;2) Turn on Remote Login in&amp;nbsp;System Preferences/Sharing. This will start sshd to enable port forwarding with ssh at the command line.&lt;br /&gt;3) Using a shell enter:&lt;br /&gt;&lt;code&gt;ssh -NL 10.0.0.29:8080:127.0.0.1:443 &lt;i&gt;your_username&lt;/i&gt;@localhost&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;a ) 10.0.0.29 is the address of my laptop's interface on the LAN.&lt;br /&gt;b ) 8080 is the port that ssh will listen to and then forward traffic to and from.&lt;br /&gt;c ) 127.0.0.1:443 is the address:port on my laptop that ssh will forward traffic to, when it receives traffic on 10.0.0.29:8080&lt;br /&gt;d )&amp;nbsp;&lt;span class="Apple-style-span" style="font-family: monospace;"&gt;&lt;i&gt;your_username&lt;/i&gt;@localhost&amp;nbsp;&lt;/span&gt;is the login for the local sshd service that was started by enabling Sharing/Remote Login in System Prefernces&lt;br /&gt;&lt;br /&gt;By visiting https://10.0.0.29:8080/ on the 10.0.0.0/24 network with say, an iPhone, you will be able to see the website that is configured in httpd as 127.0.0.1:443 on the MacBook. This helps with local development since you don't have to create a new cert each time your dynamic LAN address changes; it is only a matter of changing the address and port that ssh will forward to localhost.&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/29543621-1781937084882283186?l=thegoldenspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thegoldenspot.blogspot.com/feeds/1781937084882283186/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29543621&amp;postID=1781937084882283186&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/1781937084882283186'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/1781937084882283186'/><link rel='alternate' type='text/html' href='http://thegoldenspot.blogspot.com/2011/09/forward-lan-traffic-to-localhost-web.html' title='Forward LAN traffic to localhost web server on the same MacBook Pro'/><author><name>play drums</name><uri>http://www.blogger.com/profile/11200364600780049962</uri><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><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29543621.post-7747405289883337702</id><published>2011-05-23T18:45:00.000-07:00</published><updated>2011-05-23T19:06:17.468-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iOS4'/><category scheme='http://www.blogger.com/atom/ns#' term='Xcode'/><category scheme='http://www.blogger.com/atom/ns#' term='Cocoa'/><title type='text'></title><content type='html'>My UITableView crashes when scrolling and &lt;code&gt;dequeueReusableCellWithIdentifier:&lt;/code&gt; is called, during the _second time_ &lt;code&gt;- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath&lt;/code&gt; is called ( to re-use the cell, after creation ). &lt;br /&gt;&lt;br /&gt;I was getting a &lt;code&gt;EXEC_BAD_ACCESS&lt;/code&gt; at &lt;code&gt;dequeueReusableCellWithIdentifier:&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;I realized that after initializing my custom UITableViewCell, I am setting &lt;code&gt;cell = [myCustomCell autorelease]&lt;/code&gt; when I should be using  &lt;code&gt;cell = [myCustomCell retain]&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;after customizing a UITableViewCell, call retain, not autorelease, before returning it from tableView:cellForRowAtIndexPath. I'll also mention that I am initializing my custom cell from a nib file by using &lt;code&gt; [[NSBundle mainBundle] loadNibNamed:@"MyCustomCell" owner:self options:nil];&lt;br /&gt; &lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29543621-7747405289883337702?l=thegoldenspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thegoldenspot.blogspot.com/feeds/7747405289883337702/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29543621&amp;postID=7747405289883337702&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/7747405289883337702'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/7747405289883337702'/><link rel='alternate' type='text/html' href='http://thegoldenspot.blogspot.com/2011/05/my-uitableview-crashes-when-scrolling.html' title=''/><author><name>play drums</name><uri>http://www.blogger.com/profile/11200364600780049962</uri><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><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29543621.post-7690796719803871740</id><published>2011-04-17T12:01:00.001-07:00</published><updated>2011-04-17T12:53:26.317-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Xcode'/><category scheme='http://www.blogger.com/atom/ns#' term='Emacs'/><title type='text'></title><content type='html'>I just learned how to replace newlines with other characters in Emacs. I found &lt;a href="http://jeremy.zawodny.com/blog/archives/008872.html"&gt;Jeremy's blog post&lt;/a&gt; from 2007. &lt;br /&gt;&lt;br /&gt;I type:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;M-x replace-string &amp;lt;return&amp;gt;&lt;br /&gt;C-q C-j &lt;return&gt;&lt;br /&gt;replacement_string_of_choice &amp;lt;return&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;C-q&lt;/code&gt; is emacs' &lt;code&gt;quoted-insert&lt;/code&gt;, which works for inserting control characters; &lt;br /&gt;&lt;code&gt;C-j&lt;/code&gt; is the function &lt;code&gt;newline-and-indent&lt;/code&gt; which inserts a newline and indents to your major mode.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;C-q&lt;/code&gt; also works in Xcode as described in this &lt;a href="http://stackoverflow.com/questions/5078814/regular-expression-to-replace-with-newline-in-xcode"&gt;Stack Overflow question&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29543621-7690796719803871740?l=thegoldenspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thegoldenspot.blogspot.com/feeds/7690796719803871740/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29543621&amp;postID=7690796719803871740&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/7690796719803871740'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/7690796719803871740'/><link rel='alternate' type='text/html' href='http://thegoldenspot.blogspot.com/2011/04/i-just-learned-how-to-replace-newlines.html' title=''/><author><name>play drums</name><uri>http://www.blogger.com/profile/11200364600780049962</uri><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><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29543621.post-1042444731572323039</id><published>2009-10-31T13:27:00.000-07:00</published><updated>2009-10-31T17:58:42.196-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='postgresql'/><category scheme='http://www.blogger.com/atom/ns#' term='pg_dump'/><title type='text'></title><content type='html'>pg_dump fails:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ pg_dump -o -U mydbuser mydb &gt; backup.db.data&lt;br /&gt;&lt;br /&gt;$ pg_dump: [archiver (db)] connection to database "mydb" failed: FATAL:  password authentication failed for user "mydbuser"&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;My /var/lib/pgsql/data/pg_hba.conf :&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;# "local" is for Unix domain socket connections only&lt;br /&gt;local   all         all                               ident sameuser&lt;br /&gt;#&lt;br /&gt;host    all         all         127.0.0.1/32          md5&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;I thought that since I am logged into the postmaster machine, I would be able to enter the mydbuser database password and execute the command.&lt;br /&gt;&lt;br /&gt;According to:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.postgresql.org/docs/8.1/interactive/app-pgdump.html"&gt;http://www.postgresql.org/docs/8.1/interactive/app-pgdump.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;the option -h is the following:&lt;br /&gt;&lt;br /&gt;&lt;dt&gt;&lt;tt class="OPTION"&gt;-h &lt;tt class="REPLACEABLE"&gt;&lt;i&gt;host&lt;/i&gt;&lt;/tt&gt;&lt;/tt&gt;&lt;br /&gt;&lt;tt class="OPTION"&gt;--host=&lt;tt class="REPLACEABLE"&gt;&lt;i&gt;host&lt;/i&gt;&lt;/tt&gt;&lt;/tt&gt;&lt;/dt&gt;&lt;dd&gt;&lt;p&gt; Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the &lt;tt class="ENVAR"&gt;PGHOST&lt;/tt&gt; environment variable, if set,         else a Unix domain socket connection is attempted.        &lt;/p&gt;&lt;/dd&gt;&lt;br /&gt;Since I did not use -h flag in the command, pg_dump was using a Unix socket to connect the the database and therefore using the IDENT authentication option. I should could have said -h 127.0.0.1 in my pg_dump command- like so:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ pg_dump -o -U mydbuser -h 127.0.0.1 mydb &gt; backup.db.data&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;so that I could authenticate using the md5 database user password at the prompt.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29543621-1042444731572323039?l=thegoldenspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thegoldenspot.blogspot.com/feeds/1042444731572323039/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29543621&amp;postID=1042444731572323039&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/1042444731572323039'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/1042444731572323039'/><link rel='alternate' type='text/html' href='http://thegoldenspot.blogspot.com/2009/10/pgdump-was-using-unix-socket-to-connect.html' title=''/><author><name>play drums</name><uri>http://www.blogger.com/profile/11200364600780049962</uri><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><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29543621.post-1446430476855066851</id><published>2009-10-21T21:43:00.000-07:00</published><updated>2009-10-21T21:46:07.487-07:00</updated><title type='text'></title><content type='html'>After I create a new frame by typing&lt;br /&gt;&lt;br /&gt;M-x 5 2&lt;br /&gt;&lt;br /&gt;in Emacs, my cursor color is black. But the color of my original frame is LimeGreen or lime green.&lt;br /&gt;&lt;br /&gt;I found this site:&lt;br /&gt;&lt;a href="http://www.dansanderson.com/blog/mt/mt-search.fcgi?tag=NewbieEmacsTip&amp;amp;blog_id=1&amp;amp;IncludeBlogs=1"&gt;http://www.dansanderson.com/blog/mt/mt-search.fcgi?tag=NewbieEmacsTip&amp;amp;blog_id=1&amp;amp;IncludeBlogs=1&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;and added this line:&lt;br /&gt;&lt;br /&gt;(add-to-list 'default-frame-alist '(cursor-color . "lime green")&lt;br /&gt;&lt;br /&gt;to my ~/.emacs file&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29543621-1446430476855066851?l=thegoldenspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thegoldenspot.blogspot.com/feeds/1446430476855066851/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29543621&amp;postID=1446430476855066851&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/1446430476855066851'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/1446430476855066851'/><link rel='alternate' type='text/html' href='http://thegoldenspot.blogspot.com/2009/10/after-i-create-new-frame-by-typing-m-x.html' title=''/><author><name>play drums</name><uri>http://www.blogger.com/profile/11200364600780049962</uri><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><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29543621.post-307085840291672796</id><published>2009-10-19T01:07:00.000-07:00</published><updated>2009-10-19T02:11:23.456-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='django'/><category scheme='http://www.blogger.com/atom/ns#' term='Python'/><title type='text'></title><content type='html'>My first django snippet regarding 'very archive'. I am sure I spent too much time reinventing an archive view but I could not figure out how to display all posts in the template, the way I wanted, using generic views!!&lt;br /&gt;&lt;br /&gt;The template logic:&lt;br /&gt;&lt;a href="http://www.djangosnippets.org/snippets/1765/"&gt;http://www.djangosnippets.org/snippets/1765/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The view code:&lt;br /&gt;&lt;a href="http://www.djangosnippets.org/snippets/1766/"&gt;http://www.djangosnippets.org/snippets/1766/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29543621-307085840291672796?l=thegoldenspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thegoldenspot.blogspot.com/feeds/307085840291672796/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29543621&amp;postID=307085840291672796&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/307085840291672796'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/307085840291672796'/><link rel='alternate' type='text/html' href='http://thegoldenspot.blogspot.com/2009/10/my-first-django-snippet-regarding-very.html' title=''/><author><name>play drums</name><uri>http://www.blogger.com/profile/11200364600780049962</uri><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><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29543621.post-3419290237973564480</id><published>2009-09-17T00:00:00.000-07:00</published><updated>2009-09-17T00:02:04.135-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='comments'/><category scheme='http://www.blogger.com/atom/ns#' term='blogs'/><category scheme='http://www.blogger.com/atom/ns#' term='important'/><title type='text'></title><content type='html'>Can someone please leave a comment on my blog?&lt;br /&gt;&lt;br /&gt;Pretty please?&lt;br /&gt;&lt;br /&gt;Below, read about the importance of blog comments:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://weblogs.about.com/b/2008/06/10/the-importance-of-blog-comments.htm"&gt;http://weblogs.about.com/b/2008/06/10/the-importance-of-blog-comments.htm&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29543621-3419290237973564480?l=thegoldenspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thegoldenspot.blogspot.com/feeds/3419290237973564480/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29543621&amp;postID=3419290237973564480&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/3419290237973564480'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/3419290237973564480'/><link rel='alternate' type='text/html' href='http://thegoldenspot.blogspot.com/2009/09/can-someone-please-leave-comment-on-my.html' title=''/><author><name>play drums</name><uri>http://www.blogger.com/profile/11200364600780049962</uri><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><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29543621.post-8432796705825815808</id><published>2009-08-18T01:29:00.000-07:00</published><updated>2009-08-18T18:49:33.624-07:00</updated><title type='text'></title><content type='html'>The GPolyline.fromEncoded documentation has been misleading for a while. Read this:&lt;br /&gt;&lt;a href="http://code.google.com/p/gmaps-api-issues/issues/detail?id=614#c1"&gt;&lt;br /&gt;http://code.google.com/p/gmaps-api-issues/issues/detail?id=614#c1&lt;/a&gt;&lt;br /&gt;&lt;a href="http://code.google.com/p/gmaps-api-issues/issues/detail?id=614"&gt;&lt;br /&gt;&lt;/a&gt;&lt;span style="display: block;" id="formatbar_Buttons"&gt;&lt;span class="on down" style="display: block;" id="formatbar_CreateLink" title="Link" onmouseover="ButtonHoverOn(this);" onmouseout="ButtonHoverOff(this);" onmouseup="" onmousedown="CheckFormatting(event);FormatbarButton('richeditorframe', this, 8);ButtonMouseDown(this);"&gt;&lt;img src="img/blank.gif" alt="Link" class="gl_link" border="0" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;When using GPolyline.fromEncoded, I must name the encoded string "points:" even though the documentation says "latlngs:". following example code may help someone:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;  function initialize() {&lt;br /&gt;    if (GBrowserIsCompatible()) {&lt;br /&gt;      var map = new GMap2(document.getElementById("map_canvas"));&lt;br /&gt;      map.setCenter(new GLatLng(37.42025942555, -122.0841121673), 17);&lt;br /&gt;  map.setUIToDefault();&lt;br /&gt;&lt;br /&gt;var plines = new GPolyline.fromEncoded({color:"3366FF", weight: 2, opacity: .5, points: "_|kcFbpchVfE`HQoElOT?gEyNCGuDwDzG", zoomFactor:2, levels:"pppppppp", numLevels:18});&lt;br /&gt;map.addOverlay(plines);&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;a href="http://code.google.com/apis/maps/documentation/reference.html#GPolyline.fromEncoded"&gt;Google Maps GPolyline.fromEncoded documentation&lt;/a&gt;&lt;span style="display: block;" id="formatbar_Buttons"&gt;&lt;span class="on down" style="display: block;" id="formatbar_CreateLink" title="Link" onmouseover="ButtonHoverOn(this);" onmouseout="ButtonHoverOff(this);" onmouseup="" onmousedown="CheckFormatting(event);FormatbarButton('richeditorframe', this, 8);ButtonMouseDown(this);"&gt;&lt;img src="http://www.blogger.com/img/blank.gif" alt="Link" class="gl_link" border="0" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29543621-8432796705825815808?l=thegoldenspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thegoldenspot.blogspot.com/feeds/8432796705825815808/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29543621&amp;postID=8432796705825815808&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/8432796705825815808'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/8432796705825815808'/><link rel='alternate' type='text/html' href='http://thegoldenspot.blogspot.com/2009/08/when-using-gpolyline.html' title=''/><author><name>play drums</name><uri>http://www.blogger.com/profile/11200364600780049962</uri><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><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29543621.post-8079753211308015086</id><published>2009-05-04T21:04:00.000-07:00</published><updated>2009-05-04T22:56:38.296-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'></title><content type='html'>There is a great article about how to set up logical volume management or lvm using the command line &lt;a href="http://distrowatch.com/weekly.php?issue=20090309"&gt;here.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I looked around and found this to be really good for demonstrating how to name and resize the logical volumes. The lvm2 manual page helped as well.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29543621-8079753211308015086?l=thegoldenspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thegoldenspot.blogspot.com/feeds/8079753211308015086/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29543621&amp;postID=8079753211308015086&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/8079753211308015086'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/8079753211308015086'/><link rel='alternate' type='text/html' href='http://thegoldenspot.blogspot.com/2009/05/there-is-great-article-about-how-to-set.html' title=''/><author><name>play drums</name><uri>http://www.blogger.com/profile/11200364600780049962</uri><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><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29543621.post-6027972960833266409</id><published>2009-01-21T23:40:00.000-08:00</published><updated>2009-01-21T23:42:51.023-08:00</updated><title type='text'></title><content type='html'>I read this from &lt;a href="http://news.ycombinator.com/"&gt;Hacker News:&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://jdconley.com/blog/archive/2009/01/19/dont-hire-a-programmer-if-they-dont-code-for-fun.aspx"&gt;http://jdconley.com/blog/archive/2009/01/19/dont-hire-a-programmer-if-they-dont-code-for-fun.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What if their idea of fun is taking slime samples from ancient damp caves in Northern California and graphing the mold contents compared with other similar caves in Oregon?I am just joking.&lt;br /&gt;&lt;br /&gt;I think any employee that you hire should be questioned regarding what project they have been inspired by. I would ask something like: "Talk about the last 2 or 3 projects you worked on ( personal or work-related ) where you felt 'extremely' to 'incredibly' inspired"&lt;br /&gt;&lt;br /&gt;Would this technically apply as a double post- if I posted the same content on the ycombinator site as my own blog?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29543621-6027972960833266409?l=thegoldenspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thegoldenspot.blogspot.com/feeds/6027972960833266409/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29543621&amp;postID=6027972960833266409&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/6027972960833266409'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/6027972960833266409'/><link rel='alternate' type='text/html' href='http://thegoldenspot.blogspot.com/2009/01/i-read-this-from-hacker-news.html' title=''/><author><name>play drums</name><uri>http://www.blogger.com/profile/11200364600780049962</uri><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><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29543621.post-6876760064677229741</id><published>2008-11-08T22:07:00.000-08:00</published><updated>2008-11-08T23:36:24.883-08:00</updated><title type='text'></title><content type='html'>How to configure Postgresql with Django for localhost development with Apache 2.2.10&lt;br /&gt;&lt;br /&gt;Debian Etch build of Postgresql(8.1) and Django subversion(9370)&lt;br /&gt;&lt;br /&gt;I compiled psycopg2, Apache 2.2.10, mod_wsgi from source as mentioned &lt;a href="http://thegoldenspot.blogspot.com/2008/11/modwsgi-apache-2.html"&gt;here&lt;/a&gt; and &lt;a href="http://thegoldenspot.blogspot.com/2008/11/python-2.html"&gt;here&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;Installing Postgresql with Synaptic creates a user named postgres in the /etc/passwd file. Login as root or sudo and change the  password for the system user named postgres:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;# passwd postgres&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;. . . change the password to your favorite color password ( write it down! ( like all the others))&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ su postgres&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;. . . login and now &lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ psql template1&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;this will bring up the postgresql shell using template1 ( read the postgresql docs regarding template1 database ) where I can change the postgresql password for the role ( or user ) postgres.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;postgres# ALTER USER postgres WITH PASSWORD 'secretuberpassw' ;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;create a role for Django to use while editing the Postgresql database:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;postgres# CREATE ROLE djangopguser WITH LOGIN ENCRYPTED PASSWORD 'djangosecretamazing' ;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;create the database and assign ownership to the djangopguser&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;postgres# CREATE DATABASE djangositedb OWNER djangopguser ;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;my pg_hba.conf file:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;# IPv4 local connections:                                                                                                                     &lt;br /&gt;host    all         all         127.0.0.1/32          md5 # this is here by default on Etch&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;my djangosite settings file:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;DATABASE_ENGINE = 'postgresql_psycopg2'     &lt;br /&gt;DATABASE_NAME = 'djangositedb'           &lt;br /&gt;DATABASE_USER = 'djangopguser'           &lt;br /&gt;DATABASE_PASSWORD = 'djangosecretamazing'&lt;br /&gt;DATABASE_HOST = '127.0.0.1' # I have to be write the IP address here. If I leave it blank I can not authenticate to postmaster from Django&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;edit the /etc/postgresql/8.1/main/postgresql.conf file and uncomment&lt;br /&gt;&lt;code&gt;&lt;br /&gt;listen_addresses = 'localhost'&lt;br /&gt;password_encryption = on&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;I am going to use virtual hosts so I can have multiple django sites at http://djangosite1.localhost and http://djangosite2.localhost as urls in my web browser.&lt;br /&gt;&lt;br /&gt;first I will configure /etc/hosts and add the lines&lt;br /&gt;&lt;code&gt;&lt;br /&gt;127.0.0.1       djangosite2.localhost&lt;br /&gt;127.0.0.1       djangosite1.localhost&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;this will allow url resolution of these domains to my localhost IP address ( this helps when looking at these urls in my web browser )&lt;br /&gt;&lt;br /&gt;Now for the fun part of configuring Apache's httpd.conf. This has worked for me so far:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;Listen 127.0.0.1:80&lt;br /&gt;ServerName 127.0.0.1&lt;br /&gt;DocumentRoot &amp;quot;/usr/local/www/public_html&amp;quot;&lt;br /&gt;LoadModule wsgi_module /usr/local/apache2/modules/mod_wsgi.so &lt;br /&gt;NameVirtualHost 127.0.0.1:80&lt;br /&gt;&amp;lt;VirtualHost 127.0.0.1:80&amp;gt;&lt;br /&gt;ServerName djangosite2.localhost&lt;br /&gt;WSGIScriptAlias / /usr/local/www/public_html/djangosite2/apache/django.wsgi&lt;br /&gt;&amp;lt;Directory /usr/local/www/public_html/djangosite2/apache&amp;gt;&lt;br /&gt;Order allow,deny&lt;br /&gt;Allow from all&lt;br /&gt;&amp;lt;/Directory&amp;gt;&lt;br /&gt;Alias /media/ /usr/local/www/public_html/django-media/media/&lt;br /&gt;&amp;lt;Directory /usr/local/www/public_html/django-media/media&amp;gt;&lt;br /&gt;Order allow,deny&lt;br /&gt;Allow from all&lt;br /&gt;&amp;lt;/Directory&amp;gt;&lt;br /&gt;&amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;In addition to a bunch of httpd.conf directives that are included in the file by default, I left out the mod_wsgi file that is referenced &lt;a href="http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango"&gt;here&lt;/a&gt; and placed in the directory as written in httpd.conf above. Also, some other information regarding the Django specific installation procedures that you can find yourself in the django documentation will make things more clear if you are having problems.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29543621-6876760064677229741?l=thegoldenspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thegoldenspot.blogspot.com/feeds/6876760064677229741/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29543621&amp;postID=6876760064677229741&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/6876760064677229741'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/6876760064677229741'/><link rel='alternate' type='text/html' href='http://thegoldenspot.blogspot.com/2008/11/how-to-configure-postgresql-with-django.html' title=''/><author><name>play drums</name><uri>http://www.blogger.com/profile/11200364600780049962</uri><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><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29543621.post-5216170957346013763</id><published>2008-11-07T23:40:00.000-08:00</published><updated>2008-11-08T22:06:57.519-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='django'/><category scheme='http://www.blogger.com/atom/ns#' term='mod_wsgi'/><category scheme='http://www.blogger.com/atom/ns#' term='Debian'/><category scheme='http://www.blogger.com/atom/ns#' term='Python'/><title type='text'></title><content type='html'>Python 2.6 and latest Django with Postgresql on Debian Etch.&lt;br /&gt;&lt;br /&gt;I built and installed Python 2.6 from source but I used Debian Etch build of Postgresql from Synaptic. I needed to use Postgres instead of MySQL because the Python bindings to MySQLDB do not work with Python 2.6 as of today ( so I hear ). I decided to build the latest version of psycopg2, which is the Python binding for Postgres because the Synaptic version of psycopg2 might be configured for the Debian default version of Python 2.4.4. First, I had to get libpq-dev and libpq4 from Synaptic. Then I got the source of psycopg2-2.0.8. Next, build/install:&lt;br /&gt; &lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ python2.6 ./setup.py build&lt;br /&gt;$  sudo python2.6 ./setup.py install&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;( python2.6 is named as such because I made altinstall when running make for Python 2.6 )&lt;br /&gt;&lt;br /&gt;I was able to test that this is working so far&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ python2.6&lt;br /&gt;Python 2.6 (r26:66714, Nov  3 2008, 01:27:29) &lt;br /&gt;[GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2&lt;br /&gt;Type "help", "copyright", "credits" or "license" for more information.&lt;br /&gt;&gt;&gt;&gt; import django&lt;br /&gt;&gt;&gt;&gt; django.VERSION&lt;br /&gt;(1, 1, 0, 'alpha', 0)&lt;br /&gt;&gt;&gt;&gt; import psycopg2&lt;br /&gt;&gt;&gt;&gt; psycopg2.apilevel&lt;br /&gt;'2.0'&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;It works so far; now I simply have to get Django and Apache working.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29543621-5216170957346013763?l=thegoldenspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thegoldenspot.blogspot.com/feeds/5216170957346013763/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29543621&amp;postID=5216170957346013763&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/5216170957346013763'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/5216170957346013763'/><link rel='alternate' type='text/html' href='http://thegoldenspot.blogspot.com/2008/11/python-2.html' title=''/><author><name>play drums</name><uri>http://www.blogger.com/profile/11200364600780049962</uri><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><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29543621.post-7627011025808280223</id><published>2008-11-07T01:05:00.000-08:00</published><updated>2008-11-08T22:29:53.046-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='django'/><category scheme='http://www.blogger.com/atom/ns#' term='mod_wsgi'/><category scheme='http://www.blogger.com/atom/ns#' term='Debian'/><category scheme='http://www.blogger.com/atom/ns#' term='apache'/><category scheme='http://www.blogger.com/atom/ns#' term='Python'/><title type='text'></title><content type='html'>mod_wsgi&lt;br /&gt;Apache 2.2.10&lt;br /&gt;Python 2.6&lt;br /&gt;Django latest from subversion&lt;br /&gt;on Debian Etch ADM64&lt;br /&gt;&lt;br /&gt;compiling mod_wsgi, Python 2.6 and Apache 2.2.10 worked for me by configuring Python 2.6 with&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;--enable-shared&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;then after make and make install:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ ln -s /usr/local/lib/libpython2.6.so.1.0 /lib&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Next, link the python shared object to a place that mod_wsgi will use it.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ sudo ln -s /usr/local/lib/libpython2.6.so /usr/local/lib/python2.6/config/&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;I compiled Apache successfully by building it with&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;./configure --with-included-apr --enable-ssl --prefix=/usr/local/apache2 --enable-so&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;then configure mod_wsgi using&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ ./configure --with-python=/usr/local/bin/python2.6 --with-apxs=/usr/local/apache2/bin/apxs &lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;I checked that the /usr/local/apache2/modules/mod_wsgi.so was compiled with the python shared object by doing this&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$ ldd /usr/local/apache2/modules/mod_wsgi.so&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;It shows that it was compiled with&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;       libpython2.6.so.1.0 =&gt; /lib/libpython2.6.so.1.0 (0x00002b99a1f1d000)&lt;br /&gt;       libpthread.so.0 =&gt; /lib/libpthread.so.0 (0x00002b99a21c8000)&lt;br /&gt;       libdl.so.2 =&gt; /lib/libdl.so.2 (0x00002b99a22dd000)&lt;br /&gt;       libutil.so.1 =&gt; /lib/libutil.so.1 (0x00002b99a23e0000)&lt;br /&gt;       libc.so.6 =&gt; /lib/libc.so.6 (0x00002b99a24e4000)&lt;br /&gt;       libm.so.6 =&gt; /lib/libm.so.6 (0x00002b99a2721000)&lt;br /&gt;       /lib64/ld-linux-x86-64.so.2 (0x0000555555554000)&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The test on&lt;br /&gt;&lt;br /&gt;http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide&lt;br /&gt;&lt;br /&gt;worked; So, off to my Django web development.&lt;br /&gt;&lt;br /&gt;P.S. Thanks to Graham Dumpleton for help on &lt;br /&gt;&lt;br /&gt;&lt;a href="http://groups.google.com/group/modwsgi"&gt;http://groups.google.com/group/modwsgi&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;from last year when I was trying to get this working with python 2.5 and an older version of Apache. Back then, I never got it to work and ended up using mod_python instead.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29543621-7627011025808280223?l=thegoldenspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thegoldenspot.blogspot.com/feeds/7627011025808280223/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29543621&amp;postID=7627011025808280223&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/7627011025808280223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/7627011025808280223'/><link rel='alternate' type='text/html' href='http://thegoldenspot.blogspot.com/2008/11/modwsgi-apache-2.html' title=''/><author><name>play drums</name><uri>http://www.blogger.com/profile/11200364600780049962</uri><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><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29543621.post-428317754426119546</id><published>2008-09-02T21:52:00.000-07:00</published><updated>2008-09-02T21:59:56.582-07:00</updated><title type='text'></title><content type='html'>&lt;p&gt;Zlib on my AMD64 machine causes problems with compiling software sometimes. This is because I am using Debian but tried to compile zlib from source; when I installed it, something did not work very well with the rest of my system. So, occasionally, I will have a zlib error.&lt;/p&gt;&lt;p&gt;I recently tried to compile wireshark and Make complained that zlib.a returned a bad value. I noticed that wireshark was looking for zlib in /usr/local/lib/. My Debian stock system put zlib in /usr/lib/ (I think).&lt;/p&gt;&lt;p&gt;"usr/local/lib/libz.a: could not read symbols: Bad value"&lt;/p&gt;&lt;p&gt;Fortunately, `configure` for wireshark had --disable-usr-local option. Everything worked out with that option and it compiled fine.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29543621-428317754426119546?l=thegoldenspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thegoldenspot.blogspot.com/feeds/428317754426119546/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29543621&amp;postID=428317754426119546&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/428317754426119546'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/428317754426119546'/><link rel='alternate' type='text/html' href='http://thegoldenspot.blogspot.com/2008/09/zlib-on-my-amd64-machine-causes.html' title=''/><author><name>play drums</name><uri>http://www.blogger.com/profile/11200364600780049962</uri><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><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29543621.post-5324008822192503178</id><published>2008-08-24T02:19:00.000-07:00</published><updated>2008-12-22T01:28:38.620-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tags'/><category scheme='http://www.blogger.com/atom/ns#' term='ideas'/><category scheme='http://www.blogger.com/atom/ns#' term='collective intelligence'/><category scheme='http://www.blogger.com/atom/ns#' term='bookmarks'/><title type='text'></title><content type='html'>&lt;p&gt;Is Delicious simply a search engine that is sorting and indexing pages in slow motion, at the whim of the collective intelligence of it's registered users?&lt;/p&gt;&lt;p&gt;Will Delicious become google if given enough time and enough users?&lt;/p&gt;&lt;p&gt;Is there a mathematical limit that describes Delicious' capacity to become Google?&lt;/p&gt;&lt;p&gt;Delicious searches contain the sum of relevant pages that people found on search engines and, at the same time, lack the sum of relevant pages that people have not yet found on search engines. Wow; that nearly blew my mind.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;If my friend is going to be interested in a subject- would it be easier to have a friend widget appear in my browser(when *I* visit sites that correlate to my friends 'tags') that, when clicked, compared the link with the current Delicious bookmarks of my friend; and if he/she had not bookmarked the link by that time, the widget would add the link to the friends bookmark collection.&lt;/p&gt;&lt;p&gt;My friend would be best to have a 'sent from friends' Delicious bookmark folder and a separate personal folder. [wearing a dunce hat, and speaking with a lisp] Also, the friend could even copy bookmarks from one folder to the next. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29543621-5324008822192503178?l=thegoldenspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thegoldenspot.blogspot.com/feeds/5324008822192503178/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29543621&amp;postID=5324008822192503178&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/5324008822192503178'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/5324008822192503178'/><link rel='alternate' type='text/html' href='http://thegoldenspot.blogspot.com/2008/08/is-delicious-simply-search-engine-that.html' title=''/><author><name>play drums</name><uri>http://www.blogger.com/profile/11200364600780049962</uri><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><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29543621.post-7764362503800680640</id><published>2008-05-26T01:20:00.000-07:00</published><updated>2008-05-26T01:34:29.447-07:00</updated><title type='text'></title><content type='html'>After updating Django subversion to 7549 mod_python was expressing an error- not able to find the django modpython module:&lt;br /&gt;django.core.handlers.modpython&lt;br /&gt;&lt;br /&gt;so I finally realized that I changed /home/my/location/DjangoSubversion-XXXX to end in 7549. I had to change the link in /usr/local/lib/python2.5/site-packages/django to the new directory name.&lt;br /&gt;&lt;br /&gt;I just learned what&lt;br /&gt;&lt;br /&gt;&lt;code&gt;unlink&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;does- since I had to unlink the old link and make a new one.&lt;br /&gt;&lt;br /&gt;For about 2 minutes I thought there was backward incompatible changes in subversion.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29543621-7764362503800680640?l=thegoldenspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thegoldenspot.blogspot.com/feeds/7764362503800680640/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29543621&amp;postID=7764362503800680640&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/7764362503800680640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/7764362503800680640'/><link rel='alternate' type='text/html' href='http://thegoldenspot.blogspot.com/2008/05/after-updating-django-subversion-to.html' title=''/><author><name>play drums</name><uri>http://www.blogger.com/profile/11200364600780049962</uri><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><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29543621.post-2421735509908307542</id><published>2008-01-13T16:07:00.000-08:00</published><updated>2008-12-22T01:29:13.631-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sqlite3'/><category scheme='http://www.blogger.com/atom/ns#' term='django'/><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Python'/><title type='text'></title><content type='html'>Mysql 5.0 and Django Subversion 6917.&lt;br /&gt;&lt;br /&gt;I switched from sqlite3 to mysql 5.0 midway through development, First, I edited settings.py to reflect the database changes. Next, I had to run&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ python manage.py reset auth --noinput&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;first, in order setup a new admin user by executing&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ python manage.py flush&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Finally, I made all the tables in settings.py by running&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ python manage.py syncdb&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29543621-2421735509908307542?l=thegoldenspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thegoldenspot.blogspot.com/feeds/2421735509908307542/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29543621&amp;postID=2421735509908307542&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/2421735509908307542'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/2421735509908307542'/><link rel='alternate' type='text/html' href='http://thegoldenspot.blogspot.com/2008/01/mysql-5.html' title=''/><author><name>play drums</name><uri>http://www.blogger.com/profile/11200364600780049962</uri><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><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29543621.post-4360356915551289272</id><published>2008-01-13T01:02:00.000-08:00</published><updated>2008-12-22T01:29:41.411-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Debian'/><title type='text'></title><content type='html'>Debian Etch AMD64 MySQL(current) root password setup&lt;br /&gt;&lt;br /&gt;first view /etc/mysql/debian.cnf&lt;br /&gt;&lt;br /&gt;use the user name to login to mysql&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ mysql -u debian-sys-maint -p&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Enter the password in the file. To set the root password type:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;mysql&gt; USE mysql;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;then&lt;br /&gt;&lt;code&gt;&lt;br /&gt;mysql&gt; SET PASSWORD FOR root@localhost = PASSWORD('specialSAUCE');&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;where &lt;code&gt;specialSAUCE &lt;/code&gt;is your bullet proof password.&lt;br /&gt;&lt;br /&gt;Now continue to use and learn MYSQL.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29543621-4360356915551289272?l=thegoldenspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thegoldenspot.blogspot.com/feeds/4360356915551289272/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29543621&amp;postID=4360356915551289272&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/4360356915551289272'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/4360356915551289272'/><link rel='alternate' type='text/html' href='http://thegoldenspot.blogspot.com/2008/01/debian-etch-amd64-mysqlcurrent-root.html' title=''/><author><name>play drums</name><uri>http://www.blogger.com/profile/11200364600780049962</uri><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><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29543621.post-672342331877515298</id><published>2008-01-06T01:26:00.000-08:00</published><updated>2008-01-06T01:33:40.684-08:00</updated><title type='text'></title><content type='html'>Debian Etch AMD64 fsck e2fsck&lt;br /&gt;&lt;br /&gt;Using my motherboard and net install cd I have to type:&lt;br /&gt;&lt;br /&gt;rescue pci=nomsi&lt;br /&gt;&lt;br /&gt;to get rescue mode started.&lt;br /&gt;&lt;br /&gt;after that I can execute a shell in the installer environment; then type at the prompt&lt;br /&gt;&lt;code&gt;&lt;br /&gt;# e2fsck -v -y /dev/mapper/&lt;i&gt;hostname-partition&lt;/i&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;where &lt;i&gt;&lt;code&gt;hostname&lt;/code&gt;&lt;/i&gt; is my computer's hostname and &lt;i&gt;&lt;code&gt;partition&lt;/code&gt;&lt;/i&gt;&lt;br /&gt;is a partition name like home, var, usr or boot.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29543621-672342331877515298?l=thegoldenspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thegoldenspot.blogspot.com/feeds/672342331877515298/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29543621&amp;postID=672342331877515298&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/672342331877515298'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/672342331877515298'/><link rel='alternate' type='text/html' href='http://thegoldenspot.blogspot.com/2008/01/debian-etch-amd64-fsck-e2fsck-using-my.html' title=''/><author><name>play drums</name><uri>http://www.blogger.com/profile/11200364600780049962</uri><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><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29543621.post-6830667430840408225</id><published>2007-12-08T00:36:00.000-08:00</published><updated>2007-12-08T01:30:35.462-08:00</updated><title type='text'></title><content type='html'>useful links for Django site development:&lt;br /&gt;&lt;br /&gt;How to allow an optional field in a Django data model; but do not use null=True for string&lt;br /&gt;based fields, unless you have a deliberate reason.&lt;br /&gt;http://www.b-list.org/weblog/2006/jun/28/django-tips-difference-between-blank-and-null/&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;why admin will not edit character primary keys&lt;br /&gt;http://code.djangoproject.com/ticket/2259&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;make apache user process write to your database file using sqlite3; what I did while developing was to change the group of the data file to the Apache users group and make it group writable; next do the same for the parent directory of the database file. This way Apache can write data to it with mod_python. The error you get can be: &lt;span style="font-size:100%;"&gt;&lt;span class="searchword2"&gt;Unable to Open Database &lt;/span&gt;&lt;/span&gt;http://code.djangoproject.com/wiki/NewbieMistakes#DjangosaysUnabletoOpenDatabaseFilewhenusingSQLite3&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29543621-6830667430840408225?l=thegoldenspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thegoldenspot.blogspot.com/feeds/6830667430840408225/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29543621&amp;postID=6830667430840408225&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/6830667430840408225'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/6830667430840408225'/><link rel='alternate' type='text/html' href='http://thegoldenspot.blogspot.com/2007/12/useful-links-for-django-site.html' title=''/><author><name>play drums</name><uri>http://www.blogger.com/profile/11200364600780049962</uri><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><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29543621.post-316873329522135907</id><published>2007-11-10T21:27:00.000-08:00</published><updated>2007-11-11T18:47:30.788-08:00</updated><title type='text'></title><content type='html'>I got tired of seeing a unicode character:&lt;br /&gt;&lt;br /&gt;U+00E2&lt;br /&gt;&lt;br /&gt;or:&lt;br /&gt;&lt;br /&gt;â&lt;br /&gt;&lt;br /&gt;in my xterm when I am looking at man pages and info pages in xterm; at hyphens and other points in the text of these pages there would be a â instead, making it impossible to understand some parts of the pages. I knew something was wrong with either xterm or Xorg and the interpretation of Unicode characters or fonts. After reading the man page of xterm I saw that:&lt;br /&gt;&lt;br /&gt;"When using an ISO-10646-1 font and the wideChars resource is true, xterm uses the Unicode glyphs which match the  VT100 line-drawing glyphs."&lt;br /&gt;&lt;br /&gt;So I recompiled the latest version (xterm-229) with the configure option:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;./configure --enable-wide-chars --with-x --enable-256-color&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Problem solved. I do not see those pesky â's.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29543621-316873329522135907?l=thegoldenspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thegoldenspot.blogspot.com/feeds/316873329522135907/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29543621&amp;postID=316873329522135907&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/316873329522135907'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/316873329522135907'/><link rel='alternate' type='text/html' href='http://thegoldenspot.blogspot.com/2007/11/i-got-tired-of-seeing-unicode-character.html' title=''/><author><name>play drums</name><uri>http://www.blogger.com/profile/11200364600780049962</uri><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><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29543621.post-2355441607553482808</id><published>2007-10-13T21:27:00.000-07:00</published><updated>2007-11-18T15:08:33.697-08:00</updated><title type='text'></title><content type='html'>Wow I had a tough time getting Flash to work on my new Etch AMD64 box.&lt;br /&gt;&lt;br /&gt;I tried Gnash only to give up and wait for better versions on the way.&lt;br /&gt;&lt;br /&gt;So I ended up doing a chroot by following:&lt;br /&gt;&lt;br /&gt;http://alioth.debian.org/docman/view.php/30192/21/debian-amd64-howto.html#id292281&lt;br /&gt;&lt;br /&gt;Next I downloaded Firefox from:&lt;br /&gt;&lt;br /&gt;http://www.mozilla.com/en-US/firefox/&lt;br /&gt;&lt;br /&gt;chroot into whatever you called and installed the 32bit sid,&lt;br /&gt;So I follow the instructions on installing, which places it in /usr/local/ (in the 32bit chroot, of course)&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;chown root:root /usr/local/firefox&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;etc.(read the directions)&lt;br /&gt;&lt;br /&gt;Now download the non-free flash plugin for linux at Adobe.&lt;br /&gt;&lt;br /&gt;manually place&lt;br /&gt;flashplayer.xpt in /usr/local/firefox/components/&lt;br /&gt;and&lt;br /&gt;libflashplayer.so in /usr/local/firefox/plugins/&lt;br /&gt;&lt;br /&gt;finally set up sound by installing ALSA (in AMD64) and running&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;alsaconf&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;What I left out was some swearing, disbelief, glory, and trying so many things it was crazy. I hope I did not leave anything out but if you run into firefox not finding shared libraries, install them in the chroot using 32 bit aptitude.&lt;br /&gt;&lt;br /&gt;I would like to try it again to see if it is as easy as it sounds here; and because I might have forgotten something.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29543621-2355441607553482808?l=thegoldenspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thegoldenspot.blogspot.com/feeds/2355441607553482808/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29543621&amp;postID=2355441607553482808&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/2355441607553482808'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/2355441607553482808'/><link rel='alternate' type='text/html' href='http://thegoldenspot.blogspot.com/2007/10/wow-i-had-tough-time-getting-flash-to.html' title=''/><author><name>play drums</name><uri>http://www.blogger.com/profile/11200364600780049962</uri><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><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29543621.post-7397215442838280755</id><published>2007-10-12T01:16:00.000-07:00</published><updated>2007-10-12T01:22:15.101-07:00</updated><title type='text'></title><content type='html'>&lt;span style="font-size:-1;"&gt;&lt;span class="a"&gt;After compiling Emacs 22.1 I could not open it in an xterm I got&lt;br /&gt;&lt;br /&gt;emacs: cannot open termcap&lt;br /&gt;&lt;br /&gt;or something like that.&lt;br /&gt;&lt;br /&gt;After installing libcurses I was able to 'make clean' and recompile Emacs successfully.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;br /&gt;I found the answer here&lt;br /&gt;&lt;br /&gt;&lt;a href="http://webusers.npl.uiuc.edu/%7Eyangrz/Emacs.html"&gt;webusers.npl.uiuc.edu/~yangrz/&lt;b&gt;Emacs&lt;/b&gt;.html&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29543621-7397215442838280755?l=thegoldenspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thegoldenspot.blogspot.com/feeds/7397215442838280755/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29543621&amp;postID=7397215442838280755&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/7397215442838280755'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/7397215442838280755'/><link rel='alternate' type='text/html' href='http://thegoldenspot.blogspot.com/2007/10/after-compiling-emacs-22.html' title=''/><author><name>play drums</name><uri>http://www.blogger.com/profile/11200364600780049962</uri><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><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29543621.post-3252183289937808545</id><published>2007-10-12T01:07:00.000-07:00</published><updated>2007-10-12T01:09:38.957-07:00</updated><title type='text'></title><content type='html'>AMD64 Debian Etch&lt;br /&gt;&lt;br /&gt;Tried to compile software but configure says I do not have gcc.&lt;br /&gt;&lt;br /&gt;I have to type&lt;br /&gt;&lt;br /&gt;CC=gcc-4.1 ./configure&lt;br /&gt;&lt;br /&gt;this is what my gcc is named.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29543621-3252183289937808545?l=thegoldenspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thegoldenspot.blogspot.com/feeds/3252183289937808545/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29543621&amp;postID=3252183289937808545&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/3252183289937808545'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/3252183289937808545'/><link rel='alternate' type='text/html' href='http://thegoldenspot.blogspot.com/2007/10/amd64-debian-etch-tried-to-compile.html' title=''/><author><name>play drums</name><uri>http://www.blogger.com/profile/11200364600780049962</uri><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><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29543621.post-1087702560856137181</id><published>2007-10-12T00:35:00.000-07:00</published><updated>2007-10-12T00:39:25.884-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Debian'/><title type='text'></title><content type='html'>New AMD64 3.0 ghz processor and a MSI K9A Platinum mother board; Debian Etch and a SATA 320 gig hard drive:&lt;br /&gt;&lt;br /&gt;Problem: Debian net installer is not finding my SATA hard drive.&lt;br /&gt;&lt;br /&gt;Solution: after some searching, some people try using&lt;br /&gt;&lt;br /&gt;install pci=nomsi&lt;br /&gt;&lt;br /&gt;at the boot prompt of the net install disc&lt;br /&gt;&lt;br /&gt;it worked for me too.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29543621-1087702560856137181?l=thegoldenspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thegoldenspot.blogspot.com/feeds/1087702560856137181/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29543621&amp;postID=1087702560856137181&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/1087702560856137181'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/1087702560856137181'/><link rel='alternate' type='text/html' href='http://thegoldenspot.blogspot.com/2007/10/new-amd64-3.html' title=''/><author><name>play drums</name><uri>http://www.blogger.com/profile/11200364600780049962</uri><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><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29543621.post-2612206913310554335</id><published>2007-05-01T18:37:00.000-07:00</published><updated>2007-05-01T18:50:25.599-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='biology'/><category scheme='http://www.blogger.com/atom/ns#' term='animation'/><category scheme='http://www.blogger.com/atom/ns#' term='science'/><title type='text'></title><content type='html'>Some serious biological animation&lt;br /&gt;&lt;br /&gt;http://www.youtube.com/watch?v=E8NHcQesYl8&lt;br /&gt;&lt;br /&gt;http://www.youtube.com/watch?v=jjexZ88wIno&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29543621-2612206913310554335?l=thegoldenspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thegoldenspot.blogspot.com/feeds/2612206913310554335/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29543621&amp;postID=2612206913310554335&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/2612206913310554335'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/2612206913310554335'/><link rel='alternate' type='text/html' href='http://thegoldenspot.blogspot.com/2007/05/some-serious-biological-animation.html' title=''/><author><name>play drums</name><uri>http://www.blogger.com/profile/11200364600780049962</uri><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><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29543621.post-6262336310321527664</id><published>2007-04-24T23:02:00.000-07:00</published><updated>2007-10-12T22:26:40.626-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Xorg'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Debian'/><title type='text'></title><content type='html'>making "caps lock" or "capslock" be the "control" or "ctrl" key (same thing) with Debian Etch PPC and AMD64 (probably applicable to many linux distributions)&lt;br /&gt;&lt;br /&gt;type: "man xmodmap" at the terminal and read the parts about finding the key codes using the command "xev". The following page explains how to do it well:&lt;br /&gt;http://ubuntuforums.org/showthread.php?t=420705&lt;br /&gt;&lt;br /&gt;So after some playing around with my .Xmodmap file and .xsession file in my home directory I have this in my .xsession file:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;xmodmap ~/.Xmodmap&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;this in my .Xmodmap file:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;keycode 66 = Control_L&lt;br /&gt;add Control = Control_L&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;remember to use xev to find the keycode for your caps lock key. 66 is mine on a G4 mac.&lt;br /&gt;&lt;br /&gt;So when you are done to get this working type&lt;br /&gt;&lt;code&gt;&lt;br /&gt;xmodmap ~/.Xmodmap&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;This way you can start using this immediately; otherwise, it should work if you restart X.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29543621-6262336310321527664?l=thegoldenspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thegoldenspot.blogspot.com/feeds/6262336310321527664/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29543621&amp;postID=6262336310321527664&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/6262336310321527664'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/6262336310321527664'/><link rel='alternate' type='text/html' href='http://thegoldenspot.blogspot.com/2007/04/making-caps-lock-or-capslock-be-control.html' title=''/><author><name>play drums</name><uri>http://www.blogger.com/profile/11200364600780049962</uri><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><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29543621.post-336610911552430876</id><published>2007-04-21T15:27:00.000-07:00</published><updated>2007-04-24T23:08:24.528-07:00</updated><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='Python'/><title type='text'></title><content type='html'>building Python 2.5.1 on PowerPc with Debian Etch PPC&lt;br /&gt;&lt;br /&gt;I have a new install of Etch PPC and I downloaded the Unix source.&lt;br /&gt;&lt;br /&gt;I decompress and untar the source.&lt;br /&gt;I cd into Python-2.5.1 and type "./configure "&lt;br /&gt;. . .&lt;br /&gt;I get an error about how "c compiler cannot create executables"&lt;br /&gt;So I do some searching and find out that I need to install the &lt;span style="font-weight: bold;"&gt;build-essentials&lt;/span&gt; package&lt;br /&gt;"apt-get install build-essentials" as root and try again. . .&lt;br /&gt;cd into Python-2.5.1 and type "./configure "&lt;br /&gt;looks good so far. . .&lt;br /&gt;type "make"&lt;br /&gt;as I type make is grinding away on my dual 450 mhz processors (probably only using one of them). . .&lt;br /&gt;seems to have worked.&lt;br /&gt;"make install" as root. . .&lt;br /&gt;more grinding. . .&lt;br /&gt;done&lt;br /&gt;type "python" at the prompt and get:&lt;br /&gt;&lt;br /&gt;Python 2.5.1 (r251:54863, Apr 21 2007, 08:31:56)&lt;br /&gt;[GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2&lt;br /&gt;Type "help", "copyright", "credits" or "license" for more information.&lt;br /&gt;&gt;&gt;&gt;&lt;br /&gt;&lt;br /&gt;Great! And I was skeptical.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29543621-336610911552430876?l=thegoldenspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thegoldenspot.blogspot.com/feeds/336610911552430876/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29543621&amp;postID=336610911552430876&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/336610911552430876'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/336610911552430876'/><link rel='alternate' type='text/html' href='http://thegoldenspot.blogspot.com/2007/04/building-python-2.html' title=''/><author><name>play drums</name><uri>http://www.blogger.com/profile/11200364600780049962</uri><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><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29543621.post-1709027441949698093</id><published>2007-01-14T22:45:00.001-08:00</published><updated>2007-04-24T23:09:41.317-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Humanity'/><category scheme='http://www.blogger.com/atom/ns#' term='Darfur'/><category scheme='http://www.blogger.com/atom/ns#' term='SOS'/><category scheme='http://www.blogger.com/atom/ns#' term='Help'/><title type='text'></title><content type='html'>&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td colspan="2"&gt;&lt;embed style="width: 400px; height: 326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=5282940474961172312&amp;amp;hl=en" flashvars=""&gt;&lt;/embed&gt; &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Google Tech Talks&lt;br /&gt;November 8, 2006&lt;br /&gt;&lt;br /&gt;ABSTRACT&lt;br /&gt;In 2004 Mark Brecke travelled for 5 weeks to Darfur and the refugee camps of Eastern Chad to photographically document the Darfur genocide. He will be presenting his photos, and sharing his remarkable stories.&lt;br /&gt;              &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29543621-1709027441949698093?l=thegoldenspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thegoldenspot.blogspot.com/feeds/1709027441949698093/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29543621&amp;postID=1709027441949698093&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/1709027441949698093'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/1709027441949698093'/><link rel='alternate' type='text/html' href='http://thegoldenspot.blogspot.com/2007/01/darfur.html' title=''/><author><name>play drums</name><uri>http://www.blogger.com/profile/11200364600780049962</uri><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><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29543621.post-7344617849008924133</id><published>2006-12-03T23:48:00.000-08:00</published><updated>2007-04-24T23:10:23.860-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Mac'/><category scheme='http://www.blogger.com/atom/ns#' term='Python'/><category scheme='http://www.blogger.com/atom/ns#' term='Emacs'/><title type='text'></title><content type='html'>python syntax highlighting with emacs in Mac os X&lt;br /&gt;&lt;br /&gt;mac os x 10.4.8&lt;br /&gt;python 2.5&lt;br /&gt;emacs 21.2.1&lt;br /&gt;&lt;br /&gt;tried to get python syntax highlighting with emacs working tonight- succeeded:&lt;br /&gt;&lt;br /&gt;downloaded:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://sourceforge.net/projects/python-mode/"&gt;&lt;span style="text-decoration: underline;"&gt;- python-mode&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;- copied all files from download in ~/.emacs.d/&lt;span class="on" style="display: block;" id="formatbar_CreateLink" title="Link" onmouseover="ButtonHoverOn(this);" onmouseout="ButtonHoverOff(this);" onmouseup="" onmousedown="CheckFormatting(event);FormatbarButton('richeditorframe', this, 8);ButtonMouseDown(this);"&gt;&lt;/span&gt;&lt;br /&gt;- opened python-mode.el in emacs and typed "M-x byte-compile-file"; file was compiled.&lt;br /&gt;&lt;br /&gt;- added the lines in the comment section of the python-mode.el file to my ~/.emacs file&lt;br /&gt;"""&lt;br /&gt;(setq auto-mode-alist (cons '("\\.py$" . python-mode) auto-mode-alist))&lt;br /&gt;(setq interpreter-mode-alist (cons '("python" . python-mode) interpreter-mode-alist&lt;br /&gt;))&lt;br /&gt;(autoload 'python-mode "python-mode" "Python editing mode." t)&lt;br /&gt;(global-font-lock-mode t)&lt;br /&gt;(setq font-lock-maximum-decoration t)&lt;br /&gt;"""&lt;br /&gt;&lt;br /&gt;-added this line to ~/.emacs file&lt;br /&gt;"""&lt;br /&gt;(setq load-path (cons "~/.emacs.d" load-path))&lt;br /&gt;"""&lt;br /&gt;&lt;br /&gt;now when I open .py files there is syntax highlighting.&lt;br /&gt;&lt;br /&gt;YAY!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29543621-7344617849008924133?l=thegoldenspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thegoldenspot.blogspot.com/feeds/7344617849008924133/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29543621&amp;postID=7344617849008924133&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/7344617849008924133'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/7344617849008924133'/><link rel='alternate' type='text/html' href='http://thegoldenspot.blogspot.com/2006/12/python-syntax-highlighting-with-emacs.html' title=''/><author><name>play drums</name><uri>http://www.blogger.com/profile/11200364600780049962</uri><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><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29543621.post-2600645762252039356</id><published>2006-11-26T12:07:00.000-08:00</published><updated>2006-11-26T12:08:06.534-08:00</updated><title type='text'></title><content type='html'>generic cadd is working in dosbox but I can not get my .keylayout files to work.&lt;br /&gt;&lt;br /&gt;http://vogons.zetafleet.com/viewtopic.php?t=13896&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29543621-2600645762252039356?l=thegoldenspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thegoldenspot.blogspot.com/feeds/2600645762252039356/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29543621&amp;postID=2600645762252039356&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/2600645762252039356'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/2600645762252039356'/><link rel='alternate' type='text/html' href='http://thegoldenspot.blogspot.com/2006/11/generic-cadd-is-working-in-dosbox-but-i.html' title=''/><author><name>play drums</name><uri>http://www.blogger.com/profile/11200364600780049962</uri><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><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29543621.post-5063689342804570798</id><published>2006-11-23T22:37:00.000-08:00</published><updated>2007-05-01T21:19:39.760-07:00</updated><title type='text'></title><content type='html'>control-l (ctrl-l or C-l or ^l) will clear the screen using the Python 2.5 command line interpreter just as 'clear' does in linux bash shell&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29543621-5063689342804570798?l=thegoldenspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thegoldenspot.blogspot.com/feeds/5063689342804570798/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29543621&amp;postID=5063689342804570798&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/5063689342804570798'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/5063689342804570798'/><link rel='alternate' type='text/html' href='http://thegoldenspot.blogspot.com/2006/11/in-osx-10.html' title=''/><author><name>play drums</name><uri>http://www.blogger.com/profile/11200364600780049962</uri><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><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29543621.post-8736811851040974284</id><published>2006-11-23T20:35:00.000-08:00</published><updated>2006-11-23T20:43:18.274-08:00</updated><title type='text'></title><content type='html'>I spent much of my time watching Television as a child.&lt;br /&gt;&lt;br /&gt;I could have been reading books.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29543621-8736811851040974284?l=thegoldenspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thegoldenspot.blogspot.com/feeds/8736811851040974284/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29543621&amp;postID=8736811851040974284&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/8736811851040974284'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/8736811851040974284'/><link rel='alternate' type='text/html' href='http://thegoldenspot.blogspot.com/2006/11/i-spent-much-of-my-time-watching.html' title=''/><author><name>play drums</name><uri>http://www.blogger.com/profile/11200364600780049962</uri><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><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29543621.post-2425079486661676837</id><published>2006-11-13T00:15:00.000-08:00</published><updated>2006-11-14T21:12:12.498-08:00</updated><title type='text'></title><content type='html'>a song:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I see things I &lt;a href="http://www.apple.com/macpro/"&gt;want&lt;/a&gt;&lt;br /&gt;I no have the cash&lt;br /&gt;&lt;br /&gt;I see things I want&lt;br /&gt;I no have the money&lt;br /&gt;&lt;br /&gt;I want I want&lt;br /&gt;no money no money&lt;br /&gt;&lt;br /&gt;&lt;a href="http://warc.jalb.de/warcajsp/news_image/599_org.jpg"&gt;You have no stuff&lt;/a&gt;&lt;br /&gt;but I want more stuff&lt;br /&gt;&lt;br /&gt;You have no stuff&lt;br /&gt;but I want that stuff&lt;br /&gt;&lt;br /&gt;I want things I want&lt;br /&gt;no money no money&lt;br /&gt;&lt;br /&gt;I want things I want&lt;br /&gt;no money no money&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29543621-2425079486661676837?l=thegoldenspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thegoldenspot.blogspot.com/feeds/2425079486661676837/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29543621&amp;postID=2425079486661676837&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/2425079486661676837'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/2425079486661676837'/><link rel='alternate' type='text/html' href='http://thegoldenspot.blogspot.com/2006/11/song-i-see-things-i-want-i-no-have-cash.html' title=''/><author><name>play drums</name><uri>http://www.blogger.com/profile/11200364600780049962</uri><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><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29543621.post-116313270186030108</id><published>2006-11-09T20:14:00.000-08:00</published><updated>2006-11-13T00:14:38.275-08:00</updated><title type='text'></title><content type='html'>NyQuil headache. Nyquil Hangover. Nyquil Sucks.&lt;br /&gt;&lt;br /&gt;Oh this is not not funny: went to the 24 hour grocery store that is 15 minutes out of downtown(why the crap there is not one nearby-? I can only suspect pure reason and logic that baffles my tiny brain).&lt;br /&gt;&lt;br /&gt;The time is 1:45AM.&lt;br /&gt;I cannot sleep, only lie down and cough in the dark.&lt;br /&gt;&lt;br /&gt;Get to said store and realize that I have not a $ in my ass pocket (forgot wallet). Drive back home to get $ and  drive .3 blocks to nearby gas-station/food-mart where I purchase 12 liquiCaps for $7. Take 2; the time is 2:15AM.&lt;br /&gt;&lt;br /&gt;Sleep in until 4pm the next day.&lt;br /&gt;&lt;br /&gt;Now I have a headache and a neck ache that I attribute to my decision to take 2 instead of 1 liquiCap.&lt;br /&gt;&lt;br /&gt;Apparently others have had &lt;a href="http://www.google.com/search?num=100&amp;hs=zEN&amp;amp;hl=en&amp;lr=&amp;amp;newwindow=1&amp;safe=off&amp;amp;client=firefox-a&amp;rls=org.mozilla%3Aen-US%3Aofficial&amp;amp;q=%22nyquil+hangover%22&amp;amp;btnG=Search"&gt;similar luck&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29543621-116313270186030108?l=thegoldenspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thegoldenspot.blogspot.com/feeds/116313270186030108/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29543621&amp;postID=116313270186030108&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/116313270186030108'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/116313270186030108'/><link rel='alternate' type='text/html' href='http://thegoldenspot.blogspot.com/2006/11/nyquil-headache.html' title=''/><author><name>play drums</name><uri>http://www.blogger.com/profile/11200364600780049962</uri><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><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29543621.post-116284328460776805</id><published>2006-11-06T11:25:00.000-08:00</published><updated>2006-11-13T00:14:38.191-08:00</updated><title type='text'></title><content type='html'>Are you tired of your $&lt;a href="http://www.dol.gov/dol/topic/wages/minimumwage.htm"&gt;5.15&lt;/a&gt; an hour job?&lt;br /&gt;&lt;br /&gt;Work for. . . SECURITY DONUT! We pay $5.55 an hour, offer 3 parking lots for sleeping in your car(nights off only please) and employee-discounted coffee flavored beverages!&lt;br /&gt;&lt;br /&gt;Our management team has been selected over a period of decades to insure you will be trained by the best-of-the-best, of-the-best, of the-best, in low-level security patrol and  loss prevention surveillance techniques:&lt;br /&gt;&lt;br /&gt;No guns, boots, knives, flashlights, tasers, cargo pants, &lt;a href="http://en.wikipedia.org/wiki/Nunchaku"&gt;nunchaku&lt;/a&gt;, or pepper sprays/gels needed!&lt;br /&gt;&lt;br /&gt;Use tried and true techniques, such as "The Scream" or "The Hide-And-Call-For-HELP" or the "Running Screaming".&lt;br /&gt;&lt;br /&gt;Stop by our Santa Rosa offices for more information and a free test trial/interview.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29543621-116284328460776805?l=thegoldenspot.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thegoldenspot.blogspot.com/feeds/116284328460776805/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29543621&amp;postID=116284328460776805&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/116284328460776805'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29543621/posts/default/116284328460776805'/><link rel='alternate' type='text/html' href='http://thegoldenspot.blogspot.com/2006/11/are-you-tired-of-your-5.html' title=''/><author><name>play drums</name><uri>http://www.blogger.com/profile/11200364600780049962</uri><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><thr:total>0</thr:total></entry></feed>
