<?xml version="1.0" encoding="utf-8" ?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns="http://purl.org/rss/1.0/">




    



<channel rdf:about="http://www.koansys.com/news/aggregator/RSS">
  <title>News</title>
  <link>http://www.koansys.com</link>

  <description>
    
      Site News
    
  </description>

  

  
            <syn:updatePeriod>daily</syn:updatePeriod>
            <syn:updateFrequency>1</syn:updateFrequency>
            <syn:updateBase>2008-08-05T00:46:18Z</syn:updateBase>
        

  <image rdf:resource="http://www.koansys.com/logo.png"/>

  <items>
    <rdf:Seq>
      
        <rdf:li rdf:resource="http://www.koansys.com/tech/use-openconnect-vpn-on-os-x-instead-of-cisco-anyconnect"/>
      
      
        <rdf:li rdf:resource="http://www.koansys.com/tech/host-plone-site-a-level-down-with-apache-and-virtualhostmonster"/>
      
      
        <rdf:li rdf:resource="http://www.koansys.com/tech/ubuntu-11.04-on-dell-t-105-with-raid-video-and-grub-problems"/>
      
      
        <rdf:li rdf:resource="http://www.koansys.com/tech/crashplan-on-headless-server"/>
      
      
        <rdf:li rdf:resource="http://www.koansys.com/tech/build-mongodb-on-freebsd-for-jenkins-use"/>
      
      
        <rdf:li rdf:resource="http://www.koansys.com/tech/android-timetracker-data-extraction"/>
      
      
        <rdf:li rdf:resource="http://www.koansys.com/news/koansys-presents-jenkins-ci-at-agiledc"/>
      
      
        <rdf:li rdf:resource="http://www.koansys.com/tech/restore-disk-from-crashplan-on-os-x"/>
      
      
        <rdf:li rdf:resource="http://www.koansys.com/tech/compile-python-2.7-on-freebsd"/>
      
      
        <rdf:li rdf:resource="http://www.koansys.com/news/koansys-on-pycon-2011-panel-on-how-to-sell-python"/>
      
      
        <rdf:li rdf:resource="http://www.koansys.com/tech/emacs-hangs-on-flymake-under-os-x"/>
      
      
        <rdf:li rdf:resource="http://www.koansys.com/tech/tal-order-of-execution"/>
      
      
        <rdf:li rdf:resource="http://www.koansys.com/tech/plone-on-slicehost"/>
      
      
        <rdf:li rdf:resource="http://www.koansys.com/news/run-apache-in-the-forground-on-ubuntu"/>
      
      
        <rdf:li rdf:resource="http://www.koansys.com/tech/building-python-2.7-on-freebsd"/>
      
    </rdf:Seq>
  </items>

</channel>


  <item rdf:about="http://www.koansys.com/tech/use-openconnect-vpn-on-os-x-instead-of-cisco-anyconnect">
    <title>Use openconnect VPN on OS X instead of Cisco AnyConnect </title>
    <link>http://www.koansys.com/tech/use-openconnect-vpn-on-os-x-instead-of-cisco-anyconnect</link>
    <description>AnyConnect requires registration and a support contract, but we can use open source software instead.</description>
    <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[
<p>Cisco AnyConnect on my OS X box was broken, complaining about not finding FIPS modules in a dynamic library upon start-up.&nbsp; I figured maybe my version didn't work on Lion which I upgraded to a few months back.&nbsp; Can't be that hard, download a new version.&nbsp;&nbsp;</p>
<p>You have to register... which is a fragile process and broke on me three times, after providing enough web form details to make an IRS Auditor happy.&nbsp; After finally confirming the registration, it told me I had to have a support contract to download.&nbsp; Awesome.</p>
<p>I used a colleague's account to connect via web to the HTTPS gateway, where I figured I could download a new copy.&nbsp; Spin, spin, spin, Java NullPointerException.&nbsp; Managed somehow to extract a "vpnsetup.sh" which contained some juicy binary blobs inside, and failed the first couple times I tried it. Eventually tried it with sudo (what's the worst it could do, really??)-:&nbsp; and got it to install.&nbsp; And seemed to work.&nbsp; For now.</p>
<p>But what a pain. Wasn't there an alternative?&nbsp;</p>
<p>I could no longer connect with Apple's built-in VPN client to the datacenter's VPN concentrator -- progress, right?&nbsp; I guess IPsec is only IPsec if it's not Cisco IPsec.&nbsp; In the past I had used "vpnc" on my FreeBSD and Linux boxes to connect but that wasn't working either.</p>
<p>I found "<a class="external-link" href="http://www.infradead.org/openconnect/download.html">openconnect</a>" and did an install (with a flag):</p>
<pre>./configure --disable-nls
make
sudo make install</pre>
<p>When I ran it, it complained about missing "tun" device so install the <a class="external-link" href="http://tuntaposx.sourceforge.net/download.xhtml">TunTap</a> package.</p>
<p>Then fire it up and ... It's Work!!!</p>
<pre>sudo /usr/local/sbin/openconnect -v --script /etc/vpnc/vpnc-script https://vpn.gateway.ip</pre>
<p>I used my old vpnc script which set the DNS and routes, otherwise I couldn't get packets to flow over the VPN.</p>
<p>Oddly, it didn't require the VPN Group name that AnyConnect seemed to want.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
    <dc:publisher>No publisher</dc:publisher>
    <dc:creator>Chris Shenton</dc:creator>
    <dc:rights></dc:rights>
    
      <dc:subject>osx</dc:subject>
    
    
      <dc:subject>security</dc:subject>
    
    
      <dc:subject>vpn</dc:subject>
    
    
      <dc:subject>networking</dc:subject>
    
    <dc:date>2011-11-17T17:25:00Z</dc:date>
    <dc:type>News Item</dc:type>
  </item>


  <item rdf:about="http://www.koansys.com/tech/host-plone-site-a-level-down-with-apache-and-virtualhostmonster">
    <title>Host Plone site a level down with Apache and VirtualHostMonster</title>
    <link>http://www.koansys.com/tech/host-plone-site-a-level-down-with-apache-and-virtualhostmonster</link>
    <description>We had to use some _vh_* magic to get rewrites to work properly.</description>
    <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[
<p>We have our Plone site running on localhost port 8888, then had Apache fronting it and used mod_rewrite and VirtualHostMonster so that it appeared at the top level "/" URL.</p>
<pre>RewriteRule ^/(.*) \
http://localhost:8888/VirtualHostBase/http/%{SERVER_NAME}:80/cjp/VirtualHostRoot/$1 [L,P] &nbsp;</pre>
<p>&nbsp;</p>
<p>We later needed to move it down a level of the URL hierarchy as we had a Django app residing on the same server. &nbsp;In this example, we want it accessed under the "/plone" hierarchy. <a class="external-link" href="http://plone.org/documentation/kb/plone-apache/vhm">Christian 'Tiran' Heims document on the VHM</a> gave me the magic I needed. While it's easy to have Apache match on the "/plone" URL and get to plone, we needed a _vh_* portion in the path to make rewriting the references work in the Plone-served pages.</p>
<p>The first works for "/plone/..." URLs and the second allows folks to come in with a simple "/plone" path.</p>
<pre>RewriteRule ^/plone/(.*) \
http://localhost:8888/VirtualHostBase/http/%{SERVER_NAME}:80/cjp/VirtualHostRoot/_vh_plone/$1 [L,P] &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
RewriteRule ^/plone$ \
http://localhost:8888/VirtualHostBase/http/%{SERVER_NAME}:80/cjp/VirtualHostRoot/_vh_plone/ [L,P]&nbsp;</pre>
<p>&nbsp;</p>
]]></content:encoded>
    <dc:publisher>No publisher</dc:publisher>
    <dc:creator>Chris Shenton</dc:creator>
    <dc:rights></dc:rights>
    
      <dc:subject>apache</dc:subject>
    
    
      <dc:subject>plone</dc:subject>
    
    <dc:date>2011-10-28T14:56:59Z</dc:date>
    <dc:type>News Item</dc:type>
  </item>


  <item rdf:about="http://www.koansys.com/tech/ubuntu-11.04-on-dell-t-105-with-raid-video-and-grub-problems">
    <title>Ubuntu-11.04 on Dell T-105 with RAID: video and grub problems</title>
    <link>http://www.koansys.com/tech/ubuntu-11.04-on-dell-t-105-with-raid-video-and-grub-problems</link>
    <description>At install time, the video blanked. After RAID setup, Grub didn't install. </description>
    <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>I've got an older Dell T105 with AMD64 Opteron that I installed 2  2TB drives into. It's running BIOS 1.0.1.</p>
<div class="section" id="installing-ubuntu-11-04-server-from-cd">
<h3>Installing Ubuntu-11.04-Server from CD</h3>
<div class="section" id="blank-screen-of-death">
<h4>Blank Screen Of Death</h4>
<p>Trying to install from CD Ubuntu-11.04 Server, Desktop, i386 or amd64
all result in an apparent hang using English or Spanish, just at the point when it is going to run through the installer.  In another
attempt we were able to install 10.04 from CD then went through a
2-step upgrade. Something's changed in the installer between 10.04 and 11.04.</p>
<p>After pounding on keys at the blank 11.04 screen it seemed the
installer was running but video was blank.</p>
<p>Reboot from CD and before it starts the boot loader, hold the SHIFT
key. At the prompt turn off visual problems:</p>
<pre class="literal-block">
boot: install vga=normal
</pre>
<p>Then follow the text install menus.</p>
</div>
<div class="section" id="create-raid">
<h4>Create RAID</h4>
<p>Follow the nontrivial instructions for a RAID1 with a 20GB swap on the
first partition and / on the second partition taking up the rest of the drive.</p>
<p><a class="reference external" href="https://help.ubuntu.com/11.04/serverguide/C/advanced-installation.html">https://help.ubuntu.com/11.04/serverguide/C/advanced-installation.html</a></p>
</div>
<div class="section" id="install-os">
<h4>Install OS</h4>
<p>Install the OS as usual.</p>
</div>
<div class="section" id="installation-of-grub-failed">
<h4>Installation of Grub failed</h4>
<p>When it came time to install grub, it failed: the command it ran:</p>
<pre class="literal-block">
grub-install /dev/sda
</pre>
<p>complained it could not but then spewed something about being required for RAID.</p>
<p>After it blindly went to reboot from disk, it hung with a cursor
prompt because there was no Grub.</p>
</div>
</div>
<div class="section" id="fix-partitions-and-install-grub">
<h3>Fix Partitions and Install GRUB</h3>
<p>Reboot from Installation CD and enter rescue mode, and tell it to give
you a shell on the /dev/md1 partition.  If you try and do a
&quot;grub-install&quot; it will complain at you, saying it's a bad idea.</p>
<p>Tweak the disks so you can then install grub on them:</p>
<pre class="literal-block">
# parted sda
toggle 1 boot_grub
q

# parted sdb
toggle 1 boot_grub

# grub-install sda
# grub-install sdb
</pre>
<p>Now you should have grub on the raw disks.</p>
<div class="section" id="boot-in-grub">
<h4>Boot in Grub</h4>
<p>Now when I reboot I get a &quot;grub&gt;&quot; prompt that goes nowwhere. This doc helped:</p>
<blockquote>
<a class="reference external" href="https://help.ubuntu.com/community/Grub2">https://help.ubuntu.com/community/Grub2</a></blockquote>
<p>Manually boot:</p>
<pre class="literal-block">
set root=(md/1)
linux /vmlinuz root=/dev/md1 ro
initrd /initrd.img
boot
</pre>
</div>
<div class="section" id="fix-grub">
<h4>Fix Grub</h4>
<p>When booted and logged in:</p>
<pre class="literal-block">
sudo updage-grub
sudo grub-install /dev/sda
sudo grub-install /dev/sdb
</pre>
<p>This creates a /boot/grub/grub.cfg file that allows the OS to boot
directly next time.</p>
</div>
</div>
<div class="section" id="reboot-and-enjoy">
<h3>Reboot and Enjoy</h3>
<p>Finally I get a login prompt I can use.</p>
</div>
]]></content:encoded>
    <dc:publisher>No publisher</dc:publisher>
    <dc:creator>Chris Shenton</dc:creator>
    <dc:rights></dc:rights>
    
      <dc:subject>ubuntu</dc:subject>
    
    <dc:date>2011-09-04T14:04:43Z</dc:date>
    <dc:type>News Item</dc:type>
  </item>


  <item rdf:about="http://www.koansys.com/tech/crashplan-on-headless-server">
    <title>CrashPlan on Headless Server</title>
    <link>http://www.koansys.com/tech/crashplan-on-headless-server</link>
    <description>Use client on MacOS over ssh tunnel to headless server.</description>
    <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>We use CrashPlan on our laptops and pay for CrashPlan's online service. We like the unlimited data, simplicity, and web-access to files; it's a good value.</p>
<p>We've been starting to put CrashPlan on our servers, but they're headless -- so how do we configure them through the GUI client?</p>
<p>Crashplan has a <a class="external-link" href="http://support.crashplan.com/doku.php/how_to/configure_a_headless_client">page that describes this unsupported feature</a>, but path for the client settings on a Mac are different. On the OS X box, open&nbsp;</p>
<pre>/Applications/CrashPlan.app/Contents/Resources/Java/conf/ui.properties</pre>
<p>Change the line to read:</p>
<pre>servicePort=4200</pre>
<p>Setup an SSH tunnel to the headless server:</p>
<pre>ssh -L 4200:localhost:4243 yourusername@headlessbox</pre>

<p>On the Mac, fire up the CrashPlan GUI client; it will use the new setting to connect to port 4200, which is forwarded to the headlessbox on port 4243 where the CrashPlan service listens. You should be able to configure your headlessbox, providing account information, backup file selection, network throttling, etc.</p>
<p>The only negative is that you'll have to edit that file back to control your local desktop CrashPlan service, and change it again to connect to the headless server.&nbsp;</p>
]]></content:encoded>
    <dc:publisher>No publisher</dc:publisher>
    <dc:creator>Chris Shenton</dc:creator>
    <dc:rights></dc:rights>
    
      <dc:subject>os x</dc:subject>
    
    
      <dc:subject>backup</dc:subject>
    
    <dc:date>2011-09-04T13:45:56Z</dc:date>
    <dc:type>News Item</dc:type>
  </item>


  <item rdf:about="http://www.koansys.com/tech/build-mongodb-on-freebsd-for-jenkins-use">
    <title>Build MongoDB on FreeBSD -- for Jenkins use</title>
    <link>http://www.koansys.com/tech/build-mongodb-on-freebsd-for-jenkins-use</link>
    <description>We use Jenkins to automate build and test; many of our projects use MongoDB, so we need a download tarball for it as 10gen doesn't offer a pre-built image.</description>
    <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[
<p>The 10gen folks behind MongoDB don't provide a prebuilt image of MongoDB and its binaries for FreeBSD, so we build our own. We then put up the tarball somewhere that our Jenkins build/test system can find it.&nbsp;</p>
<p>We only need the binaries under bin/, e.g.:</p>
<pre>$ tar ztf mongodb-freebsd7-x86_64-1.8.1.tgz 
mongodb-freebsd7-x86_64-1.8.1/
mongodb-freebsd7-x86_64-1.8.1/bin/
mongodb-freebsd7-x86_64-1.8.1/bin/mongofiles
mongodb-freebsd7-x86_64-1.8.1/bin/mongod
mongodb-freebsd7-x86_64-1.8.1/bin/mongodump
mongodb-freebsd7-x86_64-1.8.1/bin/mongorestore
mongodb-freebsd7-x86_64-1.8.1/bin/mongos
mongodb-freebsd7-x86_64-1.8.1/bin/mongo
mongodb-freebsd7-x86_64-1.8.1/bin/mongostat
mongodb-freebsd7-x86_64-1.8.1/bin/mongosniff
mongodb-freebsd7-x86_64-1.8.1/bin/mongoexport
mongodb-freebsd7-x86_64-1.8.1/bin/bsondump
mongodb-freebsd7-x86_64-1.8.1/bin/mongoimport</pre>
<p>FreeBSD ports maintainers keep pretty current so we build from there:</p>
<pre>cd /usr/ports/databases/mongodb
sudo make
sudo make installmkdir -p /tmp/mongodb-freebsd8_64_1.8.2/bin
cp /usr/local/bin/mongo* /usr/local/bin/bsondump /tmp/mongodb-freebsd8_64_1.8.2/bin/tar cf /usr/local/www/apache22/data/koansys.com/static/mongodb-freebsd8-x86_64-1.8.2.tgz mongodb-freebsd8_64_1.8.2</pre>
<p><span class="Apple-style-span">Now you should be able to use it in your own buildouts.</span></p>
<p>Here's the <a class="external-link" href="../static/mongodb-freebsd8-x86_64-1.8.2.tgz">MongoDB-1.8.2 I just built for FreeBSD-8 64bit</a>.</p>
]]></content:encoded>
    <dc:publisher>No publisher</dc:publisher>
    <dc:creator>Chris Shenton</dc:creator>
    <dc:rights></dc:rights>
    
      <dc:subject>jenkins</dc:subject>
    
    
      <dc:subject>freebsd</dc:subject>
    
    
      <dc:subject>mongodb</dc:subject>
    
    <dc:date>2011-08-19T21:45:00Z</dc:date>
    <dc:type>News Item</dc:type>
  </item>


  <item rdf:about="http://www.koansys.com/tech/android-timetracker-data-extraction">
    <title>Android TimeTracker data extraction</title>
    <link>http://www.koansys.com/tech/android-timetracker-data-extraction</link>
    <description>How to generate a report from the database managed by TimeTracker for Android by ABS</description>
    <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[
<p>I use the excellent <a class="external-link" href="http://www.abs-net.de/timetracker/timetracker.html">TimeTracker by ABS</a> to track my client work on my Android phone. I recently managed to trash the app and data with a misguided attempt at an upgrade, but fortunately I had taken a backup with <a class="external-link" href="http://www.rerware.com/Android/">Rerware's MyBackup</a>.</p>
<p>I copied the data from the SD card under /rerware/MyBackup/AllAppsBackups/AppsMedia_2011_06_04/Apps/de.abs_net.TimeTracker_79.zip to my desktop, unzipped, and dig into it with sqlite3. &nbsp;It was fairly straight forward to find what I needed, but the 'start' and 'stop' times in the 'period' table were in a format that looked like UNIX seconds since the epoch, but the numbers were too long.</p>
<p>ABS's Volker Lehnen answered my request for pointers promptly, with exactly what I needed:</p>

<blockquote class="webkit-indent-blockquote">
<p class="p1">the value in start, stop represent the number of miliseconds since Jan. 1. 1970, midnight GMT&nbsp;(Date.getTime() in Java)</p>
</blockquote>
<p>I tweaked my SQL query to generate a report with the Client, Project, Task, Start, Stopped, fractional hours, and comments on each work item. &nbsp;Here it is in case it helps anyone else:</p>
<pre>&nbsp;SELECT 
  datetime(start/1000,'unixepoch','localtime'), 
  datetime(stop/1000,'unixepoch','localtime'), 
  round((stop - start) / 1000.0 / 60.0 / 60.0, 1), 
  client.name, project.name, task.name, period.comment 
FROM 
  period, task, project, client 
WHERE 
  period.task_id = task.task_id AND 
  task.project_id = project.project_id AND 
  project.client_id = client.client_id
ORDER BY
  client.name;</pre>
<p>Which resulted in something like this:</p>
<pre>2011-04-25 22:13:16|2011-04-25 22:57:14|0.7|FooClient|HITSS2|proposal|review appdev doc.
2010-09-14 08:09:53|2010-09-14 19:35:03|11.4|BarClient|SID|work|dig into schema, map fields, find missing
2010-09-15 19:31:00|2010-09-15 20:01:54|0.5|BarClient|SID|work|start parsing changes
...</pre>
<p>Easy enough.</p>
<div>Thanks for the help, Volker!</div>
]]></content:encoded>
    <dc:publisher>No publisher</dc:publisher>
    <dc:creator>Chris Shenton</dc:creator>
    <dc:rights></dc:rights>
    
      <dc:subject>android</dc:subject>
    
    
      <dc:subject>db</dc:subject>
    
    
      <dc:subject>sqlite</dc:subject>
    
    
      <dc:subject>time tracking</dc:subject>
    
    <dc:date>2011-06-08T18:03:16Z</dc:date>
    <dc:type>News Item</dc:type>
  </item>


  <item rdf:about="http://www.koansys.com/news/koansys-presents-jenkins-ci-at-agiledc">
    <title>Koansys presents Jenkins CI at AgileDC</title>
    <link>http://www.koansys.com/news/koansys-presents-jenkins-ci-at-agiledc</link>
    <description>Chris Shenton will give a presentation/demo on the Jenkins continuous integration system at AgileDC</description>
    <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[
<p>A couple colleagues suggested I introduce people to the Jenkins (formerly Hudson) continuous integration system at the upcoming <a class="external-link" href="http://agiledc.org/">AgileDC conference</a>.&nbsp; It's on May 14, 2011 in Reston, VA, just outside Washington DC.&nbsp;&nbsp; I hope give a brief slideware overview, then a live demo; I'd like to keep it fairly hands-on and technical.</p>
<p>Jenkins makes it easy to watch code commits, then check it out, build, run tests, and notify developers quickly of any problems while its still fresh in their minds.&nbsp; The ability to graph things like code test coverage builds a friendly competitiveness that's healthy for development efforts.&nbsp; Getting Jenkins running is much easier then some other systems, so there's really no excuse not to set it up.&nbsp;&nbsp; The Chuck Norris plugin is the real reason so many developers use it. :-)</p>
<p>Here's a <a class="external-link" href="../tech/jenkins">link to the presentation</a> though I spent a large part of the time on a live demo.</p>
]]></content:encoded>
    <dc:publisher>No publisher</dc:publisher>
    <dc:creator>Chris Shenton</dc:creator>
    <dc:rights></dc:rights>
    
      <dc:subject>jenkins</dc:subject>
    
    
      <dc:subject>continuous integration</dc:subject>
    
    <dc:date>2011-04-05T03:15:00Z</dc:date>
    <dc:type>News Item</dc:type>
  </item>


  <item rdf:about="http://www.koansys.com/tech/restore-disk-from-crashplan-on-os-x">
    <title>Restore disk from Crashplan (on OS X)</title>
    <link>http://www.koansys.com/tech/restore-disk-from-crashplan-on-os-x</link>
    <description>Crashplan saved our bacon but took a while to find the files -- ownership and location important.</description>
    <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[
<p>One of the OS X laptops was acting insanely slow, blocking, beach-balling. &nbsp; I installed a SMART disk checker which confirmed the hard disk was failing badly.&nbsp;</p>
<p>We use CrashPlan on our developer laptops but this one didn't have it. &nbsp;We quickly downloaded it, and set it to backup with the 30-day trial into CrashPlan Central's hosted backup; I could have backed up to a local Mac which already used CrashPlan but this was even faster and the disk was almost completely dead. It took a while, largely because the source disk was so broken and slow, but overnight, CPC had a copy.</p>
<p>A trip to the Apple genius bar with the secret password "Apple Support Contract" and we had a new disk installed in an hour.</p>
<p>Now for the acid test: how to restore? Never had to do this before. Create the initial user account for the primary user. Then...</p>
<p>We installed the CrashPlan client again, configured the account, and CP showed the backed-up data. Great. Just restore.&nbsp;</p>
<p>First try with defaults restored to the desktop of the restored user, not what I wanted.&nbsp;</p>
<p>Second attempt I specified to restore into the actual original directory. Seemed to work. But none of the user settings were remembered -- email accounts, app license keys.</p>
<p>Finally restored an individual ~/Library/Preferences/appname.plist file onto the Desktop to look for license keys, and found I was not allowed to open it. &nbsp;Ah ha! &nbsp;Ownership/permissions problems. &nbsp;The restored file was uid=502, but my newly created user was uid=501. &nbsp;So I re-created the user, with the same home dir as it originally had; OS X &nbsp;allocated uid=502 to it, and it found the entire directory tree that had been previously restored for that user's home dir, under the original username.&nbsp;</p>
<p>Sweet. All the Mail and app settings and license keys were back.</p>
<p>I need to come up with a better way to re-create users on a new disk with the right UID so this is trivial. In the past I think I've found this a bit difficult on a Mac.</p>
]]></content:encoded>
    <dc:publisher>No publisher</dc:publisher>
    <dc:creator>Chris Shenton</dc:creator>
    <dc:rights></dc:rights>
    <dc:date>2011-03-29T21:23:03Z</dc:date>
    <dc:type>News Item</dc:type>
  </item>


  <item rdf:about="http://www.koansys.com/tech/compile-python-2.7-on-freebsd">
    <title>Compile Python-2.7 on FreeBSD</title>
    <link>http://www.koansys.com/tech/compile-python-2.7-on-freebsd</link>
    <description>Need to patch in order to fix problem with ${LDFLAGS}. Don't use --enable-shared.</description>
    <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[
<p>Python-2.7 and 2.7.1 encounter problems trying to compile code:</p>
<pre>chris@Boqueria:coverage-3.4$ /usr/local/python/2.7/bin/python setup.py build_ext
running build_ext
building 'coverage.tracer' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/python/2.7/include/python2.7 -\
c coverage/tracer.c -o build/temp.freebsd-7.2-STABLE-amd64-2.7/coverage/tracer.o
gcc -pthread -shared ${LDFLAGS} build/temp.freebsd-7.2-STABLE-amd64-2.7/coverage/tracer.o -lpython2.7 -o build/lib.freebsd-7.2-STABLE-amd64-\
2.7/coverage/tracer.so
gcc: ${LDFLAGS}: No such file or directory
error: command 'gcc' failed with exit status 1</pre>
<p>This manifests itself in higher-level 'easy_install' and 'pip' usage but with less helpful diagnostic messages and it took me a while to isolate.&nbsp;</p>
<p>Reed found this patch&nbsp;which was created shortly after python-2.7.1 was released:</p>
<p><a class="external-link" href="http://bugs.python.org/file19836/freebsd_ldshared.patch">http://bugs.python.org/file19836/freebsd_ldshared.patch</a></p>
<p>It must be applied before compiling Python.</p>
<p>I found that if I used the --enable-shared flag, that when I invoked python, it couldn't find its libraries, so I don't use this. &nbsp;My incantation is:</p>
<pre>./configure --prefix=/usr/local/python/2.7.1 --enable-ipv6</pre>
<p>&nbsp;</p>
]]></content:encoded>
    <dc:publisher>No publisher</dc:publisher>
    <dc:creator>Chris Shenton</dc:creator>
    <dc:rights></dc:rights>
    
      <dc:subject>python</dc:subject>
    
    
      <dc:subject>freebsd</dc:subject>
    
    <dc:date>2011-03-24T14:53:52Z</dc:date>
    <dc:type>News Item</dc:type>
  </item>


  <item rdf:about="http://www.koansys.com/news/koansys-on-pycon-2011-panel-on-how-to-sell-python">
    <title>Koansys on Pycon 2011 panel on "How to Sell Python"</title>
    <link>http://www.koansys.com/news/koansys-on-pycon-2011-panel-on-how-to-sell-python</link>
    <description>Chris Shenton talked about getting python into Government projects</description>
    <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[
<p>Daniel Greenfeld organized a panel for Pycon 2011 entitled "How to Sell Python". &nbsp;He asked Koansys' Chris Shenton to discuss getting python into government environment, due to our experience with NASA and EPA.&nbsp;</p>
<p>The panelists, left to right in the video, were:</p>
<ul><li>C. Titus Brown: academia</li><li>Dan Mesh: large commercial organizations</li><li>Chris Shenton: government</li><li>Frank Wiles: small commercial organizations</li><li>James Turk: non-profit organizations</li></ul>
<p>Take a look at the Pycon <a class="external-link" href="http://us.pycon.org/2011/schedule/presentations/72/">schedule page</a> and <a class="external-link" href="http://pycon.blip.tv/file/4882990">watch the video</a> on blip.tv (the mp4 format worked best for me)</p>
]]></content:encoded>
    <dc:publisher>No publisher</dc:publisher>
    <dc:creator>Chris Shenton</dc:creator>
    <dc:rights></dc:rights>
    
      <dc:subject>python</dc:subject>
    
    <dc:date>2011-03-18T18:20:00Z</dc:date>
    <dc:type>News Item</dc:type>
  </item>


  <item rdf:about="http://www.koansys.com/tech/emacs-hangs-on-flymake-under-os-x">
    <title>Emacs hangs on Flymake under OS X</title>
    <link>http://www.koansys.com/tech/emacs-hangs-on-flymake-under-os-x</link>
    <description>Popup dialogs considered harmful.</description>
    <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[
<p>I'm using Emacs.app 23.2.1 (not Aquamacs) on OS X. For coding Python, I depend on flymake to highlight mistakes. &nbsp;Some files it encounteres cause it to pop up a dialog:</p>
<blockquote class="webkit-indent-blockquote">
<p>Flymake: Configuration error has occurred while running (pyflakes yourfile.py). Flymake will be switched OFF</p>
</blockquote>
<p>&nbsp;with 'Cancel' and 'OK' buttons.</p>
<p>Sometimes, however, Emacs just hangs. &nbsp;The OS X red/yellow/blue close/minimize/zoom buttons turn grey as if Emacs has lost focus, but it is in fact the active application. Switching tasks around and back to Emacs doesn't recover it. &nbsp;You can't Command-Q quit it. &nbsp;</p>
<p>When you do finally give up and kill it and restart, you've lost your work, your shells, and it doesn't save the list of recent-files.</p>
<p>You can disable the use of a popup for flymake with:</p>
<pre>(setq flymake-gui-warnings-enabled nil)</pre>
<p>This prevents flymake from alerting you that it's switching itself off, but it's better than the alternative.</p>
<p>The flymake-display-warning calls Emac's 'message-box' function so there may be other tools which cause the same problem.</p>
<p>There's also a generic variable use-dialog-box but setting it from default t to nil didn't help with flymake. There's also a suggestion on the interwebs to use defadvice to tell y-or-no-p and yes-or-no-p set use-dialog-box to nil, but again, this won't help flymake since it doesn't use those functions.</p>
]]></content:encoded>
    <dc:publisher>No publisher</dc:publisher>
    <dc:creator>Chris Shenton</dc:creator>
    <dc:rights></dc:rights>
    
      <dc:subject>python</dc:subject>
    
    
      <dc:subject>os x</dc:subject>
    
    
      <dc:subject>emacs</dc:subject>
    
    <dc:date>2011-02-19T22:50:00Z</dc:date>
    <dc:type>News Item</dc:type>
  </item>


  <item rdf:about="http://www.koansys.com/tech/tal-order-of-execution">
    <title>TAL Order of Execution</title>
    <link>http://www.koansys.com/tech/tal-order-of-execution</link>
    <description>A TAL memory aid for something I can never remember or find when I want to.</description>
    <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[
<div>
<p class="p1"><span class="s1">tal:</span>&nbsp;attributes should be listed in order of execution, per the&nbsp;<a href="http://www.zope.org/Wikis/DevSite/Projects/ZPT/TAL%20Specification%201.4/#oop">TAL specification</a>. I assume chameleon uses the same order.</p>
<ol style="list-style-type: decimal;"><li class="li2">tal:define</li><li class="li2">tal:condition</li><li class="li2">tal:repeat</li><li class="li2">tal:content or tal:replace (an element may have only one of these)</li><li class="li2">tal:attributes</li><li class="li2">tal:omit-tag</li></ol>
</div>
]]></content:encoded>
    <dc:publisher>No publisher</dc:publisher>
    <dc:creator>Reed O'Brien</dc:creator>
    <dc:rights></dc:rights>
    <dc:date>2011-02-13T07:43:12Z</dc:date>
    <dc:type>News Item</dc:type>
  </item>


  <item rdf:about="http://www.koansys.com/tech/plone-on-slicehost">
    <title>Plone on Slicehost</title>
    <link>http://www.koansys.com/tech/plone-on-slicehost</link>
    <description>How to setup plone on slicehost</description>
    <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>Setup is something like the following. YMMV.</p>
<div class="section" id="setup-slice">
<h3>Setup Slice</h3>
<pre class="literal-block">
$ sudo adduser: myuser
$ edit /etc/group to add myuser to sudo
$ edit /etc/ssh/sshd_config and disable !PermitRootLogon
$ sudo /etc/init.d/ssh restart
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install emacs-nox
$ sudo apt-get install gcc
$ sudo apt-get install libbz2-dev zlib1g-dev libreadline-dev libsqlite3-dev libssl-dev \
libjpeb62-dev libpng12-dev libxml2-dev  libxslt-dev libgdbm-dev
$ sudo apt-get install git
$ sudo apt-get install apache2-mpm-worker
$ sudo apt-get install git-core
$ sudo apt-get install postfix set as satellite server, name: example.com, blank relay host
$ edit /etc/hosts and /etc/hostname  then reboot
$ edit /etc/postfix/main.cf and remove the hostname setting so it gets it from /etc/mailname
</pre>
</div>
<div class="section" id="python">
<h3>Python</h3>
<pre class="literal-block">
$ cd /usr/local
$ sudo mkdir python
$ sudo mkdir src
$ sudo chown -R myuser src
$ cd src
$ curl http://www.python.org/ftp/python/2.7.1/Python-2.7.1.tar.bz2|tar jxf -
$ cd Python-2.7.1
$ ./configure --prefix=/usr/local/python/2.7.1
$ make
$ make test
$ sudo make install
$ cd ..
$ curl -O http://python-distribute.org/distribute_setup.py
$ sudo /usr/local/python/2.7.1/bin/python distribute_setup.py
$ sudo /usr/local/python/2.7.1/bin/easy_install virtualenv
</pre>
</div>
<div class="section" id="github">
<h3>github</h3>
<pre class="literal-block">
$ cd ~
$ ssh-keygen -t rsa -C &quot;myuser&#64;myhost&quot; (I give mine password on client servers)
</pre>
<p>paste key into github account page so you can access</p>
</div>
<div class="section" id="plone">
<h3>Plone</h3>
<pre class="literal-block">
$ cd /usr/local/
$ sudo mkdir myplone_buildout
$ cd myplone_buildout
$ sudo git clone git&#64;github.com:myuser/mylone_buildout.git .
$ sudo /usr/local/python/2.7.1/bin/virtualenv --no-site-packages --distribute
$ sudo ./bin/python bootstrap.py
$ sudo ./bin/buildout -v
$ sudo ln -s /usr/local/mylone_buildout/etc/init.d/supervisor.sh /etc/init.d
$ sudo chmod a+x /usr/local/mylone_buildout/etc/init.d/supervisor.sh
$ sudo update-rc.d supervisor.sh defaults
</pre>
</div>
<div class="section" id="firewall">
<h3>Firewall</h3>
<pre class="literal-block">
$ sudo apt-get install ufw
$ sudo ufw allow 80
$ sudo ufw allow 8080
$ sudo ufw allow 443
$ sudo ufw default deny
$ sudo ufw allow from myip1 to any port 22
$ sudo ufw allow from myip2 to any port 22
$ sudo ufw allow from myip3 to any port 22
$ sudo ufw allow from myip4 to any port 22
$ sudo ufw enable
$ sudo ufw status
</pre>
<pre class="literal-block">
Status: active

To                         Action      From
--                         ------      ----
80                         ALLOW       Anywhere
8080                       ALLOW       Anywhere
443                        ALLOW       Anywhere
22                         ALLOW       71.246.241.109
22                         ALLOW       71.246.241.106
22                         ALLOW       173.13.219.89
22                         ALLOW       70.90.70.89
</pre>
</div>
<div class="section" id="apache">
<h3>Apache</h3>
<pre class="literal-block">
$ a2enmod ssl proxy proxy_connect proxy_http file_cache mem_cache
$ a2ensite default-ssl
$ edit proxy.conf, default, and default-ssl
</pre>
<pre class="literal-block">
#proxy.conf
&lt;IfModule mod_proxy.c&gt;

        ProxyRequests Off

        &lt;Proxy *&gt;
                AddDefaultCharset off
                Order deny,allow
                Deny from all
                Allow from all ##&lt;&lt;&lt;==== add this line to prevent 403 no access to / when rewriting
                #Allow from .example.com
        &lt;/Proxy&gt;

        ProxyVia On
&lt;/IfModule&gt;
</pre>
<pre class="literal-block">
#default
&lt;VirtualHost *:80&gt;
        ServerAdmin you &#64;example.com
        RewriteEngine On
        RewriteRule ^(.*) https://%{SERVER_NAME}$1 [NE,L]

        DocumentRoot /var/www
...
</pre>
<pre class="literal-block">
# default-ssl
&lt;IfModule mod_ssl.c&gt;
&lt;VirtualHost _default_:443&gt;
        ServerAdmin info&#64;example.com
        ServerName  example.com
        RewriteEngine On
        RewriteRule ^/(.*) http://localhost:8080/VirtualHostBase/https/%{SERVER_NAME}:443/mysite/VirtualHostRoot/$1 [L,P]
        DocumentRoot /var/www
...
...
        #   SSL Engine Switch:
        #   Enable/Disable SSL for this virtual host.
        SSLEngine on
        SSLCertificateFile /usr/local/ssl/cert-mysite.crt
        SSLCertificateKeyFile /usr/local/ssl/mysite.key
        SSLCACertificateFile /usr/local/ssl/GandiStandardSSLCA.pem
        SSLVerifyClient None
...
</pre>
</div>
]]></content:encoded>
    <dc:publisher>No publisher</dc:publisher>
    <dc:creator>Reed O'Brien</dc:creator>
    <dc:rights></dc:rights>
    <dc:date>2011-02-01T18:05:40Z</dc:date>
    <dc:type>News Item</dc:type>
  </item>


  <item rdf:about="http://www.koansys.com/news/run-apache-in-the-forground-on-ubuntu">
    <title>Run apache in the forground on ubuntu</title>
    <link>http://www.koansys.com/news/run-apache-in-the-forground-on-ubuntu</link>
    <description>since ubuntu renames the apache daemon binary from httpd to apache2 and requires sourcing the apache envvars it is not possible to start apache in the fg with httpd -X or apache2 -X

annoyingly you must do the following 

sudo -i ; . /etc/apache2/envvars ; apache2 -X</description>
    <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[
<pre>sudo -i . /etc/apache2/envvars; apache2 -X</pre>
<p>&nbsp;</p>
<p>&nbsp;clever, very clever.&nbsp;</p>
]]></content:encoded>
    <dc:publisher>No publisher</dc:publisher>
    <dc:creator>Reed O'Brien</dc:creator>
    <dc:rights></dc:rights>
    <dc:date>2010-11-09T18:30:00Z</dc:date>
    <dc:type>News Item</dc:type>
  </item>


  <item rdf:about="http://www.koansys.com/tech/building-python-2.7-on-freebsd">
    <title>Building Python-2.7 on FreeBSD</title>
    <link>http://www.koansys.com/tech/building-python-2.7-on-freebsd</link>
    <description>Building Plone failed because it couldn't find libraries, tweak build_ext.py to fix.</description>
    <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[
<p>I had the issue identified on this <a class="external-link" href="http://bugs.python.org/issue4366">python bugs message</a>, also reported in FreeBSD ports list</p>
<p><span class="Apple-style-span">
<pre>/usr/libexec/elf/ld: cannot find -lpython2.5</pre>
<div>The message also identified a fix that worked fine for me:</div>
<div><span class="Apple-style-span">
<pre>Index: build_ext.py
===================================================================
--- build_ext.py	(<a href="http://svn.python.org/view?rev=77388&view=rev">revision 77388</a>)
+++ build_ext.py	(working copy)
@@ -280,7 +280,7 @@
         # Python's library directory must be appended to library_dirs
         sysconfig.get_config_var('Py_ENABLE_SHARED')
         if ((sys.platform.startswith('linux') or sys.platform.startswith('gnu')
-             or sys.platform.startswith('sunos'))
+             or sys.platform.startswith('sunos') or sys.platform.startswith('freebsd'))
             and sysconfig.get_config_var('Py_ENABLE_SHARED')):
             if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")):
                 # building third party extensions</pre>
<div>&nbsp;</div>
</span></div>
</span></p>
]]></content:encoded>
    <dc:publisher>No publisher</dc:publisher>
    <dc:creator>Chris Shenton</dc:creator>
    <dc:rights></dc:rights>
    <dc:date>2010-10-27T15:43:13Z</dc:date>
    <dc:type>News Item</dc:type>
  </item>





</rdf:RDF>

