<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' version='2.0'><channel><atom:id>tag:blogger.com,1999:blog-12015401</atom:id><lastBuildDate>Sun, 06 Dec 2009 01:43:37 +0000</lastBuildDate><title>Jono's technical notes</title><description>The opinions expressed are those of the author and not necessarily reviewed in advance by anyone but the author, and neither Spiral Arm Ltd nor any other party necessarily agrees with them.</description><link>http://blog.spiralarm.com/jono/</link><managingEditor>noreply@blogger.com (Jono)</managingEditor><generator>Blogger</generator><openSearch:totalResults>9</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-12015401.post-4942305406946285313</guid><pubDate>Mon, 28 Sep 2009 07:18:00 +0000</pubDate><atom:updated>2009-09-29T09:08:59.618+10:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Scala trait</category><title>Scala traits to enhance existing java libraries</title><description>&lt;p&gt;Recently we moved some code over to Scala which uses Apache's httpClient, through laziness I used &lt;/p&gt; &lt;p&gt;method.getResponseBodyAsString. Apart from being poor form, it breaks our - nothing but errors in the Production logs rule at Spiral Arm.&lt;/p&gt;&lt;p&gt;To alleviate the coding smell we created a trait to read the body as a stream instead of a string. Rather a simple task. The nice things about the trait are the use of the self reference.&lt;/p&gt;&lt;br /&gt;&lt;p  style="margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Monaco; color:#b04800;"&gt;&lt;span style="color:#000000;"&gt;  &lt;/span&gt;&lt;span style="color:#4300ff;"&gt;self&lt;/span&gt;&lt;span style="color:#000000;"&gt;:&lt;/span&gt;HttpMethod&lt;span style="color:#000000;"&gt; =&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;This means 'I expect to be mixed with something of this type' nicely reducing the scope where the trait can be applied and is also self documenting. We could have returned a None Option instead of an empty String, meh. It's an implementation issue and not a huge issue.&lt;/p&gt; &lt;br /&gt;&lt;p  style="margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Monaco; color:#b04800;"&gt;&lt;span style="color:#5f5e5f;"&gt;trait&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;SafeResponseBody&lt;span style="color:#000000;"&gt; {&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Monaco; min-height: 21.0px"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p  style="margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Monaco; color:#b04800;"&gt;&lt;span style="color:#000000;"&gt;  &lt;/span&gt;&lt;span style="color:#4300ff;"&gt;self&lt;/span&gt;&lt;span style="color:#000000;"&gt;:&lt;/span&gt;HttpMethod&lt;span style="color:#000000;"&gt; =&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Monaco; min-height: 21.0px"&gt; &lt;/p&gt; &lt;p  style="margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Monaco; color:#004e9b;"&gt;&lt;span style="color:#000000;"&gt;  &lt;/span&gt;&lt;span style="color:#5f5e5f;"&gt;def&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;getResponseBodyUpTo&lt;span style="color:#000000;"&gt;(&lt;/span&gt;&lt;span style="color:#4300ff;"&gt;to&lt;/span&gt;&lt;span style="color:#000000;"&gt;:&lt;/span&gt;&lt;span style="color:#b04800;"&gt;Int&lt;/span&gt;&lt;span style="color:#000000;"&gt;):&lt;/span&gt;&lt;span style="color:#b04800;"&gt;String&lt;/span&gt;&lt;span style="color:#000000;"&gt; = {&lt;/span&gt;&lt;/p&gt; &lt;p  style="margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Monaco; color:#004e9b;"&gt;&lt;span style="color:#000000;"&gt;    &lt;/span&gt;&lt;span style="color:#5f5e5f;"&gt;val&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#4300ff;"&gt;in&lt;/span&gt;&lt;span style="color:#000000;"&gt; = &lt;/span&gt;&lt;span style="color:#5f5e5f;"&gt;new&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#b04800;"&gt;InputStreamReader&lt;/span&gt;&lt;span style="color:#000000;"&gt;(&lt;/span&gt;&lt;span style="color:#5f5e5f;"&gt;this&lt;/span&gt;&lt;span style="color:#000000;"&gt;.&lt;/span&gt;getResponseBodyAsStream&lt;span style="color:#000000;"&gt;, &lt;/span&gt;&lt;span style="color:#ff606d;"&gt;"UTF-8"&lt;/span&gt;&lt;span style="color:#000000;"&gt;)&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Monaco"&gt;    &lt;span style="color:#5f5e5f;"&gt;val&lt;/span&gt; &lt;span style="color:#4300ff;"&gt;buffer&lt;/span&gt; = &lt;span style="color:#5f5e5f;"&gt;new&lt;/span&gt; &lt;span style="color:#b04800;"&gt;Array&lt;/span&gt;[&lt;span style="color:#b04800;"&gt;Char&lt;/span&gt;](&lt;span style="color:#4300ff;"&gt;to&lt;/span&gt;)&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Monaco"&gt;    &lt;span style="color:#5f5e5f;"&gt;val&lt;/span&gt; &lt;span style="color:#4300ff;"&gt;n&lt;/span&gt; = &lt;span style="color:#4300ff;"&gt;in&lt;/span&gt;.&lt;span style="color:#004e9b;"&gt;read&lt;/span&gt;(&lt;span style="color:#4300ff;"&gt;buffer&lt;/span&gt;,0,&lt;span style="color:#4300ff;"&gt;to&lt;/span&gt;)&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Monaco"&gt;    &lt;span style="color:#4300ff;"&gt;n&lt;/span&gt; &lt;span style="color:#5f5e5f;"&gt;match&lt;/span&gt;  {&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Monaco"&gt;      &lt;span style="color:#5f5e5f;"&gt;case&lt;/span&gt; -1 =&gt; &lt;span style="color:#ff606d;"&gt;""&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Monaco"&gt;      &lt;span style="color:#5f5e5f;"&gt;case&lt;/span&gt; 0  =&gt; &lt;span style="color:#ff606d;"&gt;""&lt;/span&gt;&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Monaco"&gt;      &lt;span style="color:#5f5e5f;"&gt;case&lt;/span&gt; _  =&gt; &lt;span style="color:#5f5e5f;"&gt;new&lt;/span&gt; &lt;span style="color:#b04800;"&gt;String&lt;/span&gt;(&lt;span style="color:#4300ff;"&gt;buffer&lt;/span&gt;, 0, &lt;span style="color:#4300ff;"&gt;n&lt;/span&gt;)&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Monaco"&gt;    }&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Monaco; min-height: 21.0px"&gt;       &lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Monaco"&gt;  }&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Monaco"&gt;}&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Monaco; min-height: 21.0px"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Using the trait is nice and clean, when creating an instance of the particular HttpMethod we mix in our trait and then have access to it's methods.&lt;/p&gt;&lt;br /&gt; &lt;p  style="margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Monaco; color:#b04800;"&gt;&lt;span style="color:#5f5e5f;"&gt;val&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#4300ff;"&gt;method&lt;/span&gt;&lt;span style="color:#000000;"&gt; = &lt;/span&gt;&lt;span style="color:#5f5e5f;"&gt;new&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;PostMethod&lt;span style="color:#000000;"&gt;(&lt;/span&gt;&lt;span style="color:#4300ff;"&gt;url&lt;/span&gt;&lt;span style="color:#000000;"&gt;) &lt;/span&gt;&lt;span style="color:#5f5e5f;"&gt;with&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;SafeResponseBody&lt;/p&gt; &lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Monaco; color: #b04800"&gt;...&lt;/p&gt; &lt;p  style="margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Monaco; color:#004e9b;"&gt;&lt;span style="color:#4300ff;"&gt;method&lt;/span&gt;&lt;span style="color:#000000;"&gt;.&lt;/span&gt;getResponseBodyUpTo&lt;span style="color:#000000;"&gt;(160)&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:Monaco, serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12015401-4942305406946285313?l=blog.spiralarm.com%2Fjono' alt='' /&gt;&lt;/div&gt;</description><link>http://blog.spiralarm.com/jono/2009/09/scala-traits-to-enhance-existing-java.html</link><author>noreply@blogger.com (Jono)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-12015401.post-3529041170005382040</guid><pubDate>Wed, 18 Mar 2009 05:31:00 +0000</pubDate><atom:updated>2009-03-18T16:43:27.957+11:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Scala web frameworks lift</category><title>Scala frameworks</title><description>I'm currently trying to get my head around Lift, but at the moment it seems about 10 perspiration 90% magic, It is incredible concise, which is wonderful after spending the last few days bashing my head against the struts wall.&lt;br /&gt;&lt;br /&gt;  I defaulted to looking at lift as I thought it was the only Scala web framework available. Today I spent a bit of time looking round for any others and below are some brief notes on the frameworks found.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;a href="http://liftweb.net/"&gt;Lift&lt;/a&gt;&lt;/span&gt;    &lt;br /&gt;   &lt;br /&gt;Lift is the most popular of the Scala based framework. It is built round the notions of convention over configuration and  separation of concerns - view are XHTML with lift tags, there can be no intermingling of presentation and code in the views.  It has recently gone to version 1.0 and has an active community willing to help. It is easy to get started as lift requires maven and nothing else to create a project.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://code.google.com/p/sweetscala/"&gt;&lt;span style="font-size:130%;"&gt;Sweet&lt;/span&gt;&lt;/a&gt; &lt;br /&gt;   &lt;br /&gt;    Sweet  is another convention over configuration framework with a grails like convention over configuration command line utility to quickly generate controllers. Sweet also uses maven to manage dependencies.   Sees more flexible than lift, you are not bound to a session based implementation. This comes at the price that you will need to do more of the work yourself.&lt;br /&gt;    It is  more standard MVC framework, but in scala, than a complete change that you get with lift.  Site site seems to have a friendly tone and is some what more accessibly than the lift site.  It is early days with the current version at 0.0.2.642 and 4 developers, it does however have a semi-active community.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://code.google.com/p/webflavor/"&gt;&lt;span style="font-size:130%;"&gt;Web flavor &lt;/span&gt;&lt;/a&gt;    &lt;br /&gt;   &lt;br /&gt;    flavor appears to be a scala replacement for php/cgi using scala script in the page, it looks like it also supports templating similar to lift.  flavor currently has one developer and&lt;br /&gt;    I couldn't see any sign of a community, to be fair I didn't really look very hard.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://bitbucket.org/pk11/pinky/wiki/Home"&gt;&lt;span style="font-size:130%;"&gt;Pinky&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;    To quote Pinky's home page  "Pinky is a simple Scala REST/MVC web framework built on top of Guice Servlet." It supports XML/Json generation out of the box no configuration nor batteries required.  It appears to be about 7 weeks old and have a single developer and some what unsurprisingly no community that I could find.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Have I missed any others, do I have any wildly incorrect facts ?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12015401-3529041170005382040?l=blog.spiralarm.com%2Fjono' alt='' /&gt;&lt;/div&gt;</description><link>http://blog.spiralarm.com/jono/2009/03/scala-frameworks.html</link><author>noreply@blogger.com (Jono)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-12015401.post-4182492842935698456</guid><pubDate>Thu, 19 Feb 2009 09:29:00 +0000</pubDate><atom:updated>2009-03-18T16:47:15.915+11:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Scala IDE eclipse netbeans</category><title>State of Scala in the IDE</title><description>So I've been playing with Scala over the last few days and trying to get my head back in functional land, which means at some stage Im either going to go postal or start talking backwards.  I used vi for the first few days until I couldn't handle being with out ctrl + space any longer.&lt;br /&gt;&lt;br /&gt;I've not tried Intellij, The subversion interface disturbs me greatly, there is a review of the Scala integration below.  For me unless intellij pulls something phnomenal   out of the bad it is really between eclipse and netbeans.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Netbeans&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;   I've only had a quick play with the latest plugin for 7.0 but it seems to handle refactoring, indentation, running and code completion fine, the site seems to&lt;br /&gt;   insinuate there is debugging, but buggered if I could find it, perhaps a less than cursory glance may have helped.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;eclipse&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;   I've been using eclipse for a few days now, and apart from a few hick-ups getting eclipse to compile or recognise the Scala classes it has been pretty   &lt;br /&gt;   good. Running and debugging code is fine, code completion works, indentation is some weird sort of help that I have failed to under stand but anyone   &lt;br /&gt;   with a post grad degree will be able to explain to me.  The one thing it is missing and ones again  causes me tears  is it's lack of refactoring.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Both support maven so switching between IDE's is trivial, which is nice.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://fupeg.blogspot.com/2009/02/scala-puzzler-and-intellij.html"&gt;scala intellij integration&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12015401-4182492842935698456?l=blog.spiralarm.com%2Fjono' alt='' /&gt;&lt;/div&gt;</description><link>http://blog.spiralarm.com/jono/2009/02/state-of-scala-in-ide.html</link><author>noreply@blogger.com (Jono)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-12015401.post-7341584101763101621</guid><pubDate>Thu, 11 Oct 2007 10:39:00 +0000</pubDate><atom:updated>2007-10-29T10:17:01.637+11:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>OSX trac mod_python</category><title>How to install trac 0.11 on OS X ( 10.4.10)</title><description>&lt;p&gt;The following are notes on how to install and configure trac on OS X with multiple projects with a dedicated user to maintain the trac installation.  These notes have been derived from several sources and are primarily so I can reproduce this at a later date without thinking, they are, unsurprisingly&lt;/p&gt;&lt;ul&gt;&lt;li&gt;http://trac.edgewall.org/&lt;/li&gt; &lt;li&gt;http://modpython.org/&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;You'll need the following&lt;/p&gt;&lt;ul&gt;&lt;li&gt;sudo / root access&lt;/li&gt;  &lt;li&gt;internet access&lt;/li&gt; &lt;li&gt;python 2.3.5&lt;/li&gt;  &lt;li&gt;sqlite3&lt;/li&gt; &lt;/ul&gt;&lt;p&gt;You will need to download&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Apache 2.2.4 &lt;/li&gt;  &lt;li&gt;Mod_python 3.3.1&lt;/li&gt; &lt;li&gt;&lt;a href="http://peak.telecommunity.com/dist/ez_setup.py"&gt;setuptools&lt;/a&gt;&lt;br /&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;ol&gt;&lt;li&gt; Install Apache 2.2.4&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Follow Richard's &lt;a href="http://blog.spiralarm.com/richard/archive/2007_02_01_archive.html"&gt;instructions&lt;/a&gt;, see step 6 for an overview &lt;pre&gt;./configure --prefix=/Users/jono/Applications/apache/2.2.4 --enable-mods-shared=most --enable-ssl --with-mpm=worker --without-berkeley-db --enable-proxy  &lt;br /&gt;&lt;br /&gt;make&lt;br /&gt;sudo make install&lt;br /&gt;cd ~/apache/2.2.4/bin&lt;br /&gt;sudo ./apachectrl start&lt;br /&gt;&lt;/pre&gt;check there is something sane here http://127.0.0.1/&lt;br /&gt;&lt;/li&gt;  &lt;/ul&gt;    &lt;/li&gt; &lt;!-- end install apache--&gt;&lt;br /&gt;&lt;li&gt;Install mod_python  3.3.1&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;configure and install&lt;br /&gt;&lt;pre&gt;./configure --with-apxs=/Users/jono/Applications/apache/2.2.4/bin/apxs&lt;br /&gt;make&lt;br /&gt;sudo  make install&lt;/pre&gt;    &lt;/li&gt;     &lt;li&gt;&lt;p&gt;tell apache about it&lt;/p&gt;    add&lt;br /&gt;  &lt;pre&gt;LoadModule python_module /Users/jono/Applications/apache/2.2.4/modules/mod_python.so&lt;/pre&gt;      to&lt;br /&gt; &lt;pre&gt;/Users/jono/Applications/apache/2.2.4/conf/httpd.conf&lt;/pre&gt;       &lt;/li&gt;         &lt;li&gt;&lt;p&gt;test apache is talking to python&lt;/p&gt;&lt;ol&gt;&lt;li&gt;edit &lt;code&gt;httpd.conf&lt;/code&gt; add&lt;br /&gt;&lt;br /&gt;   &amp;lt;Location /mpinfo&amp;gt;&lt;br /&gt;SetHandler mod_python&lt;br /&gt;PythonHandler mod_python.testhandler&lt;br /&gt;   &amp;lt;/Location&amp;gt;&lt;br /&gt;&lt;/li&gt;     &lt;li&gt;&lt;p&gt;restart apache and see what we get&lt;/p&gt;&lt;pre&gt;cd ~/apache/2.2.4/bin&lt;br /&gt;sudo ./apachectrl&lt;br /&gt;http://127.0.0.1/mpinfo&lt;/pre&gt;      &lt;p&gt;you should get a table showing various System information about apache, python and the request headers, including who the process is running as. In our case it is &lt;em&gt;daemon&lt;/em&gt; - make a note of this you'll need it later.&lt;/p&gt;         &lt;/li&gt;     &lt;li&gt;&lt;p&gt;clean up&lt;/p&gt;      &lt;p&gt;remove the following from &lt;code&gt;httpd.conf&lt;/code&gt;&lt;/p&gt;      &amp;lt;Location /mpinfo&amp;gt;&lt;br /&gt;SetHandler mod_python&lt;br /&gt;PythonHandler mod_python.testhandler&lt;br /&gt;   &amp;lt;/Location&amp;gt;&lt;br /&gt;&lt;br /&gt;  &lt;/li&gt;                    &lt;/ol&gt;        &lt;/li&gt;  &lt;/ul&gt;&lt;/li&gt;  &lt;li&gt;Install python modules required by the latest version of trac ( 0.11)&lt;br /&gt; &lt;ul&gt;&lt;br /&gt;  &lt;li&gt;install setuptools&lt;br /&gt;   &lt;ol&gt;&lt;br /&gt;    &lt;li&gt;this will need to be done as root so you have write permissions to &lt;code&gt;/System/Library/Frameworks/Python.framework/Versions/2.3/bin&lt;/code&gt;&lt;br /&gt;          &lt;code&gt;sudo python ez_setup.py&lt;/code&gt;    &lt;br /&gt;      &lt;/li&gt;       &lt;li&gt;&lt;p&gt;link it to a bin directory in your path -  &lt;em&gt;This should be a single line!&lt;/em&gt;&lt;/p&gt;        &lt;code&gt;sudo ln -s /System/Library/Frameworks/Python.framework/Versions/2.3/bin/easy_install easy_install&lt;/code&gt;               &lt;br /&gt;    &lt;/li&gt;   &lt;br /&gt;    &lt;li&gt;test it, type eas and you should get tab completion, well, assuming you are using bash.&lt;/li&gt;          &lt;br /&gt;  &lt;li&gt;install Genshi&lt;br /&gt;   &lt;code&gt;easy_install Genshi&lt;/code&gt;&lt;br /&gt;  &lt;/li&gt;&lt;br /&gt;  &lt;li&gt;install  pysqlite&lt;br /&gt;   &lt;ul&gt;&lt;br /&gt;    &lt;li&gt;make sure easy_install is going to install the correct version,it should be 2.3.2 or above&lt;br /&gt;     &lt;code&gt;easy_install -n pysqlite&lt;/code&gt;&lt;br /&gt;    &lt;/li&gt;&lt;br /&gt;    &lt;li&gt;if the above seems okay, install it&lt;br /&gt;     &lt;code&gt;easy_install pysqlite&lt;/code&gt;&lt;br /&gt;    &lt;/li&gt;                  &lt;/ul&gt;             &lt;/li&gt;               &lt;/ol&gt;&lt;/li&gt;&lt;/ul&gt;                &lt;/li&gt;     &lt;br /&gt;&lt;li&gt;Install trac&lt;br /&gt;&lt;p&gt;This is some what more convoluted than it needs to be, once edgewall release a complete version (0.11) of trac, this will be &lt;/p&gt;&lt;br /&gt;&lt;code&gt;easy_install trac&lt;/code&gt;&lt;br /&gt;&lt;p&gt;However at present this installs 10.4, which is not what we want, so it is worth trying &lt;code&gt;easy_install -n trac&lt;/code&gt; to see if it is going to install 0.11, until then, there is :&lt;/p&gt;&lt;ul&gt;&lt;li&gt;check out the latest code from svn, in my case this was revision 6049.&lt;br /&gt; &lt;code&gt; svn co http://svn.edgewall.org/repos/trac/trunk trac   &lt;/code&gt;&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;install trac&lt;br /&gt; &lt;code&gt;sudo  python ./setup.py  install&lt;/code&gt;&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;link the trac binaries to a bin directory in your path.&lt;br /&gt; &lt;code&gt;sudo ln -s /System/Library/Frameworks/Python.framework/Versions/2.3/bin/ trac-admin  trac-admin&lt;/code&gt;&lt;br /&gt; &lt;code&gt;sudo ln -s /System/Library/Frameworks/Python.framework/Versions/2.3/bin/ tracd  tracd&lt;/code&gt;&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;If you want to be sure trac is installed and working before continuing ( probably a good idea ) check the Observations notes below.&lt;br /&gt;   &lt;br /&gt;&lt;/li&gt; &lt;/ul&gt;   &lt;/li&gt;   &lt;li&gt;set up trac user and environment&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;create a trac user - see my previous &lt;a href="http://static.spiralarm.com/blog/jono/2007/03/creating-user-from-commandline-on-os-x.html"&gt;post&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;add them to the daemon group - or whatever user apache is running at&lt;br /&gt; &lt;code&gt;sudo nicl / -merge /groups/daemon users daemon&lt;/code&gt;&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;as the &lt;em&gt;trac&lt;/em&gt; user create the projects and set the correct permissions&lt;br /&gt; &lt;ol&gt;&lt;br /&gt;  &lt;li&gt;create projects&lt;br /&gt;   &lt;code&gt;trac-admin project00  initenv&lt;/code&gt;&lt;br /&gt;   &lt;code&gt;trac-admin project01  initenv&lt;/code&gt;                &lt;br /&gt;  &lt;/li&gt;&lt;br /&gt;  &lt;li&gt;set the permissions on the trac projects&lt;br /&gt;   &lt;code&gt;chown -R :daemon project00&lt;/code&gt;          &lt;br /&gt;   &lt;code&gt;chown -R :daemon project01&lt;/code&gt;                &lt;br /&gt;   &lt;code&gt;chmod -R g+rw  project00&lt;/code&gt;   &lt;br /&gt;   &lt;code&gt;chmod -R g+rw  project01&lt;/code&gt;         &lt;br /&gt;  &lt;/li&gt;              &lt;/ol&gt;        &lt;/li&gt; &lt;/ul&gt;   &lt;/li&gt; &lt;li&gt;&lt;p&gt;Configure apache to talk to trac via mod_python&lt;br /&gt;&lt;/p&gt;  &lt;ul&gt;&lt;li&gt;add the following to httpd.conf&lt;br /&gt; &lt;code&gt;&lt;br /&gt;&amp;lt;Location /trac&amp;gt;&lt;br /&gt;SetHandler mod_python&lt;br /&gt;PythonInterpreter main_interpreter&lt;br /&gt;PythonHandler trac.web.modpython_frontend&lt;br /&gt;PythonOption TracEnvParentDir /Users/trac&lt;br /&gt;PythonOption TracUriRoot /trac&lt;br /&gt;&amp;lt;/Location&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;code&gt;&amp;lt;&lt;/code&gt;&lt;code&gt;LocationMatch "/trac/[^/]+/login"&lt;/code&gt;&lt;code&gt;&amp;gt;&lt;/code&gt;&lt;code&gt;&lt;br /&gt;      AuthType Basic&lt;br /&gt;      AuthName "Trac"&lt;br /&gt; AuthUserFile /Users/trac/.htpasswd&lt;br /&gt; Require valid-user&lt;br /&gt;&amp;lt;/LocationMatch&amp;gt;&lt;br /&gt;  &lt;br /&gt; &lt;/code&gt;    &lt;/li&gt;     &lt;li&gt;as the &lt;em&gt;trac&lt;/em&gt; user populate .htpasswd   &lt;br /&gt; &lt;code&gt;htpasswd -c /Users/trac/.htpasswd  jono&lt;/code&gt;&lt;br /&gt;&lt;/li&gt; &lt;br /&gt;&lt;li&gt;as the &lt;em&gt;trac&lt;/em&gt; user configure trac permissions   &lt;br /&gt; &lt;ol&gt;&lt;br /&gt;  &lt;li&gt;add an administrative user for the projects&lt;br /&gt;   &lt;code&gt;trac-admin /Users/trac/project00 permission add jono TRAC_ADMIN&lt;/code&gt;&lt;br /&gt;&lt;code&gt;trac-admin /Users/trac/project01 permission add jono TRAC_ADMIN&lt;/code&gt;&lt;br /&gt;  &lt;/li&gt;&lt;br /&gt;  &lt;li&gt;remove anonymous and authenticated  permissions from all projects, this is needed so users can not log into projects others than there own and is probably just a good idea ;)&lt;br /&gt;   &lt;code&gt;trac-admin /Users/trac/project00 permission remove anonymous '*'&lt;/code&gt;&lt;br /&gt;&lt;code&gt;trac-admin /Users/trac/project00 permission remove authenticated '*'&lt;/code&gt;&lt;br /&gt;   &lt;code&gt;trac-admin /Users/trac/project11 permission remove anonymous '*'&lt;/code&gt;&lt;br /&gt;&lt;code&gt;trac-admin /Users/trac/project11 permission remove authenticated '*'&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;  &lt;/li&gt;     &lt;li&gt;bounce apache&lt;br /&gt;   &lt;code&gt;sudo ./apachectl stop&lt;/code&gt;&lt;br /&gt;&lt;code&gt;sudo ./apachectl start&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;  &lt;/li&gt;     &lt;li&gt;try and login&lt;br /&gt;   &lt;code&gt;http://127.0.0.1/trac/project0&lt;/code&gt;&lt;br /&gt;&lt;code&gt;http://127.0.0.1/trac/project1&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;  &lt;/li&gt;                         &lt;/ol&gt;    &lt;/li&gt;      &lt;/ul&gt;    &lt;/li&gt; &lt;li&gt;restrict access to projects  - currently every entry into .htpasswd has access to all projects, as an authenicated user, which would allow users from one project to browse and edit the wiki or another - not an ideal situation, so we do the following&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;remove ability to see project listing - what people can't see they can't try and access&lt;br /&gt; &lt;ol&gt;&lt;br /&gt;  &lt;li&gt;update httpd.conf - change &lt;code&gt;Locaiton&lt;/code&gt; from &lt;span style="font-family:monospace;"&gt;&lt;&lt;/span&gt;&lt;code&gt;Location /trac&gt;&lt;/code&gt; to &lt;span style="font-family:monospace;"&gt;&lt;&lt;/span&gt;&lt;code&gt;LocationMatch "/.+/"&gt; &lt;/code&gt;remembering to also update the closing Location tag to LocationMatch&lt;/li&gt;&lt;li&gt;bounce apache&lt;br /&gt;   &lt;code&gt;sudo ./apachectl stop&lt;/code&gt;&lt;br /&gt;&lt;code&gt;sudo ./apachectl start&lt;/code&gt;&lt;br /&gt;&lt;/li&gt;           &lt;/ol&gt;        &lt;/li&gt;      &lt;/ul&gt;    &lt;/li&gt;   &lt;h3&gt;Finally&lt;/h3&gt; &lt;p&gt;Things to do:&lt;/p&gt; &lt;ul&gt;&lt;li&gt;get svn access working &lt;/li&gt;  &lt;li&gt;consider https  &lt;/li&gt;   &lt;li&gt;consider using digest rather than basic athenication  &lt;/li&gt;   &lt;li&gt;virtual hosts &lt;/li&gt;       &lt;/ul&gt;   &lt;h3&gt;Links&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://httpd.apache.org/"&gt;apache&lt;/a&gt; &lt;/li&gt;  &lt;li&gt;&lt;a href="http://modpython.org/live/mod_python-3.3.1/doc-html/installation.html"&gt;mod_python installation&lt;/a&gt; &lt;/li&gt;  &lt;li&gt;&lt;a href="http://peak.telecommunity.com/DevCenter/setuptools"&gt;setuptools&lt;/a&gt; &lt;/li&gt;  &lt;li&gt;&lt;a href="http://genshi.edgewall.org/wiki/Download"&gt;Genshi&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.playingwithwire.com/2007/06/host-your-own-project-with-trac/"&gt;permissions issues &lt;/a&gt; &lt;/li&gt;       &lt;/ul&gt; &lt;h3&gt;Observations&lt;/h3&gt; &lt;ol&gt;&lt;br /&gt;&lt;li&gt;install using the default locations for python, installing with user specific locations will cause a great deal of pain, if you know what you are doing with PYTHONPATH, you will probably be okay,  then again, you probably aren't going to be reading this either :)&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;if you ignored me and tried installing setuptools without root access you will have noticed the binary failed to install and now you are wondering how to get it installed.&lt;br /&gt;   &lt;code&gt;sudo python ez_setup.py  -U  setuptools&lt;/code&gt;&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;restarting apache,there are notes on either the trac or mod_python site about this, it would appear that&lt;code&gt; sudo ./apachectl restart&lt;/code&gt;doesn’t always work, this is usually when you are tired and it has been working all day, save yourself pain just use.&lt;br /&gt; &lt;code&gt;sudo ./apachectl stop&lt;/code&gt;&lt;br /&gt; &lt;code&gt;sudo ./apachectl start&lt;/code&gt;&lt;br /&gt;&lt;/li&gt;   &lt;li&gt;&lt;p&gt;if trac isn’t playing you may want to make sure it is installed correctly, try the following&lt;br /&gt; &lt;/p&gt;   &lt;ol&gt;&lt;li&gt;create  a dummy project&lt;br /&gt;  &lt;code&gt;trac-admin testTrac  initenv&lt;/code&gt;&lt;br /&gt; &lt;/li&gt;&lt;br /&gt; &lt;li&gt;start the trac daemon&lt;br /&gt;  &lt;code&gt; tracd --port 8000 /Users/jono/Documents/trac/testTrac&lt;/code&gt;&lt;br /&gt; &lt;/li&gt;&lt;br /&gt; &lt;li&gt;point a browser to&lt;br /&gt;  &lt;code&gt;http://localhost:8000/testTrac&lt;/code&gt;&lt;br /&gt; &lt;/li&gt;&lt;br /&gt; &lt;li&gt;if it all looks okay, you can delete this now&lt;br /&gt; &lt;/li&gt;              &lt;br /&gt;&lt;/ol&gt;      &lt;/li&gt;     &lt;/ol&gt; &lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12015401-7341584101763101621?l=blog.spiralarm.com%2Fjono' alt='' /&gt;&lt;/div&gt;</description><link>http://blog.spiralarm.com/jono/2007/10/how-to-install-trac-011-on-os-x-10410.html</link><author>noreply@blogger.com (Jono)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-12015401.post-7193553393844969934</guid><pubDate>Mon, 03 Sep 2007 11:20:00 +0000</pubDate><atom:updated>2007-09-06T11:36:16.483+10:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>AIMIA Mobile Advertising Guidelines</category><title>AIMIA Launches Mobile Advertising Guidelines</title><description>I attended the "The Future of mobile Advertising" presented by the &lt;a href="https://www.aimia.com.au/"&gt;AIMIA&lt;/a&gt; on Tuesday morning, this was mainly a chance to launch the AIMIA mobile advertising &lt;a href="https://www.aimia.com.au/i-cms?page=3436"&gt;guidelines&lt;/a&gt;, There was little earth shattering information and most of it is common sense and a great deal of "use us,  other people don't know what they are talking about".&lt;br /&gt;&lt;br /&gt;&lt;font style="font-weight: bold;"&gt;Disappointments&lt;/font&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Mobile advertising is going to be amazing, this year 6-7 million, 200 Million in 3 years, 1.3 Billion by 2010, 10 - 20% of all advertising, little of this seemed based on fact, seeing as the numbers were so wildly different. The six to seven million was actually the previous 12 months, I believe, otherwise it was YTD.&lt;/li&gt;&lt;li&gt;People are trying to work out how to measure mobile advertising, for some reason they believe this isn't going to be click through or SMS's sent or impression based.&lt;/li&gt;&lt;li&gt;Content, including advertising - such as banner adverts need to be tailored to the individual device, no great surprises there, scrolling to see adverts either horizontally or vertically is bad.&lt;/li&gt;&lt;li&gt;Attitude of some of the presenters towards technical folk rather than advertisers, referring to developers as "techno dorks" and the unless companies using a developer  who knew XHTML would most likely get it wrong. Yes, the guy got on my tits - I guess they have highly trained advertisers in that particular company creating mobile sites and definitely NO techno dorks lowering the tone.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;font style="font-weight: bold;"&gt;Possibly useful information.&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;    from Hubert Kjellberg, Head of Media ,Ericcson.&lt;ul&gt;&lt;li&gt;15 - 39 Demographic are leaving print media or not even bothering with it.&lt;/li&gt;&lt;li&gt;Consuming all media in the same way as the internet media.&lt;/li&gt;&lt;li&gt;Carriers are moving away from walled gardens - huzzah.&lt;/li&gt;&lt;li&gt;Figures for passive television consumption are dropping, still healthy, but dropping.&lt;/li&gt;&lt;li&gt;A group of 14 - 15 year olds were interviewed about media consumption and there preferences were.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;ul&gt;&lt;li&gt;internet&lt;/li&gt;&lt;li&gt;mobile&lt;/li&gt;&lt;li&gt;ipod&lt;/li&gt;&lt;li&gt;television&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;When developers of  mobile sites  need to be aware of local regulations, these can be through various bodies, broadcasting regulator, AIMIA, etc.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;    from someone at publicis digital&lt;br /&gt;&lt;ul&gt;&lt;li&gt;mobile phones are the 3rd screen,&lt;/li&gt;&lt;li&gt;19 million phones in AU, not bad for a population of just over 21 million,&lt;/li&gt;&lt;li&gt;4.5 million 3G phones, possible tipping point ?&lt;/li&gt;&lt;li&gt;Terms&lt;br /&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;on-deck  --&gt; teleco site/portal&lt;/li&gt;&lt;li&gt;off-deck  --&gt; content publishers&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;local knowledge is important in mobile advertising ( one would assume mobile content full stop ), as usage varies around the world. One wonders if this is culturally, development of mobiles services or possibly the type of devices available in the market.&lt;/li&gt;&lt;/ul&gt;    someone from communicator.com.au&lt;br /&gt;&lt;ul&gt;&lt;li&gt;click through for off deck is ~ 3 - 6 % for mobile advertising campaigns,&lt;/li&gt;&lt;li&gt;consumer perception that data is expensive, this is a barrier to adoption, consumers need to be educated,&lt;/li&gt;&lt;li&gt;data charges are falling,&lt;/li&gt;&lt;li&gt;age of users is moving up, 25 - 40s watching mobile videos,&lt;/li&gt;&lt;li&gt;real time behavioral targeting will be important&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;     some  at tiger spike&lt;br /&gt;&lt;ul&gt;&lt;li&gt;most traffic is on portal,&lt;/li&gt;&lt;li&gt;in the next 6 -12 months we will see more off portal traffic,&lt;/li&gt;&lt;li&gt;Need to follow the  1,2,3 rule :&lt;/li&gt;&lt;/ul&gt;&lt;ol&gt;&lt;ol&gt;&lt;li&gt;One point of entry,&lt;/li&gt;&lt;li&gt;No more than 2 seconds to load,&lt;/li&gt;&lt;li&gt;No more than 3 clicks to get anywhere - 30% lose per click, so not much point.&lt;/li&gt;&lt;/ol&gt;&lt;/ol&gt;&lt;ul&gt;&lt;li&gt;Mobile sites need to be live sites if they are going to be around for more than a month, so have content to put up, this will also get people interested in coming back, consider a news link, then people will know the site is alive,&lt;/li&gt;&lt;li&gt;watch for bots mimicking mobile devices, they can show false spikes in traffic,&lt;/li&gt;&lt;li&gt;things that companies are doing wrong at present :&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ol&gt;&lt;li&gt;Not considering company strategy,&lt;/li&gt;&lt;li&gt;being to clever, billboard that has a web site where you can download an app for your phone that will let you read a bar code,&lt;/li&gt;&lt;li&gt;copying web site to be a mobile site,&lt;/li&gt;&lt;li&gt;not getting the right advice.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;    someone from vodafone mobile advertising&lt;br /&gt;&lt;ul&gt;&lt;li&gt;a new group set up to provider agencies the ability to advertise on the vodafone LIve! portal, rather than just seeing vodafone adverts,&lt;/li&gt;&lt;li&gt;starting in AU, being pushed out worldwide,&lt;/li&gt;&lt;li&gt;vodafone talking with other carriers about cross carrier advertising and other possibilities - early days and cross carrier agreements move at ( pre global warming ) glacial speed.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;    someone from Sensis&lt;br /&gt;&lt;br /&gt;    Example of a mobile banner advert for KFC that linked through to a site that used carrier data to build a map showing you where the closest KFC was based on your location, also had a form so you could enter your mobile number and they would SMS you a voucher for a free or discounted burger.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12015401-7193553393844969934?l=blog.spiralarm.com%2Fjono' alt='' /&gt;&lt;/div&gt;</description><link>http://blog.spiralarm.com/jono/2007/09/aimia-launches-mobile-advertising.html</link><author>noreply@blogger.com (Jono)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-12015401.post-231073820585542299</guid><pubDate>Tue, 13 Mar 2007 06:37:00 +0000</pubDate><atom:updated>2007-10-11T20:32:30.204+10:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>OSX create user</category><title>Creating a user from the commandline on OS X</title><description>&lt;p&gt;The following will create a user USER_NAME in the group USER_NAME&lt;br /&gt;with a home directory /Users/USER_NAME, it assumes you have sudo&lt;br /&gt;access and are currently in /Users &lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;p style="margin-bottom: 0cm;"&gt;Find the next free uid by running the following &lt;/p&gt;&lt;ol&gt;&lt;p style="margin-bottom: 0cm;"&gt;&lt;code&gt;nireport . /users name uid&lt;/code&gt;&lt;/p&gt; &lt;/ol&gt; &lt;/li&gt;&lt;li&gt;&lt;p style="margin-bottom: 0cm;"&gt;create user, assuming a free uid of 505 from the previous step. &lt;/p&gt;&lt;ol&gt;&lt;p style="margin-bottom: 0cm;"&gt;&lt;em&gt;This should be a single line.&lt;/em&gt;&lt;br /&gt;  &lt;/p&gt;  &lt;p style="margin-bottom: 0cm;"&gt;&lt;code&gt;echo USER_NAME::505:505:USER_NAME build user:0:0:USER_NAME&lt;br /&gt;User:/Users/USER_NAME:/bin/bash | sudo niload -v passwd /&lt;/code&gt;&lt;br /&gt;&lt;/p&gt;  &lt;p style="margin-bottom: 0cm;"&gt;&lt;/p&gt; &lt;/ol&gt; &lt;/li&gt;&lt;li&gt;&lt;p style="margin-bottom: 0cm;"&gt;Set password &lt;/p&gt;&lt;ol&gt;&lt;p style="margin-bottom: 0cm;"&gt;&lt;code&gt;sudo passwd USER_NAME&lt;/code&gt;&lt;br /&gt;&lt;/p&gt; &lt;/ol&gt; &lt;/li&gt;&lt;li&gt;&lt;p style="margin-bottom: 0cm;"&gt;create group&lt;/p&gt;&lt;ol&gt;&lt;p style="margin-bottom: 0cm;"&gt; &lt;code&gt;echo 'USER_NAME:*:505: USER_NAME' | sudo niload -v group /&lt;/code&gt;&lt;/p&gt; &lt;/ol&gt; &lt;/li&gt;&lt;li&gt;&lt;p style="margin-bottom: 0cm;"&gt;create user directory &lt;/p&gt;&lt;ol&gt;&lt;p style="margin-bottom: 0cm;"&gt;&lt;code&gt;mkdir USER_NAME&lt;/code&gt;&lt;br /&gt;&lt;/p&gt; &lt;/ol&gt; &lt;/li&gt;&lt;li&gt;&lt;p style="margin-bottom: 0cm;"&gt;change ownership &lt;/p&gt;&lt;ol&gt;&lt;p style="margin-bottom: 0cm;"&gt;&lt;code&gt;sudo chown USER_NAME:USER_NAME USER_NAME&lt;/code&gt;&lt;br /&gt;&lt;/p&gt; &lt;/ol&gt; &lt;/li&gt;&lt;li&gt;&lt;p&gt;make sure you can login &lt;/p&gt;&lt;ol&gt;&lt;p&gt;&lt;code&gt;ssh USER_NAME@localhost&lt;/code&gt;&lt;br /&gt;&lt;/p&gt; &lt;/ol&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;As an aside here is how to delete a user via the command line.&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;p style="margin-bottom: 0cm;"&gt;check the user exists &lt;/p&gt;&lt;ol&gt;&lt;p style="margin-bottom: 0cm;"&gt;&lt;code&gt;dscl . read /users/USER_NAME&lt;/code&gt;&lt;br /&gt;  &lt;/p&gt; &lt;/ol&gt; &lt;/li&gt;&lt;li&gt;&lt;p style="margin-bottom: 0cm;"&gt;delete the users group &lt;/p&gt;&lt;ol&gt;&lt;p style="margin-bottom: 0cm;"&gt;&lt;code&gt;sudo dscl . delete /groups/USER_NAME&lt;/code&gt;&lt;br /&gt;&lt;/p&gt; &lt;/ol&gt; &lt;/li&gt;&lt;li&gt;&lt;p style="margin-bottom: 0cm;"&gt;delete the user &lt;/p&gt;&lt;ol&gt;&lt;p style="margin-bottom: 0cm;"&gt;&lt;code&gt;sudo dscl . delete /users/USER_NAME&lt;/code&gt;&lt;br /&gt;&lt;/p&gt; &lt;/ol&gt; &lt;/li&gt;&lt;li&gt;&lt;p&gt;delete user home directory &lt;/p&gt;&lt;ol&gt;&lt;p&gt;&lt;code&gt;sudo rm -rf USER_NAME&lt;/code&gt;&lt;br /&gt;&lt;/p&gt; &lt;/ol&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Taken from &lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;http://www.mcelhearn.com/article.php?story=2004110211244242&lt;br /&gt;&lt;/p&gt; &lt;/li&gt;&lt;li&gt;&lt;p&gt; &lt;a href="http://mikesalsbury.com/mambo/content/view/130/2/"&gt;http://mikesalsbury.com/mambo/content/view/130/2/&lt;/a&gt;&lt;/p&gt; &lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;a href="http://www.oreillynet.com/mac/blog/2006/04/deleting_mac_os_x_users_remote.html"&gt;http://www.oreillynet.com/mac/blog/2006/04/deleting_mac_os_x_users_remote.html&lt;/a&gt;&lt;/p&gt; &lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;a href="http://developer.apple.com/documentation/Darwin/Reference/ManPages/index.html"&gt;http://developer.apple.com/documentation/Darwin/Reference/ManPages/index.html&lt;/a&gt;&lt;/p&gt; &lt;/li&gt;&lt;li&gt;&lt;p&gt; http://docs.info.apple.com/article.html?artnum=60038&lt;br /&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12015401-231073820585542299?l=blog.spiralarm.com%2Fjono' alt='' /&gt;&lt;/div&gt;</description><link>http://blog.spiralarm.com/jono/2007/03/creating-user-from-commandline-on-os-x.html</link><author>noreply@blogger.com (Jono)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-12015401.post-116548829720001170</guid><pubDate>Thu, 07 Dec 2006 10:28:00 +0000</pubDate><atom:updated>2006-12-07T21:44:57.266+11:00</atom:updated><title>Switch</title><description>Not from Windows to Apple, from Apple to Apple - It has been two 1/4 years since I switched from windows / Linux. Now I've moved from my trusty 15" PowerBook G4 to a brand spanking new 17" MacBookPro, my god it is fast and the extra real estate is most welcome. &lt;br /&gt;&lt;br /&gt;My only complaint would be the hard disk speed /size options, Its either small and fast or big and slow - I went small and fast 7200 RPM but only a 100 GB, after moving data I only have 30 GB free and it is less than a month old ! &lt;br /&gt;&lt;br /&gt;I can see me making rather a lot of use of my external drive.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12015401-116548829720001170?l=blog.spiralarm.com%2Fjono' alt='' /&gt;&lt;/div&gt;</description><link>http://blog.spiralarm.com/jono/2006/12/switch.html</link><author>noreply@blogger.com (Jono)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-12015401.post-116505907246936324</guid><pubDate>Sat, 02 Dec 2006 11:24:00 +0000</pubDate><atom:updated>2006-12-02T22:31:12.476+11:00</atom:updated><title>Port redirecting</title><description>This is probably obvious to everyone but me, however I'll put it here in case there is another who finds it helpful.&lt;br /&gt;&lt;br /&gt;The following redirects requests from 80 to 8080, meaning you don't have to run your&lt;br /&gt;webapp as root or have annoying urls such as http://localhost:1234/myapp.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Jono@moose:xinetd.d $pwd&lt;br /&gt;/etc/xinetd.d&lt;br /&gt;Jono@moose:xinetd.d $cat redirect&lt;br /&gt;             service www&lt;br /&gt;             {&lt;br /&gt;                    socket_type         = stream&lt;br /&gt;                    wait                = no&lt;br /&gt;                    nice                = 10&lt;br /&gt;                    user                = root&lt;br /&gt;                    server              = /usr/bin/nc&lt;br /&gt;                    server_args         = -w 3 localhost 8080&lt;br /&gt;                    instances           = 40&lt;br /&gt;&lt;br /&gt;             }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12015401-116505907246936324?l=blog.spiralarm.com%2Fjono' alt='' /&gt;&lt;/div&gt;</description><link>http://blog.spiralarm.com/jono/2006/12/port-redirecting.html</link><author>noreply@blogger.com (Jono)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-12015401.post-112496523420366853</guid><pubDate>Thu, 25 Aug 2005 09:53:00 +0000</pubDate><atom:updated>2005-08-25T20:40:44.090+10:00</atom:updated><title>Code for the stupidest member of the team</title><description>While we would all like to work with the Fowlers and Blochs of the world, there are not enough of them to go around.  Which means either changing career, or be accepting that there are less talented people in your industry, and by a cruel twist of fate you may well work with one of &lt;a href="http://c2.com/cgi/wiki?UnskilledAndUnawareOfIt"&gt;them&lt;/a&gt;.&lt;br /&gt;  With this in mind, what should one do ? The first thing is to not instantly assume people will understand what is going on from your code. Some documentation, is a good, thing, even if it is within the code itself.&lt;br /&gt;   Better yet tests your fellow developers can run, unit and integration tests are ideal for this, they not only show that the code works - they show HOW it works.&lt;br /&gt;Secondly try not to use the most esoteric aspects of the language, they will only confuse and befuddle your coworkers, the most readable solution is the best and usually the simplest.&lt;br /&gt;This will always be relative, the stupidest member of a team writing control code for a plane or power station is most likely to be _less_ stupid that the brightest member of a website.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12015401-112496523420366853?l=blog.spiralarm.com%2Fjono' alt='' /&gt;&lt;/div&gt;</description><link>http://blog.spiralarm.com/jono/2005/08/code-for-stupidest-member-of-team_25.html</link><author>noreply@blogger.com (Jono)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item></channel></rss>