<?xml version="1.0" encoding="utf8"?>
<!-- name="generator" content="pyblosxom/1.4.3 01/10/2008" -->
<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN" "http://my.netscape.com/publish/formats/rss-0.91.dtd">

<rss version="0.91">
<channel>
<title>No Warranty Expressed Or Implied   </title>
<link>http://johnp.net/blog</link>
<description>Lisp, synthesisers, Web 3D &amp; stuff.</description>
<language>en</language>
<item>
  <title>New knobs for the LPD8</title>
  <link>http://johnp.net/blog/gear/new-knobs-for-lpd8.html</link>
  <description><![CDATA[

<a href="http://www.flickr.com/photos/51035753587@N01/sets/72157625956656032/"><img src="/images/photos/gear/lpd8-knobs.jpg" align="right" border="1" height="179" width="240"/></a>

<p>I didn't like the knobs on my Akai LPD8; they were too short &amp;
shiny. I wanted to use <a
href="http://www.flickr.com/photos/51035753587@N01/5389489501/">the
same knobs that I put on my Polymorph</a>, but (a) the LPD8 pot shafts
were too short, and (b) the knobs were meant for knurled shafts and
the LPD8 pots had "D" shafts.</p>

<p>Fortunately I was able to make some "adapters" by gluing some thick
"cigar" matches together, cutting them down and then gluing them to
the pot shafts with UHU glue. I added a bit of heatshrink to help hold
them on.</p>

<p>The knobs fit over the end of the glued matchsticks, and it all worked
quite well. As long as I don't clout the knobs too hard...</p>

]]></description>
</item>

<item>
  <title>...and we&apos;re back.</title>
  <link>http://johnp.net/blog/random/still-alive-4.html</link>
  <description><![CDATA[

<a
href="http://www.flickr.com/photos/51035753587@N01/5390381422/"><img
src="/images/photos/sunshine-thru-rain.jpg" width="240" height="179"
border="1" align="right"/></a>

<a
href="http://www.flickr.com/photos/51035753587@N01/5389489501/"><img
src="/images/photos/gear/polymorph-new-knobs.jpg" width="240" height="179"
border="1" align="right"/></a>

<p>Well, 2010 has been and gone, but we're still here, tired but
happy. Hopefully 2011 won't be quite so relentless, particularly once
I've finally wrapped up the TRaCS 3 project (soon!).</p>

<p>This year I'll finally be exploring my synth collection and making
some music (and this time I really mean it). I'll also be cataloguing
it all on this site.</p>

<p>So what has happened in the last fifteen months?</p>

<ul>
<li>We went on a lovely family holiday to France and EuroDisney.</li>
<li>I went back to NZ for 16 weeks to try and finish the Railways project
(I failed).</li>
<li>I have moved my "office" out of the small wooden shed into a nice new
"log cabin", still at the bottom of the garden. It's lovely. Thanks,
Bernard!</li>
<li>Theo has started pre-school. And the changing of that final pooey
nappy is inching ever closer...</li>
</ul>

]]></description>
</item>

<item>
  <title>Blog site setup</title>
  <link>http://johnp.net/blog/sites/blog-site-setup.html</link>
  <description><![CDATA[

<p><a href="http://nginx.net/">Nginx</a> setup (in
<code>/etc/nginx/sites-available/blog.johnp.net</code>):</p>

<pre>server {
    listen      80;
    server_name blog.johnp.net;
    access_log  /home/www/blog.johnp.net/log/access.log;
    error_log   /home/www/blog.johnp.net/log/error.log;

    <span class="comment"># Common include &amp; image files.</span>
    location ^~ /i/ {
        alias   /home/www/i/;
    }
    location ^~ /images/ {
        alias   /home/www/images/;
    }
    <span class="comment"># There are only two non-blog URIs to worry about.</span>
    location = /favicon.ico {
        alias   /home/www/blog.johnp.net/htdocs/favicon.ico;
    }
    location = /robots.txt {
        alias   /home/www/blog.johnp.net/htdocs/robots.txt;
    }
    <span class="comment"># Pass all other URLs to PyBlosxom running under Paste.</span>
    location ~ / {
        fastcgi_pass    localhost:4999;
        fastcgi_param   PATH_INFO $request_uri;
        include         fastcgi_params;
    }
}</pre>

<p>My little server is running <a
href="http://ubuntu.com/">Ubuntu</a>, which has
<code>/etc/nginx/fastcgi_params</code> for all the "standard" CGI
variables. But <a
href="http://pyblosxom.sourceforge.net/">PyBlosxom</a> wanted
<code>PATH_INFO</code> as well.</p>

<p><a href="http://pythonpaste.org/">Python Paste</a> setup (in <code>/home/john/blog/etc/blog.ini</code>):</p>

<pre><span class="comment">#!/usr/bin/env paster</span>
[default]
debug = false

[exe]
command = serve
daemon = true
reload = true
reload-interval = 120
monitor-restart = true
pid-file = /home/john/blog/etc/paster.pid
log-file = /home/john/blog/log/paster.log

[server:main]
use = egg:Flup#fcgi_thread
host = 127.0.0.1
port = 4999

[app:main]
paste.app_factory = Pyblosxom.pyblosxom:pyblosxom_app_factory
configpydir = /etc/pyblosxom</pre>

<p>Unfortunately the "executable shell script" stuff mentioned in the
<a href="http://pythonpaste.org/script/">docs</a> doesn't work too
well for me (which it does warn you about), so I've wrapped the
<code>paste serve</code> invocation into a short script:</p>

<pre><span class="comment">#!/bin/bash
# serve-blog.sh - Run Python Paste to serve my PyBlosxom blog.
# File Created: 14 October 2009
# Author: John Pallister (mailto:john@synchromesh.com)</span>

CONFIG_FILE=/home/john/blog/etc/blog.ini

/usr/bin/paster serve --daemon \
    --reload \
    --reload-interval=120 \
    --monitor-restart \
    --pid-file=/home/john/blog/etc/paster.pid \
    --log-file=/home/john/blog/log/paster.log \
    $CONFIG_FILE \
    $*

<span class="comment"># End of serve-blog.sh</span></pre>

<p>I have added this script to my <code>rc.local</code> to run at boot time.</p>

<p>Relevant bits of my PyBlosxom setup (in <code>/etc/pyblosxom/config.py</code>):</p>

<pre><span class="comment"># 2 Oct 09 JDP Note: I have modified /usr/share/python-support/pyblosxom/Pyblosxom/pyblosxom.py
# to read '.blog' files instead of '.txt' files.
#
# Unused variables:
#   renderer
#   default_flavour
#</span></pre>
<i>[snip]</i>
<pre>py["datadir"] = "/home/john/blog/entries"

py["logdir"] = "/home/john/blog/log" <span class="comment"># This doesn't seem to be used...</span>
py["log_file"] = "/home/john/blog/log/pyblosxom.log"

py["log_level"] = "warning"
<span class="comment"># The next two lines were good when debugging my archives plugin.
#py["log_level"] = "debug"
#py["renderer"] = "debug"</span>

py["base_url"] = "http://blog.johnp.net"

py["flavourdir"] = "/home/john/blog/flavours"

py["plugin_dirs"] = ["/etc/pyblosxom/plugins", "/home/john/blog/plugins"]
py["load_plugins"] = ["disqus", "myarchives"]

py["cacheDriver"] = "entrypickle"
py["cacheConfig"] = "/var/run/pyblosxom-cache"
</pre>

<p>This is not the complete setup, but it has the interesting stuff. I
copied the default HTML flavour files (<code>content_type.html</code>,
<code>date_head.html</code>, <code>foot.html</code>,
<code>head.html</code>, and <code>story.html</code>) into
<code>/home/john/blog/flavours/html.flav/</code> for tweaking.</p>

<p>Hopefully someone will find this useful.</p>
]]></description>
</item>

<item>
  <title>Blog ideas</title>
  <link>http://johnp.net/blog/ideas/blog-ideas.html</link>
  <description><![CDATA[

<a href="http://www.warrenellis.com/?p=7837"><img
src="/images/misc/light-painter.jpg"
width="215" height="143" border="1" align="right"/></a>
<p>Emboldened by my success in writing an archives plugin, I'd now
like to do one for my blog categories and another to suck down my
recent <a href="http://delicious.com/synchromesh">Delicious link
posts</a>.</p>

<p>I'd also like to re-do the layout so it doesn't look so
primitive. I was reading a post on <a
href="http://gigamonkeys.com/blog/">Peter Seibel's blog</a> the other
day, and his layout &amp; HTML source looked pretty good, so I might
do something based on that.</p>

<p>But none of these things are particularly urgent, so I think I'll
move on to trying to get <a
href="http://common-lisp.net/project/armedbear/">ABCL</a> running on
the <a href="http://code.google.com/appengine/">Google App Engine</a>
(after having spent a fair bit of time getting <a
href="http://jdee.sourceforge.net/">JDEE</a> and its dependencies set
up in Emacs). But I do intend to do a post on my Nginx/Paste/PyBlosxom
setup.</p>

<p>And now, having finished this post, it's time to go to bed.</p>

]]></description>
</item>

<item>
  <title>First post 2009: PyBlosxom is go!</title>
  <link>http://johnp.net/blog/bits/first-post-2009.html</link>
  <description><![CDATA[

<a href="/images/photos/theo-standing-638x1284.jpg"
   ><img src="/images/photos/theo-standing-headshot-152x128.jpg"
   width="152" height="128" border="1" alt="Theo!" align="right"/></a>
<p>Well, I've finally got around to moving this blog to <a
href="http://pyblosxom.sourceforge.net">PyBlosxom</a>. I've written my
own plugin to generate the archives at the top of the page; I'm also
now running on <a href="http://nginx.net">Nginx</a> as a web server,
which talks to <a href="http://pythonpaste.org">Python Paste</a> via
FastCGI. So the blog is now dynamically generated. The next thing is
to try and integrate the <a href="http://disqus.com">Disqus<a/>
comments <a
href="http://hg.cavorite.com/labs-sandbox/file/tip/pyblosxom-disqus/disqus.py">plugin</a>.</p>

<p>The other thing I need to do is move the rest of my <a
href="http://johnp.net">personal site(s)</a> to this server.</p>

<p>I have lots of things I'd like to blog about; it's great to finally
have this sorted out.</p>

<p>And yes, it's been another very busy year. Since my last post my
third child was born (Hi Theo!), my oldest has started school (Hi
Bethany!) and we've moved half-way around the world for a while... so
stay tuned for more news (OK, maybe "news" is the wrong word).</p>
]]></description>
</item>

<item>
  <title>Exporting H.264 video to a Nokia 6234 as MPEG-4 via QuickTime Pro</title>
  <link>http://johnp.net/blog/apple/qt-export-to-6234.html</link>
  <description><![CDATA[

<p>Via <a href="http://substation.co.nz/blog/?p=483">Tim Prebble's
blog</a>, some nice video podcasts by <a
href="http://www.christopherwillits.com/">Christopher Willits</a> from
<a href="http://xlr8r.com/tv">XLR8R TV</a>. The story so far:</p>

<ol>
  <li><a href="http://xlr8r.com/tv/42">Part 1 (Ep. 42)</a>, the
  basics. </li>
  <li><a href="http://xlr8r.com/tv/46">Part 2 (Ep. 46)</a>, using
  Ableton Live.</li>
  <li><a href="http://xlr8r.com/tv/52">Part 3 (Ep. 52)</a>, a MIDI
  pickup and a GR-20.</li>
  <li><a href="http://xlr8r.com/tv/74">Part 4 (Ep. 74)</a>, recording
  at <a href="http://snowghostmusic.com/">SnowGhost</a>.</li>
  <li><a href="http://xlr8r.com/tv/82">Part 5 (Ep. 82)</a>, automation
  clips.</li>
</ol>

<p>You can download nice 640-by-360 H.264-encoded QuickTime movies of
each episode (approx. 100MB per video), and I thought it'd be nice to
watch them on my <a
href="http://www.forum.nokia.com/devices/6234">Nokia 6234</a>
phone. (These seem to be very popular here in New Zealand; at least,
after I bought mine the next four people I met with a 3G phone also
had a 6234.)<p>

<p>After reading <a
href="http://www.forum.nokia.com/info/sw.nokia.com/id/b0c449c1-8e67-4c60-bd50-18a2b4f1e09b/Creating_Mobile_Videos.html">a
useful Nokia article on creating mobile videos</a>, I fired up <a
href="http://www.apple.com/quicktime/">QuickTime 7 Pro</a> and started
exporting the movies with different settings. This is what I came up
with for the best results (and about 28MB per video):</p>

<div style="text-align: center">
<img src="/images/misc/qt-export-video.png" width="576" height="569" border="0"/><br/>
Video export settings.
</div>
<p/>
<div style="text-align: center">
<img src="/images/misc/qt-export-audio.png" width="576" height="569" border="0"/><br/>
Audio export settings.
</div>

<p>The nice thing about doing this myself is that I could keep the
audio bandwidth high (so it sounded pleasant) while scrunching the
video (so the phone could play it cleanly). The audio bitstream
accounts for half the file size.</p>

<p>I would love to have time to actually try this stuff myself. I have
a GK-2a pickup and an old GM-70 I picked up on Trade Me; one day I'll
manage to get it all set up and have a play. (Perhaps by then I'll
have a <a
href="http://www.soundonsound.com/sos/dec06/articles/guitartech_1206.htm">Graphtech
Ghost</a> setup and an <a
href="http://www.soundonsound.com/sos/may06/articles/terratecaxon.htm">Axon
AX100</a> instead.)</p>

]]></description>
</item>

<item>
  <title>tracs-wiki.el and TRAMP</title>
  <link>http://johnp.net/blog/emacs/tracs-wiki-and-tramp.html</link>
  <description><![CDATA[

<p>
  I have managed to get <a
  href="http://www.meadowy.org/~gotoh/trac-wiki/trac-wiki.el">trac-wiki.el</a>
  and <a href="http://savannah.gnu.org/projects/tramp">TRAMP</a> set
  up under Emacs 23.0 on Windows. This means that I can now edit <a
  href="http://trac.edgewall.com/">Trac</a> wiki pages via XML-RPC and
  edit these blog posts via SSH. Sweet!
</p>

<p>References:</p>

<ul>
  <li>
    <a href="http://www.meadowy.org/~gotoh/trac-wiki/trac-wiki.el">trac-wiki.el</a>
    by Shun-ichi Goto.
  </li>
  <li>
    <a href="http://cvs.savannah.gnu.org/viewvc/emacsweblogs/weblogger/lisp/xml-rpc.el">xml-rpc.el</a>
  </li>
  <li>
    The <a href="http://trac-hacks.org/wiki/XmlRpcPlugin">Trac XML-RPC Plugin</a>
  </li>
</ul>

<p><code>.emacs</code> configuration:</p>

<pre>
(add-to-list 'load-path "D:/src/other-lisp/emacs-lisp")
(require 'trac-wiki)

(trac-wiki-define-project "tracs3" "http://tracs3.synchromesh.com/trac/" t)

(let ((auth (base64-encode-string (format "%s:%s" "&lt;my username&gt;" "&lt;my password&gt;"))))
  (set (symbol-value 'url-basic-auth-storage)
       `(("tracs3.synchromesh.com:80" ("Restricted Access" . ,auth)))))

(autoload 'trac-wiki "trac-wiki" "Trac wiki editing entry-point." t)
</pre>

<p>My <code>.emacs</code> configuration for TRAMP is:</p>

<pre>
(require 'tramp)

(setq tramp-default-method "pscp"
      tramp-default-host   "synchromesh.com")

(add-to-list 'tramp-default-user-alist
	     '("pscp" ".*\\.synchromesh\\.com\\'" "&lt;my username&gt;"))
</pre>

<p>
  Hopefully this means I'll update both the TRaCS 3 wiki and this blog
  a bit more frequently...
</p>
]]></description>
</item>

<item>
  <title>Ngake site(s) design page started</title>
  <link>http://johnp.net/blog/ngake/sites-design-page-started.html</link>
  <description><![CDATA[

<p>I've started <a href="http://johnp.net/projects/sites/">some notes on
the future of Ngake</a>. The idea is that I develop Ngake as a site all
about Ngake sites. Simple, really.</p>

]]></description>
</item>

<item>
  <title>Surecom EP-816VX 16-port 10/100 switch</title>
  <link>http://johnp.net/blog/random/surecom-ep816vx.html</link>
  <description><![CDATA[

If anyone else has one of these orphaned devices and is wondering what
sort of power adapter it uses, may Google provide my answer: 12V DC, tip
positive. Amen.

]]></description>
</item>

<item>
  <title>mod_lisp refresh for Win32 Apache 2.2.8</title>
  <link>http://johnp.net/blog/lisp/modlisp-refresh.html</link>
  <description><![CDATA[

<a href="http://www.flickr.com/photos/51035753587@N01/2532025507/"
title="Walking on air by synchromesh, on Flickr"><img
src="http://farm3.static.flickr.com/2419/2532025507_6094147cf1_m.jpg"
width="240" height="180" alt="Walking on air" border="1" align="right"
/></a>

<p>I have recompiled <a
href="http://www.fractalconcept.com:8000/public/open-source/mod_lisp/mod_lisp2.c">mod_lisp2.c</a>
against <a href="http://httpd.apache.org/">Apache 2.2.8 for Windows</a>
using <a href="http://www.microsoft.com/express/vc/">Visual C++ Express
2008</a>. <a
href="http://www.fractalconcept.com/asp/mod_lisp">mod_lisp</a> itself
only needs the include files and libraries that are an optional part of
the Apache <a href="http://httpd.apache.org/download.cgi">binary
installation</a>, but I downloaded the <a
href="http://httpd.apache.org/docs/2.2/platform/win_compiling.html">Apache
source</a> (that includes Visual Studio 6 project files) so that I could
check the compiler and linker settings.</p>

<p>My slightly modified mod_lisp2.c, the Visual C++ 9 project file and
the Release build of the module are available in <a
href="http://johnp.net/misc/modlisp/modlisp-for-apache-2.2.8-win32.zip">a .zip
file</a>. Please note the title of this blog when considering whether to
use any of it.</p>

<p>The diff looks like this:</p>

<pre>
*** ../../download/programming/Other Lisp stuff/mod_lisp2 - svn.c Tue Apr  8 23:33:07 2008
--- mod_lisp2.c Mon Jun  2 18:15:31 2008
***************
*** 443,451 ****
  {
    char crlf[2] =  {0xd, 0xa};
    char length[16];
!   snprintf(length, 16, "%x", n_bytes);
    
!   apr_status_t status = write_lisp_data (socket, length, strlen(length));
    if ( status == APR_SUCCESS)
      {
        status = write_lisp_data (socket, crlf, 2);
--- 443,453 ----
  {
    char crlf[2] =  {0xd, 0xa};
    char length[16];
!   apr_status_t status;
! 
!   apr_snprintf(length, 16, "%x", n_bytes);    // 2 Jun 08 JDP
    
!   status = write_lisp_data (socket, length, strlen(length));
    if ( status == APR_SUCCESS)
      {
        status = write_lisp_data (socket, crlf, 2);
</pre>

]]></description>
</item>

</channel>
</rss>

